package shop.alien.entity.delicious;

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

import java.io.Serializable;
import java.util.Date;

/**
 * 美食商品索引表
 */
@Data
@JsonInclude
@TableName("delicious_commodity_idx")
public class DeliciousCommodityIdx implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value = "主键ID")
    private Integer id;

    @TableField("category")
    @ApiModelProperty(value = "小类")
    private String category;

    @TableField("commodity_id")
    @ApiModelProperty(value = "商品ID")
    private Integer commodityId;

    @TableField("table_name")
    @ApiModelProperty(value = "商品表表名")
    private String tableName;

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

    @TableField("store_id")
    @ApiModelProperty(value = "店铺ID")
    private String storeId;

    @TableField("status")
    @ApiModelProperty(value = "状态")
    private Integer status;

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

    @TableField("commodity_type")
    @ApiModelProperty(value = "商品类别")
    private String commodityType;

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

    @TableField("updated_user_id")
    @ApiModelProperty(value = "更新人ID")
    private Integer updatedUserId;

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

