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.InOrOutEnum;
import com.yonge.cooleshow.biz.dal.enums.SourceTypeEnum;
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;
import javax.validation.constraints.Positive;

/**
 * 琴房时长变更记录表
 */
@TableName("piano_room_change_record")
@ApiModel(value = "PianoRoomChangeRecord对象", description = "琴房时长变更记录表")
public class PianoRoomChangeRecord implements Serializable {
	private static final long serialVersionUID = 1L;
    @ApiModelProperty("购买记录id ")
    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty("用户id ")
	@TableField(value = "user_id_")
    @NotNull(message = "用户ID不能为空")
    private Long userId;
    @ApiModelProperty("时长（分） ")
	@TableField(value = "times_")
    @NotNull(message = "时长不能为空")
    @Positive(message = "时长必须大于0")
    private Integer times;
    @ApiModelProperty("操作类型：IN、增加 OUT、减少 ")
	@TableField(value = "in_or_out_")
    @NotNull(message = "操作类型不能为空")
    private InOrOutEnum inOrOut;
    @ApiModelProperty("原因 ")
	@TableField(value = "reason_")
    @NotBlank(message = "原因不能为空")
    private String reason;
    @ApiModelProperty("创建时间 ")
	@TableField(value = "create_time_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;
    @ApiModelProperty("创建人 ")
    @TableField(value = "create_by_")
    private Long createBy;

    @ApiModelProperty("来源   ACTIVITY:活动  PLATFORM:平台")
    @TableField(value = "source_type_")
    private SourceTypeEnum sourceType;

    @ApiModelProperty("活动id ")
    @TableField(value = "biz_id_")
    private String bizId;

    public SourceTypeEnum getSourceType() {
        return sourceType;
    }

    public void setSourceType(SourceTypeEnum sourceType) {
        this.sourceType = sourceType;
    }

    public String getBizId() {
        return bizId;
    }

    public void setBizId(String bizId) {
        this.bizId = bizId;
    }

    public Long getId() {
        return id;
    }

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

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    
	public Integer getTimes() {
        return times;
    }

    public void setTimes(Integer times) {
        this.times = times;
    }
    
	public InOrOutEnum getInOrOut() {
        return inOrOut;
    }

    public void setInOrOut(InOrOutEnum inOrOut) {
        this.inOrOut = inOrOut;
    }
    
	public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }
    
	public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getCreateBy() {
        return createBy;
    }

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