package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 团购主表
 * @TableName life_group_buy_main
 */
@TableName(value ="life_group_buy_main")
@JsonInclude
@Data
public class LifeGroupBuyMain {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 编号
     */
    @ApiModelProperty(value = "编号")
    @TableField("group_no")
    private String groupNo;

    /**
     * 团购类型(1美食)
     */
    @ApiModelProperty(value = "团购类型(1美食)")
    @TableField("group_type")
    private Integer groupType;

    /**
     * 状态(0草稿/1待审核/2未开始/3审核拒绝/4已售罄/5进行中/6已下架/7已结束/8=2+手动下架)
     */
    @ApiModelProperty(value = "状态(0草稿/1待审核/2未开始/3审核拒绝/4已售罄/5进行中/6已下架/7已结束/8=2+手动下架)")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "审批评论")
    @TableField("approval_comments")
    private String approvalComments;

    /**
     * 商铺id
     */
    @ApiModelProperty(value = "商铺id")
    @TableField("store_id")
    private String storeId;

    /**
     * 图片id
     */
    @ApiModelProperty(value = "图片id")
    @TableField("image_id")
    private String imageId;

    /**
     * 团购名称
     */
    @ApiModelProperty(value = "团购名称")
    @TableField("group_name")
    private String groupName;

    /**
     * 开始时间类型(0审核通过立即开始/1手动设置)
     */
    @ApiModelProperty(value = "开始时间类型(0审核通过立即开始/1手动设置)")
    @TableField("start_time_type")
    private Integer startTimeType;

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    @TableField("start_time_value")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startTimeValue;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    @TableField("end_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endTime;

    /**
     * 库存数量
     */
    @ApiModelProperty(value = "库存数量")
    @TableField("inventory_num")
    private Integer inventoryNum;

    /**
     * 限购类型(0不限量/1自定义)
     */
    @ApiModelProperty(value = "限购类型(0不限量/1自定义)")
    @TableField("quota_type")
    private Integer quotaType;

    /**
     * 限购值
     */
    @ApiModelProperty(value = "限购值")
    @TableField("quota_value")
    private String quotaValue;

    /**
     * 原价
     */
    @ApiModelProperty(value = "原价")
    @TableField("original_price")
    private BigDecimal originalPrice;

    /**
     * 优惠价
     */
    @ApiModelProperty(value = "优惠价")
    @TableField("preferential_price")
    private BigDecimal preferentialPrice;

    /**
     * 有效期类型(0指定天数/1指定时间段)
     */
    @ApiModelProperty(value = "有效期类型(0指定天数/1指定时间段)")
    @TableField("effective_date_type")
    private Integer effectiveDateType;

    /**
     * 有效期值
     */
    @ApiModelProperty(value = "有效期值")
    @TableField("effective_date_value")
    private String effectiveDateValue;

    /**
     * 不可用日期类型(0全部日期可用/1限制日期:1234567;节日id/2自定义不可用日期)
     */
    @ApiModelProperty(value = "不可用日期类型(0全部日期可用/1限制日期:1234567;节日id/2自定义不可用日期)")
    @TableField("disable_date_type")
    private Integer disableDateType;

    /**
     * 不可用日期值
     */
    @ApiModelProperty(value = "不可用日期值")
    @TableField("disable_date_value")
    private String disableDateValue;

    /**
     * 核销方式
     */
    @ApiModelProperty(value = "核销方式")
    @TableField("write_off")
    private String writeOff;

    /**
     * 预约规则
     */
    @ApiModelProperty(value = "预约规则")
    @TableField("reservation_rules")
    private String reservationRules;

    /**
     * 使用规则
     */
    @ApiModelProperty(value = "使用规则")
    @TableField("use_rules")
    private String useRules;

    /**
     * 适用人数
     */
    @ApiModelProperty(value = "适用人数")
    @TableField("applicable_num")
    private String applicableNum;

    /**
     * 其他规则
     */
    @ApiModelProperty(value = "其他规则")
    @TableField("other_rules")
    private String otherRules;

    /**
     * 发票类型(0电子发票/1纸质发票)
     */
    @ApiModelProperty(value = "发票类型(0电子发票/1纸质发票)")
    @TableField("invoice_type")
    private String invoiceType;

    /**
     * 发票说明
     */
    @ApiModelProperty(value = "发票说明")
    @TableField("invoice_describe")
    private String invoiceDescribe;

    /**
     * 是否保价(0否/1是)
     */
    @ApiModelProperty(value = "是否保价(0否/1是)")
    @TableField("insured_flag")
    private Integer insuredFlag;

    /**
     * 当价格低于当前价格
     */
    @ApiModelProperty(value = "当价格低于当前价格")
    @TableField("insured_price")
    private BigDecimal insuredPrice;

    /**
     * 自动为用户补偿优惠券id
     */
    @ApiModelProperty(value = "自动为用户补偿优惠券id")
    @TableField("coupon_id")
    private Integer couponId;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    private Integer createdUserId;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;

}