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 2022-06-02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("expense_allocation_info")
public class ExpenseAllocationInfo extends BaseModel<ExpenseAllocationInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.UUID)
    private String id;
    /**
     * 主表id
     */
    private String infoId;
    /**
     * 入库单id
     */
    private String orderId;
    /**
     * 合同号
     */
    private String contractNo;
    /**
     * 合同号id
     */
    private String contractId;
    /**
     * 费用类型(1粮款5保证金)
     */
    private String costType;
    /**
     * 累计金额
     */
    private Double accumulatedPrepayment;
    /**
     * 收回金额
     */
    private Double recoveryPrepayments;
    /**
     * 费用编号
     */
    private String costNo;
    /**
     * 费用名称
     */
    private String expenseName;
    /**
     * 仓库名称
     */
    private String warehouseName;
    /**
     * 入库单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date receiptDocDate;
    /**
     * 入库重量（吨）
     */
    private Float inWarehouseWeight;
    /**
     * 分配金额
     */
    private Double distributionMoney;
    /**
     * 货名key
     */
    private String goodsNameKey;
    /**
     * 货名
     */
    private String goodsName;
    /**
     * 货源
     */
    private String goodsSource;
    /**
     * 状态
     */
    private String status;
    /**
     * 状态标识
     */
    private String statusFlag;
    /**
     * 分配详情
     */
    @TableField(exist = false)
    private List<ExpenseAllocationInfo> expenseAllocationInfoList;


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

}
