package com.bs.tm.domain;

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.bs.common.annotation.Excel;
import com.bs.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * 承运订单对象 tm_order
 *
 * @author bs
 * @date 2024-02-07
 */
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tm_order")
@Data
public class TmOrder extends BaseEntity{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Long id;

    /** 订单流水号 */

    @Excel(name = "订单流水号")
    @ApiModelProperty(value = "订单流水号")
    private String orderSeq;

    /** 成单日期 */

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "成单日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "成单日期")
    private Date orderDate;

    @Excel(name = "币种")
    @ApiModelProperty(value = "币种")
    private String currency;

    /** 订单货主 */

    @Excel(name = "订单货主")
    @ApiModelProperty(value = "订单货主")
    private String cargoOwner;

    /** 订单车主 */

    @Excel(name = "订单车主")
    @ApiModelProperty(value = "订单车主")
    private String vehicleOwner;

    @Excel(name = "承运企业Id")
    @ApiModelProperty(value = "承运企业Id")
    private Long custId;

    @Excel(name = "承运企业名称")
    @ApiModelProperty(value = "承运企业名称")
    private String custName;

    /** 是否正本回单 */

    @Excel(name = "是否正本回单")
    @ApiModelProperty(value = "是否正本回单")
    private String isReceipt;

    /** 回单方式 */

    @Excel(name = "回单方式")
    @ApiModelProperty(value = "回单方式")
    private String receiptWay;

    /** 发票类型 */

    @Excel(name = "发票类型")
    @ApiModelProperty(value = "发票类型")
    private String invoiceType;

    /** 开票信息 */

    @Excel(name = "开票信息")
    @ApiModelProperty(value = "开票信息")
    private String invoiceInfo;

    /** 支付方式 */

    @Excel(name = "支付方式")
    @ApiModelProperty(value = "支付方式")
    private String payWay;

    /** 提货方式 */

    @Excel(name = "提货方式")
    @ApiModelProperty(value = "提货方式")
    private String deliveryMethod;

    /** 提货时间 */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "提货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "提货时间")
    private Date deliveryTime;

    /** 送货方式 */

    @Excel(name = "送货方式")
    @ApiModelProperty(value = "送货方式")
    private String deliveryMode;

    @Excel(name = "货物信息")
    @ApiModelProperty(value = "货物信息")
    private String cargoInfo;

    @Excel(name = "来源类型")
    @ApiModelProperty(value = "来源类型")
    private String sourceType;

    @Excel(name = "来源Id")
    @ApiModelProperty(value = "来源Id")
    private Long sourceId;

    @Excel(name = "来源No")
    @ApiModelProperty(value = "来源No")
    private String sourceNo;

    /** 是否保险 */

    @Excel(name = "是否保险")
    @ApiModelProperty(value = "是否保险")
    private String isInsurance;

    /** 保险金额 */

    @Excel(name = "保险金额")
    @ApiModelProperty(value = "保险金额")
    private Long insuranceAmount;

    /** 保险受益人BENEFICIARY */

    @Excel(name = "保险受益人")
    @ApiModelProperty(value = "保险受益人")
    private String beneficiary;

    /** 状态 */

    @Excel(name = "状态")
    @ApiModelProperty(value = "状态")
    private String status;

    /** 备注 */

    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    /** 运价 */

    @Excel(name = "运价")
    @ApiModelProperty(value = "运价")
    private BigDecimal freightRates;

    /** 实际付款 */

    @Excel(name = "实际付款")
    @ApiModelProperty(value = "实际付款")
    private BigDecimal realPayment;

    /** 船舶名称 */

    @Excel(name = "船舶名称")
    @ApiModelProperty(value = "船舶名称")
    private String shipName;

    /** 航次 */

    @Excel(name = "航次")
    @ApiModelProperty(value = "航次")
    private String voyage;

    /** 提单号 */

    @Excel(name = "提单号")
    @ApiModelProperty(value = "提单号")
    private String orderNo;

    /** 作业号 */

    @Excel(name = "作业号")
    @ApiModelProperty(value = "作业号")
    private String jobNo;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    @TableField(exist = false)
    private String keyword;

    @TableField(exist = false)
    private String orderType;

    @TableField(exist = false)
    private String isBalance;


    @TableField(exist = false)
    @ApiModelProperty(value = "订单明细")
    private List<TmOrderCargo> orderCargoList;

    @TableField(exist = false)
    private List<TmVehicle> lsVehicle;

    @TableField(exist = false)
    @ApiModelProperty(value = "货物重量")
    private BigDecimal cargoWt;

    @TableField(exist = false)
    @ApiModelProperty(value = "单次重量")
    private BigDecimal singleWt;

    @TableField(exist = false)
    private BigDecimal trainNumber;

    @TableField(exist = false)
    private Long orderId;

    @TableField(exist = false)
    private List<TmOrderTrans> lsTrans;

    @TableField(exist = false)
    private String totalNet;
}
