package com.xunhong.erp.turbo.api.biz.dto.common;

import com.xunhong.erp.turbo.api.biz.dto.enums.LoadingModeEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.PurchaseOrderPricingMethodEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.PurchaseOrderStateEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.SupplierTypeEnum;
import com.xunhong.erp.turbo.base.dto.Command;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * @author shenyifei
 */
@Data
@Schema(title = "采购订单供应商信息创建")
@EqualsAndHashCode(callSuper = true)
public class OrderSupplier extends Command {

	/**
	 * 记录ID
	 */
	@Schema(title = "记录ID", type = "string", requiredMode = Schema.RequiredMode.REQUIRED)
	private Long orderSupplierId;

	/**
	 * 订单ID
	 */
	@Schema(title = "订单ID", type = "string")
	private Long orderId;

	/**
	 * 供应商ID
	 */
	@Schema(title = "供应商ID", type = "string")
	private Long supplierId;

	/**
	 * 供应商姓名
	 */
	@Schema(title = "供应商姓名", requiredMode = Schema.RequiredMode.REQUIRED)
	private String name;

	/**
	 * 收款人姓名
	 */
	@Schema(title = "收款人姓名", requiredMode = Schema.RequiredMode.REQUIRED)
	private String payeeName;

	/**
	 * 身份证号
	 */
	@Schema(title = "身份证号", requiredMode = Schema.RequiredMode.REQUIRED)
	private String idCard;

	/**
	 * 银行卡号
	 */
	@Schema(title = "银行卡号", requiredMode = Schema.RequiredMode.REQUIRED)
	private String bankCard;

	/**
	 * 手机号
	 */
	@Schema(title = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
	private String phone;

	/**
	 * 微信二维码
	 */
	@Schema(title = "微信二维码")
	private String wechatQr;

	/**
	 * 供应商类型：1_瓜农；2_自家档口；3_其他家档口
	 */
	@Schema(title = "供应商类型：1_瓜农；2_自家档口；3_其他家档口", requiredMode = Schema.RequiredMode.REQUIRED)
	private SupplierTypeEnum type;

	/**
	 * 是否最后一家
	 */
	@Schema(title = "是否最后一家", requiredMode = Schema.RequiredMode.REQUIRED)
	private Boolean isLast;

	/**
	 * 空磅是否包含纸箱
	 */
	@Schema(title = "空磅是否包含纸箱", requiredMode = Schema.RequiredMode.REQUIRED)
	private Boolean isPaper;

	/**
	 * 空车重量(kg)
	 */
	@Schema(title = "空车重量(kg)", requiredMode = Schema.RequiredMode.REQUIRED)
	private BigDecimal emptyWeight;

	/**
	 * 总重量(kg)
	 */
	@Schema(title = "总重量(kg)", requiredMode = Schema.RequiredMode.REQUIRED)
	private BigDecimal totalWeight;

	/**
	 * 毛重(kg)
	 */
	@Schema(title = "毛重(kg)", requiredMode = Schema.RequiredMode.REQUIRED)
	private BigDecimal grossWeight;

	/**
	 * 净重(kg)
	 */
	@Schema(title = "净重(kg)", requiredMode = Schema.RequiredMode.REQUIRED)
	private BigDecimal netWeight;

	/**
	 * 采购单价(元/斤)
	 */
	@Schema(title = "采购单价(元/斤)", requiredMode = Schema.RequiredMode.REQUIRED)
	private BigDecimal purchasePrice;

	/**
	 * 箱子类型
	 */
	@Schema(title = "箱子类型", requiredMode = Schema.RequiredMode.REQUIRED)
	private List<SupplierPackageUsage> packageUsage;

	/**
	 * 装车模式：1_搭架子+网垫；2_纸箱+胶带+木隔板
	 */
	@Schema(title = "装车模式", description = "1_搭架子+网垫；2_纸箱+胶带+木隔板")
	private LoadingModeEnum loadingMode;

	/**
	 * 销售单价(元/斤)
	 */
	@Schema(title = "销售单价(元/斤)", requiredMode = Schema.RequiredMode.REQUIRED)
	private BigDecimal salePrice;

	/**
	 * 报价方式：1_按毛重报价；2_按净重报价；
	 */
	@Schema(title = "报价方式：1_按毛重报价；2_按净重报价；")
	private PurchaseOrderPricingMethodEnum pricingMethod;

	/**
	 * 发票金额
	 */
	@Schema(title = "发票金额", requiredMode = Schema.RequiredMode.REQUIRED)
	private BigDecimal invoiceAmount;

	/**
	 * 空车照片
	 */
	@Schema(title = "空车照片")
	private String emptyWeightImg;

	/**
	 * 满载照片
	 */
	@Schema(title = "满载照片")
	private String totalWeightImg;

	/**
	 * 是否上传票证
	 */
	@Schema(title = "是否上传票证", requiredMode = Schema.RequiredMode.REQUIRED)
	private Boolean invoiceUpload;

	/**
	 * 发票
	 */
	@Schema(title = "发票")
	private List<UploadFileItem> invoiceImg;

	/**
	 * 是否上传合同
	 */
	@Schema(title = "是否上传合同", requiredMode = Schema.RequiredMode.REQUIRED)
	private Boolean contractUpload;

	/**
	 * 合同
	 */
	@Schema(title = "合同")
	private List<UploadFileItem> contractImg;

	/**
	 * 产品ID
	 */
	@Schema(title = "产品ID", type = "string")
	private Long productId;

	/**
	 * 产品名称
	 */
	@Schema(title = "产品名称")
	private String productName;

	/**
	 * 关联费用id
	 */
	@Schema(title = "关联费用id")
	private List<Long> costIds;

	/**
	 * 成本模板
	 */
	@Schema(title = "成本模板")
	private String costTemplate;

	/**
	 * 是否已付定金
	 */
	@Schema(title = "是否已付定金")
	private Boolean isDepositPaid;

	/**
	 * 定金金额
	 */
	@Schema(title = "定金金额")
	private BigDecimal depositAmount;

	/**
	 * 是否付款
	 */
	@Schema(title = "是否付款")
	private Boolean isPaid;

	/**
	 * 采购订单包装箱信息
	 */
	@Schema(title = "采购订单包装箱信息")
	private List<OrderPackage> orderPackageList;

	/**
	 * 采购订单公司信息
	 */
	@Schema(title = "采购订单公司信息")
	private OrderCompany orderCompany;

	/**
	 * 是否选中
	 */
	@Schema(title = "是否选中", requiredMode = Schema.RequiredMode.REQUIRED)
	private Boolean selected;

	/**
	 * 采购订单状态: 0_草稿；1_审核中；2_已完成；3_已驳回；4_已关闭；
	 */
	@Schema(title = "采购订单状态: 0_草稿；1_审核中；2_已完成；3_已驳回；4_已关闭；")
	private PurchaseOrderStateEnum poState;

	/**
	 * 创建时间
	 */
	@Schema(title = "创建时间")
	private LocalDateTime createdAt;
}
