package com.scm.contract.model.purchase;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.set.direwolf.core.mybatis.BaseEntity;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

/**
 * @author zuo
 * @date 2024/6/4 17:56
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName(value = "tag_purchase")
@Data
public class TagPurchase extends BaseEntity<TagPurchase, String> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    private String id;

    /**
     * 时间
     */
    @TableField(value = "`dataTime`")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss")
    private Date dataTime;

    /**
     * 订单号
     */
    @TableField(value = "`orderNo`")
    private String orderNo;

    /**
     * 收货时间
     */
    @TableField(value = "`receiveDate`")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss")
    private Date receiveDate;

    /**
     * 供应商id（对应标签供应商表）
     */
    @TableField(value = "`providerId`")
    private String providerId;

    /**
     * 采购订单状态主键
     */
    @TableField(value = "`tagPurchaseStateId`")
    private String tagPurchaseStateId;

    /**
     * 操作员userId
     */
    @TableField(value = "`buyer_id`")
    private String buyerId;

    /**
     * 操作员名子(采购人员）
     */
    @TableField(value = "`operatorName`")
    private String buyerName;

    /**
     * 创建时间
     */
    @TableField(value = "`createTime`")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss")
    private Date cTime;

    /**
     * 修改时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss")
    @TableField(value = "`updateTime`")
    private Date updateTime;

    /**
     * 总价
     */
    @TableField(exist = false)
    private Double amount;

    /**
     * 供应商名称
     */
    @TableField(exist = false)
    private String providerName;

    /**
     * 采购订单状态名称
     */
    @TableField(exist = false)
    private String tagPurchaseStateName;

    /**
     * 对应的从表
     */
    @TableField(exist = false)
    private List<TagPurchaseDetail> details;


    @JsonFormat(timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss")
    @TableField(exist = false)
    private Date beginTime;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy/MM/dd HH:mm:ss")
    @TableField(exist = false)
    private Date endTime;

    @TableField(exist = false)
    private List<List<String>> order;

    @TableField(exist = false)
    private Long tagNumber;

    public TagPurchase(String id) {
        this.id = id;
    }

    public TagPurchase() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getDataTime() {
        return dataTime;
    }

    public void setDataTime(Date dataTime) {
        this.dataTime = dataTime;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Date getReceiveDate() {
        return receiveDate;
    }

    public void setReceiveDate(Date receiveDate) {
        this.receiveDate = receiveDate;
    }

    public String getProviderId() {
        return providerId;
    }

    public void setProviderId(String providerId) {
        this.providerId = providerId;
    }

    public String getTagPurchaseStateId() {
        return tagPurchaseStateId;
    }

    public void setTagPurchaseStateId(String tagPurchaseStateId) {
        this.tagPurchaseStateId = tagPurchaseStateId;
    }

    public String getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(String buyerId) {
        this.buyerId = buyerId;
    }

    public String getBuyerName() {
        return buyerName;
    }

    public void setBuyerName(String buyerName) {
        this.buyerName = buyerName;
    }

    public Date getcTime() {
        return cTime;
    }

    public void setcTime(Date cTime) {
        this.cTime = cTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public List<TagPurchaseDetail> getDetails() {
        return details;
    }

    public void setDetails(List<TagPurchaseDetail> details) {
        this.details = details;
    }

    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public List<List<String>> getOrder() {
        return order;
    }

    public void setOrder(List<List<String>> order) {
        this.order = order;
    }

    public String getProviderName() {
        return providerName;
    }

    public void setProviderName(String providerName) {
        this.providerName = providerName;
    }

    public String getTagPurchaseStateName() {
        return tagPurchaseStateName;
    }

    public void setTagPurchaseStateName(String tagPurchaseStateName) {
        this.tagPurchaseStateName = tagPurchaseStateName;
    }

    public Long getTagNumber() {
        return tagNumber;
    }

    public void setTagNumber(Long tagNumber) {
        this.tagNumber = tagNumber;
    }
}
