package com.czg.product.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品SKU
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 1.0 2025-02-16
 */
@Data
@Table("tb_prod_sku")
public class ProdSku implements Serializable {

    @Serial
	private static final long serialVersionUID = 1L;

	/**
	* id
	*/
	@Id(keyType = KeyType.Auto)
	private Long id;
	/**
	 * 同步id
	 */
	private Long syncId;
	/**
	* 店铺id
	*/
	private Long shopId;
	/**
	* 条形码
	*/
	private String barCode;
	/**
	* 商品Id
	*/
	private Long productId;
	/**
	* 原价
	*/
	private BigDecimal originPrice;
	/**
	* 成本价
	*/
	private BigDecimal costPrice;
	/**
	* 会员价
	*/
	private BigDecimal memberPrice;
	/**
	* 售价
	*/
	private BigDecimal salePrice;
	/**
	* 起售数量
	*/
	private Integer suitNum;
	/**
	* 规格详情
	*/
	private String specInfo;
	/**
	 * 商品封面图
	 */
	private String coverImg;
	/**
	 * 重量
	 */
	private BigDecimal weight;
	/**
	* 销量
	*/
	private BigDecimal realSalesNumber;
	/**
	* 是否售罄
	*/
	private Integer isPauseSale;
	/**
	* 是否上架
	*/
	private Integer isGrounding;
	/**
	* 创建时间
	*/
	@Column(onInsertValue = "now()")
	private LocalDateTime createTime;
	/**
	* 更新时间
	*/
	@Column(onInsertValue = "now()", onUpdateValue = "now()")
	private LocalDateTime updateTime;
	/**
	* 逻辑删除字段 0否 1 删除
	*/
	private Integer isDel;
}