package com.yonge.cooleshow.biz.dal.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonge.cooleshow.biz.dal.enums.HotSearchEnum;
import com.yonge.cooleshow.common.enums.YesOrNoEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 热门搜索表
 */
@TableName("hot_search")
@ApiModel(value = "HotSearch对象", description = "热门搜索表")
public class HotSearch implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("关键词 ")
    @TableField(value = "key_")
    @NotBlank(message = "关键词不能为空")
    private String key;

    @ApiModelProperty("MUSIC:曲目和专辑 COURSE:课程 ")
    @TableField(value = "type_")
    @NotNull(message = "类型不能为空")
    private HotSearchEnum type;

    @ApiModelProperty("状态 1启用 0禁用 ")
    @TableField(value = "status_")
    private YesOrNoEnum status;

    @ApiModelProperty("排序 ")
    @TableField(value = "order_")
    @NotNull(message = "排序值不能为空")
    private Integer order;

    @ApiModelProperty("创建时间 ")
    @TableField(value = "create_on_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createOn;

    @ApiModelProperty("修改时间 ")
    @TableField(value = "modify_on_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date modifyOn;

    @ApiModelProperty("创建人id ")
    @TableField(value = "create_by_")
    private Long createBy;

    @ApiModelProperty("修改人id ")
    @TableField(value = "update_by_")
    private Long updateBy;


    public HotSearchEnum getType() {
        return type;
    }

    public void setType(HotSearchEnum type) {
        this.type = type;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public YesOrNoEnum getStatus() {
        return status;
    }

    public void setStatus(YesOrNoEnum status) {
        this.status = status;
    }

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    public Date getCreateOn() {
        return createOn;
    }

    public void setCreateOn(Date createOn) {
        this.createOn = createOn;
    }

    public Date getModifyOn() {
        return modifyOn;
    }

    public void setModifyOn(Date modifyOn) {
        this.modifyOn = modifyOn;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

}