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-10
 */
@Data
@Table("tb_shop_prod_unit")
public class ShopProdUnit implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @Id(keyType = KeyType.Auto)
    private Long id;
    /**
     * 同步id
     */
    private Long syncId;
    /**
     * 单位名称
     */
    private String name;
    /**
     * 单位类型 number-计数 weight-记重
     */
    private String unitType;
    /**
     * 单位来源 1-系统预设 0-商家创建
     */
    private Integer isSystem;
    /**
     * 状态 0-禁用 1-启用
     */
    private Integer status;
    /**
     * 店铺id
     */
    private Long shopId;
    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;
}