package com.yh.saas.plugin.yiliangyiyun.entity;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;

import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yh.saas.common.support.entity.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 送粮登记管理
 * </p>
 *
 * @author Gdc
 * @since 2021-11-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("grain_delivery_registration")
public class GrainDeliveryRegistration extends BaseModel<GrainDeliveryRegistration> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.UUID)
    private String id;
    /**
     * 公司id
     */
    private String compId;
    /**
     * 用户id
     */
    private String commonId;
    /**
     * 仓库名称
     */
    private String warehouseName;
    /**
     * 有效期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date validityDate;
    /**
     * 货主名
     */
    @TableField(exist = false)
    private String shipperName;
    /**
     * 供应商
     */
    @TableField(exist = false)
    private String supplier;
    /**
     * 车牌号
     */
    @TableField(exist = false)
    private String carNo;

    @TableField(exist = false)
    private List<ShippingInformation> shippingInformationList;

    @TableField(exist = false)
    private ShippingInformation shippingInformation;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
