package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;

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

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

/**
 * 团购套餐详情子表
 * @TableName life_group_buy_thali
 */
@TableName(value ="life_group_buy_thali")
@JsonInclude
@Data
public class LifeGroupBuyThali {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 团购主表id
     */
    @ApiModelProperty(value = "团购主表id")
    @TableField("parent_id")
    private String parentId;

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

    /**
     * 团购详情关联id
     */
    @ApiModelProperty(value = "团购详情关联id")
    @TableField("detail_id")
    private String detailId;

    /**
     * 数量
     */
    @ApiModelProperty(value = "数量")
    @TableField("qty")
    private Integer qty;

    /**
     * 价格
     */
    @ApiModelProperty(value = "价格")
    @TableField("price")
    private BigDecimal price;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @TableField("detail_sort")
    private Integer detailSort;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    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;

    @TableField(exist = false)
    private String dishName;

    @TableField(exist = false)
    private String dishImg;

    @TableField(exist = false)
    private String dishPrice;

    @TableField(exist = false)
    private String dishesUnit;
}