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-20
 */
@Data
@Table("tb_shop_vendor")
public class ShopVendor implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @Id(keyType = KeyType.Auto)
    private Long id;
    /**
     * 店铺Id
     */
    private Long shopId;
    private Long syncId;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 供应商名称
     */
    private String name;
    /**
     * 联系人名字
     */
    private String contactName;
    /**
     * 联系人电话
     */
    private String telephone;
    /**
     * 结算周期（日）
     */
    private Integer period;
    /**
     * 供应商地址
     */
    private String address;
    /**
     * 标签
     */
    private String tip;
    /**
     * 备注
     */
    private String remark;
    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;
    /**
     * 最后一次交易时间(主要做排序)
     */
    private LocalDateTime lastTransactTime;
    /**
     * 逻辑删除 1-是 0-否
     */
    private Integer isDel;
}