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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yonge.cooleshow.biz.dal.enums.GenderEnum;
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 org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author: liweifan
 * @Data: 2022/3/21 15:26
 */
@ApiModel(value = "StudentSearch", description = "学院管理查询")
public class StudentSearch extends QueryInfo{
    @ApiModelProperty(value = "学员编号/昵称/电话")
    private String search;
    @ApiModelProperty(value = "性别 0女 1男")
    private GenderEnum gender;
    @ApiModelProperty("学员声部 ")
    private String subjectId;
    @ApiModelProperty(value = "0-正常， 1-锁定")
    private UserLockFlag lockFlag;
    private YesOrNoEnum delFlag;
    @ApiModelProperty(value = "是否会员 0否 1是")
    private YesOrNoEnum isVip;
    @ApiModelProperty(value = "注册开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;
    @ApiModelProperty(value = "注册结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;
    
    @ApiModelProperty("用户状态")
    private String userStatus;

    public String getSearch() {
        return search;
    }

    public void setSearch(String search) {
        this.search = search;
    }

    public GenderEnum getGender() {
        return gender;
    }

    public void setGender(Object gender) {
        if(gender instanceof GenderEnum ){
            this.gender = (GenderEnum) gender;
        }else if (null != gender) {
            this.gender = GenderEnum.valueOf(Integer.parseInt(gender.toString()));
        }
    }

    public String getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(String subjectId) {
        this.subjectId = subjectId;
    }

    public UserLockFlag getLockFlag() {
        return lockFlag;
    }

    public void setLockFlag(UserLockFlag lockFlag) {
        this.lockFlag = lockFlag;
    }

    public YesOrNoEnum getIsVip() {
        return isVip;
    }

    public void setIsVip(Integer isVip) {
        this.isVip = YesOrNoEnum.valueOf(isVip);
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

	public String getUserStatus() {
		return userStatus;
	}

	public void setUserStatus(String userStatus) {
		this.userStatus = userStatus;
	}

	public YesOrNoEnum getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(YesOrNoEnum delFlag) {
		this.delFlag = delFlag;
	}
}
