Contract.java 2.94 KB
package vion.model;

import com.baomidou.mybatisplus.annotation.*;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.Data;
import vion.dto.ContractDTO;
import vion.vo.ContractVO;

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


/**
 * 合同
 */
@Data
@TableName(value = "tbl_contract_info")
@AutoMappers({
        @AutoMapper(target = ContractVO.class),
        @AutoMapper(target = ContractDTO.class),
})
public class Contract {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 合同名称
     */
    @TableField(value = "\"name\"")
    private String name;

    /**
     * 合同编号
     */
    @TableField(value = "contract_no")
    private String contractNo;

    /**
     * 合同类型:1-维保合同 2-框架合同 3-集成合同 4-供货合同 5-供货施工合同 0-其他
     */
    @TableField(value = "\"type\"")
    private Integer type;

    /**
     * 合同签订日期
     */
    @TableField(value = "sign_date")
    private Date signDate;

    /**
     * 合同维保开始日期
     */
    @TableField(value = "maintain_sdate")
    private Date maintainSdate;

    /**
     * 合同维保结束日期
     */
    @TableField(value = "maintain_edate")
    private Date maintainEdate;

    /**
     * 合同进度:1-签订 2-发货 3-货到 4-安装 5-验收 6-质保
     */
    @TableField(value = "\"status\"")
    private Integer status;

    /**
     * 合同总金额
     */
    @TableField(value = "total_amount")
    private BigDecimal totalAmount;

    /**
     * 合同已收金额:人工编辑
     */
    @TableField(value = "paid_amount")
    private BigDecimal paidAmount;

    /**
     * 合同应收金额:
     * 根据【合同进度】,由系统判断出应该收到的金额
     */
    @TableField(value = "receivable_amount")
    private BigDecimal receivableAmount;

    /**
     * 合同未收金额:total-(paid+receivable)
     */
    @TableField(value = "outstanding_amount")
    private BigDecimal outstandingAmount;

    /**
     * 合同签订主体
     */
    @TableField(value = "subject")
    private String subject;

    /**
     * 合同甲方名称
     */
    @TableField(value = "customer_name")
    private String customerName;

    /**
     * 销售人员名称
     */
    @TableField(value = "sale_name")
    private String saleName;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 记录创建者
     */
    @TableField(value = "create_user")
    private Long createUser;

    /**
     * 记录最后一次修改者
     */
    @TableField(value = "modify_user")
    private Long modifyUser;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    private Date modifyTime;
}