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.time.LocalDateTime;

/**
 * 商品规格
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 1.0 2025-02-13
 */
@Data
@Table("tb_shop_prod_spec")
public class ShopProdSpec implements Serializable {

    @Serial
	private static final long serialVersionUID = 1L;

	/**
	* id
	*/
	@Id(keyType = KeyType.Auto)
	private Long id;
	/**
	 * 同步id
	 */
	private Long syncId;
	/**
	* 规格名称
	*/
	private String name;
	/**
	 * 完整规格名称
	 */
	private String fullName;
	/**
	* 规格级别
	*/
	private Integer level;
	/**
	* 排序
	*/
	private Integer sort;
	/**
	* 上级 id
	*/
	private Long pid;
	/**
	 * 所有上级id，用逗号分隔
	 */
	private String pids;
	/**
	* 店铺 id
	*/
	private Long shopId;
	/**
	 * 状态 0-禁用 1-启用
	 */
	private Integer status;
	/**
	* 创建时间
	*/
	@Column(onInsertValue = "now()")
	private LocalDateTime createTime;
	/**
	* 更新时间
	*/
	@Column(onInsertValue = "now()", onUpdateValue = "now()")
	private LocalDateTime updateTime;
}