package easydo.technology.model;

import easydo.technology.annotation.Minio;
import easydo.technology.annotation.NotTableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;

@Data
@Minio
@EqualsAndHashCode(callSuper = true)
public class PurchaseOrder extends CommonModel {
    private String id;
    private String code;
    private String contractNo;
    private String name;
    private String saleOrderId;
    private String customerId;
    private Long managerId;
    private String createTime;
    private String orderDate;
    private String status;
    private String category;
    private String planReceiveDate;
    private String actualReceiveDate;
    private String deliveryDate;
    private String deliveryAddress;
    private String purchasePlanId;
    private Long createId;
    private Long updateId;
    private String tenantId;
    private String updateTime;
    private String expressNo;
    private String remark;
    private BigDecimal incomePrice;
    private BigDecimal freePrice;
    private BigDecimal actualPrice;

    // 非数据库字段，用于级联组装
    @NotTableField
    private List<PurchaseOrderDetail> childrenList;
    @NotTableField
    private SaleOrder saleOrder;
    @NotTableField
    private Customer customer;
    @NotTableField
    private PurchasePlan purchasePlan;
    @NotTableField
    private String managerName;  // 负责人姓名（非数据库字段）
    @NotTableField
    private String customerName;  // 客户名称（非数据库字段）
}
