package com.qs.mp.channel.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
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.qs.mp.common.enums.CouponDiscountTypeEnum;
import com.qs.mp.common.enums.CouponSettleStatusEnum;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * @describe 渠道优惠券核销流水实体类
 * @auther quanshu
 * @create 2022-03-21 14:47:23
 */
@TableName("mp_channel_coupon_verify_log")
@Data
public class ChannelCouponVerifyLog implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 主键
   */
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  /**
   * 渠道ID
   */
  @TableField("channel_id")
  private Long channelId;

  /**
   * 用户优惠券ID
   */
  @TableField("user_coupon_id")
  private String userCouponId;

  /**
   * 券码
   */
  @TableField("verify_code")
  private String verifyCode;

  /**
   * 标题
   */
  @TableField("title")
  private String title;

  /**
   * 优惠类型;1代金券、2折扣券、3兑换券
   */
  @TableField("discount_type")
  private CouponDiscountTypeEnum discountType;

  /**
   * 优惠金额（比例）
   */
  @TableField("discount")
  private Integer discount;

  /**
   * 发放时间
   */
  @TableField("distribute_time")
  private Date distributeTime;

  /**
   * 有效期开始日
   */
  @TableField("valid_start")
  private Date validStart;

  /**
   * 有效期结束日
   */
  @TableField("valid_end")
  private Date validEnd;

  /**
   * 核销时间
   */
  @TableField("verify_time")
  private Date verifyTime;

  /**
   * 结算状态;1待结算 2已结算
   */
  @TableField("settle_status")
  @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
  private CouponSettleStatusEnum settleStatus;

  /**
   * 创建时间
   */
  @TableField("created_time")
  private Date createdTime;

  /**
   * 更新时间
   */
  @TableField("updated_time")
  private Date updatedTime;


}
