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.*;
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 lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 购买会员卡记录表
 */
@Data
@TableName("vip_card_record")
@ApiModel(value = "VipCardRecord对象", description = "购买会员卡记录表")
public class VipCardRecord 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_")
    private Long userId;
    @ApiModelProperty("订单号 活动id")
	@TableField(value = "order_no_")
    private String orderNo;
    @ApiModelProperty("订单详情号 ")
    @TableField(value = "sub_order_no_")
    private String subOrderNo;
    @ApiModelProperty("会员卡id ")
	@TableField(value = "vip_card_id_")
    private Long vipCardId;

    @TableField(value = "times_")
    @ApiModelProperty("添加时间数量")
    private Integer times;

    @TableField(value = "type_")
    @ApiModelProperty("时间类型 DAY:天 MONTH:月 ，QUARTERLY : 季度 YEAR_HALF ： 半年 YEAR:年")
    private PeriodEnum type;

    @TableField(value = "client_type_")
    @ApiModelProperty("用户类型 学生：STUDENT 老师 ：TEACHER")
    private ClientEnum clientType;

    @ApiModelProperty("来源类型 ： ACTIVITY ：活动 ，ORDER:订单")
    @TableField(value = "source_type_")
    private SourceTypeEnum sourceType;

    @ApiModelProperty("会员卡开始时间 ")
	@TableField(value = "start_time_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date startTime;
    @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 = "update_time_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;
    @ApiModelProperty("会员卡结束时间 ")
	@TableField(value = "end_time_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date endTime;
    /***
     * 消息发送 0、未发送 1、已发送提前3天消息 2、已发送会员过期消息
     * @author liweifan
     * @updateTime 2022/5/5 19:25
     */
    @TableField(value = "msg_status_")
    private Integer msgStatus;

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

    @ApiModelProperty("备注")
    @TableField(value = "reason_")
    private String reason;

    @ApiModelProperty("会员类型 VIP,SVIP")
    @TableField(value = "vip_type_")
    private EVipType vipType;

    @ApiModelProperty("状态 ADD:新增，DEDUCTION:扣减,UPDATE:变更")
    @TableField(value = "status_")
    private EVipRecordStatus status;

    @ApiModelProperty("是否展示1:展示，0:隐藏")
    @TableField(value = "display_flag_")
    private Boolean displayFlag;

    @ApiModelProperty("是否有效 1:有效，0:失效")
    @TableField(value = "efficient_flag_")
    private Boolean efficientFlag;

    @ApiModelProperty("关联ID")
    @TableField(value = "ref_id_")
    private Long refId;

    @ApiModelProperty("是否发送消息")
    @TableField(value = "send_msg_")
    private Boolean sendMsg;

}