package com.wzj.soopin.goods.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import org.dromara.common.core.domain.model.BaseAudit;
import org.dromara.common.excel.annotation.Excel;

import java.math.BigDecimal;

/**
 * sku信息对象 pms_sku
 *
 * @author zcc
 */
@EqualsAndHashCode(callSuper = true)
@Schema(description = "SKU信息对象")
@Data
@TableName("pms_sku")
public class Sku extends BaseAudit {
    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    private Long id;

    @Schema(description = "PRODUCT_ID")
    @Excel(name = "PRODUCT_ID")
    private Long productId;

    @Schema(description = "SKU编码")
    @Excel(name = "SKU编码")
    private String outSkuId;

    @Schema(description = "价格")
    @Excel(name = "价格")
    private BigDecimal price;

    @Schema(description = "展示图片")
    @Excel(name = "展示图片")
    private String pic;

    @Schema(description = "商品销售属性，JSON格式")
    @Excel(name = "商品销售属性，JSON格式")
    private String spData;

    @Schema(description = "库存数")
    @Excel(name = "库存数")
    private Integer stock;

    @Schema(description = "租户id")
    @Excel(name = "租户id")
    private String tenantId;

    @Schema(description = "删除标志（0代表存在，1代表删除）")
    @Excel(name = "删除标志（0代表存在，1代表删除）")
    @TableLogic(value ="0", delval = "1")
    @TableField(value ="del_flag",fill = FieldFill.INSERT, jdbcType = JdbcType.CHAR)
    private String delFlag;
}
