package com.xunhong.erp.turbo.biz.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * @author shenyifei
 */
@Data
@TableName(value = "order_supplier", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
public class OrderSupplierDO extends BaseDO<OrderSupplierDO> {

	/**
	 * 记录ID
	 */
	@TableId(value = "order_supplier_id", type = IdType.ASSIGN_ID)
	private Long orderSupplierId;

	/**
	 * 订单ID
	 */
	@TableField(value = "order_id")
	private Long orderId;

	/**
	 * 供应商ID
	 */
	@TableField(value = "supplier_id")
	private Long supplierId;

	/**
	 * 供应商姓名
	 */
	@TableField(value = "name")
	private String name;

	/**
	 * 身份证号
	 */
	@TableField(value = "id_card")
	private String idCard;

	/**
	 * 银行卡号
	 */
	@TableField(value = "bank_card")
	private String bankCard;

	/**
	 * 手机号
	 */
	@TableField(value = "phone")
	private String phone;

	/**
	 * 微信二维码
	 */
	@TableField(value = "wechat_qr")
	private String wechatQr;

	/**
	 * 是否最后一家
	 */
	@TableField(value = "is_last")
	private Boolean isLast;

	/**
	 * 空磅是否包含纸箱
	 */
	@TableField(value = "is_paper")
	private Boolean isPaper;

	/**
	 * 空车重量(kg)
	 */
	@TableField(value = "empty_weight")
	private BigDecimal emptyWeight;

	/**
	 * 总重量(kg)
	 */
	@TableField(value = "total_weight")
	private BigDecimal totalWeight;

	/**
	 * 毛重(kg)
	 */
	@TableField(value = "gross_weight")
	private BigDecimal grossWeight;

	/**
	 * 净重(kg)
	 */
	@TableField(value = "net_weight")
	private BigDecimal netWeight;

	/**
	 * 采购单价(元/斤)
	 */
	@TableField(value = "purchase_price")
	private BigDecimal purchasePrice;

	/**
	 * 销售单价(元/斤)
	 */
	@TableField(value = "sale_price")
	private BigDecimal salePrice;

	/**
	 * 发票金额
	 */
	@TableField(value = "invoice_amount")
	private BigDecimal invoiceAmount;

	/**
	 * 空车照片
	 */
	@TableField(value = "empty_weight_img")
	private String emptyWeightImg;

	/**
	 * 满载照片
	 */
	@TableField(value = "total_weight_img")
	private String totalWeightImg;

	/**
	 * 是否上传票证
	 */
	@TableField(value = "invoice_upload")
	private Boolean invoiceUpload;

	/**
	 * 发票
	 */
	@TableField(value = "invoice_img", typeHandler = JacksonTypeHandler.class)
	private List<String> invoiceImg;

	/**
	 * 是否上传合同
	 */
	@TableField(value = "contract_upload")
	private Boolean contractUpload;

	/**
	 * 合同
	 */
	@TableField(value = "contract_img", typeHandler = JacksonTypeHandler.class)
	private List<String> contractImg;

	/**
	 * 产品ID
	 */
	@TableField(value = "product_id")
	private Long productId;

	/**
	 * 产品名称
	 */
	@TableField(value = "product_name")
	private String productName;

	@TableField(exist = false)
	private List<OrderPackageDO> orderPackageDOList;
}