package shop.alien.entity.store;

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

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

/**
 * 美食商品表
 *
 * @author system
 * @since 2025-01-XX
 */
@Data
@JsonInclude
@TableName("store_product_delicacies")
@ApiModel(value = "StoreProductDelicacies对象", description = "美食商品表")
public class StoreProductDelicacies implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "商品表主键")
    @TableField("ext_id")
    private Integer extId;

    @ApiModelProperty(value = "名称")
    @TableField("name")
    private String name;

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

    @ApiModelProperty(value = "成本价(￥)")
    @TableField("cost_price")
    private BigDecimal costPrice;

    @ApiModelProperty(value = "单位，如份/瓶/杯")
    @TableField("unit")
    private String unit;

    @ApiModelProperty(value = "数量")
    @TableField("quantity")
    private Integer quantity;

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

    @ApiModelProperty(value = "菜品分组")
    @TableField("ext_group")
    private String extGroup;

    @ApiModelProperty(value = "状态：0禁用，1启用")
    @TableField("status")
    private Integer status;

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

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

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

    @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 = "更新时间")
    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;
}

