package com.yonge.cooleshow.biz.dal.dto.search;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yonge.cooleshow.common.enums.ESettlementFrom;
import com.yonge.cooleshow.common.enums.UserLockFlag;
import com.yonge.cooleshow.common.enums.YesOrNoEnum;
import com.yonge.toolset.base.page.QueryInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author: liweifan
 * @Data: 2022/3/21 15:26
 */
@Data
@ApiModel(value = "TeacherSearch", description = "老师管理查询")
public class TeacherSearch extends QueryInfo{
    @ApiModelProperty(value = "老师编号/昵称/电话")
    private String search;
    @ApiModelProperty(value = "老师类型 TOURIST 游客 ENTRY 认证老师 MUSICIAN 平台音乐人")
    private String teacherType;
    
    @ApiModelProperty(value = "徽章（STYLE-个人风采  LIVE-直播  VIDEO-视频课  MUSIC-曲谱）")
    private String tag;

    @ApiModelProperty(value = "0-正常， 1-锁定")
    private UserLockFlag lockFlag;
    
    private YesOrNoEnum delFlag;
    
    @ApiModelProperty(value = "是否会员(0-否 1-是)")
    private Integer isVip;
    
    @ApiModelProperty("用户状态")
    private String userStatus;
    
    @ApiModelProperty("声部编号")
    private Long subjectId;
	
    @ApiModelProperty("是否结算")
	private Boolean isSettlement;
	
    @ApiModelProperty("是否测试用户")
	private Boolean isTestUser;

	@ApiModelProperty(value = "是否练习 0否 1是")
	private YesOrNoEnum trainFlag;

	@ApiModelProperty(value = "是否评测 0否 1是")
	private YesOrNoEnum evaluateFlag;


	@ApiModelProperty(value = "会员结束开始时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date vipStartTime;
	@ApiModelProperty(value = "会员结束结束时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date vipEndTime;

	@ApiModelProperty("机构ID")
	private Long tenantId;

	@ApiModelProperty("机构名称")
	private String tenantName;

	@ApiModelProperty("是否绑定机构，0：不绑定，1：绑定")
	private Integer bindTenant;

	@ApiModelProperty("结算方式")
	private ESettlementFrom settlementFrom;

	@ApiModelProperty("老师ID")
	private Long userId;

	@ApiModelProperty(value = "排序方式, 默认 create_time_ desc", hidden = true)
	private String orderBy;
	public YesOrNoEnum getTrainFlag() {
		if (YesOrNoEnum.YES == trainFlag) {
			return trainFlag;
		}
		return null;
	}

	public void setTrainFlag(YesOrNoEnum trainFlag) {
		this.trainFlag = trainFlag;
	}

	public YesOrNoEnum getEvaluateFlag() {
		if (YesOrNoEnum.YES == evaluateFlag) {
			return evaluateFlag;
		}
		return null;
	}
}
