package cn.iocoder.yudao.module.crm.dal.dataobject.contract;
|
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO;
|
import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO;
|
import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO;
|
import cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum;
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
import lombok.*;
|
|
import java.math.BigDecimal;
|
import java.time.LocalDateTime;
|
|
/**
|
* CRM 合同 DO
|
*
|
* @author dhb52
|
*/
|
@TableName("crm_contract")
|
@KeySequence("crm_contract_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
@Data
|
@EqualsAndHashCode(callSuper = true)
|
@ToString(callSuper = true)
|
@Builder
|
@NoArgsConstructor
|
@AllArgsConstructor
|
public class CrmContractDO extends BaseDO {
|
|
/**
|
* 合同编号
|
*/
|
@TableId
|
private Long id;
|
/**
|
* 合同名称
|
*/
|
private String name;
|
/**
|
* 合同编号
|
*/
|
private String no;
|
/**
|
* 客户编号
|
*
|
* 关联 {@link CrmCustomerDO#getId()}
|
*/
|
private Long customerId;
|
/**
|
* 商机编号,非必须
|
*
|
* 关联 {@link CrmBusinessDO#getId()}
|
*/
|
private Long businessId;
|
|
/**
|
* 最后跟进时间
|
*/
|
private LocalDateTime contactLastTime;
|
|
/**
|
* 负责人的用户编号
|
*
|
* 关联 AdminUserDO 的 id 字段
|
*/
|
private Long ownerUserId;
|
|
/**
|
* 审批状态
|
*
|
* 由业务流程驱动,不接受前端直接赋值:创建时固定为未提交,提交审批后置为审批中,
|
* 审核通过 / 不通过由 {@link cn.iocoder.yudao.module.crm.service.contract.CrmContractService#auditContract} 推进。
|
*
|
* 枚举 {@link CrmAuditStatusEnum}
|
*/
|
private Integer auditStatus;
|
/**
|
* 审核人用户编号(提交审批时由提交人从系统用户中选择)
|
*
|
* 只有该用户能在列表页看到「审核」按钮并执行审核操作。
|
* 关联 AdminUserDO 的 id 字段
|
*/
|
private Long reviewerId;
|
/**
|
* 审核人姓名(提交审批时冗余记录,避免列表展示时再查用户)
|
*/
|
private String reviewerName;
|
/**
|
* 审核时间
|
*/
|
private LocalDateTime reviewTime;
|
/**
|
* 审核意见(审核通过时的意见 / 审核不通过时的原因)
|
*/
|
private String reviewRemark;
|
|
/**
|
* 下单日期
|
*/
|
private LocalDateTime orderDate;
|
/**
|
* 开始时间
|
*/
|
private LocalDateTime startTime;
|
/**
|
* 结束时间
|
*/
|
private LocalDateTime endTime;
|
/**
|
* 产品总金额,单位:元
|
*/
|
private BigDecimal totalProductPrice;
|
/**
|
* 整单折扣
|
*/
|
private BigDecimal discountPercent;
|
/**
|
* 合同总金额,单位:分
|
*/
|
private BigDecimal totalPrice;
|
/**
|
* 定金金额,单位:元
|
*/
|
private BigDecimal depositPrice;
|
/**
|
* 关联 ERP 销售订单编号
|
*/
|
private Long orderId;
|
/**
|
* ERP 销售订单单号
|
*/
|
private String orderNo;
|
/**
|
* 客户签约人,非必须
|
*
|
* 关联 {@link CrmContactDO#getId()}
|
*/
|
private Long signContactId;
|
/**
|
* 公司签约人,非必须
|
*
|
* 关联 AdminUserDO 的 id 字段
|
*/
|
private Long signUserId;
|
/**
|
* 备注
|
*/
|
private String remark;
|
|
/**
|
* 合同类型(电力CRM扩展)
|
*
|
* 字典 crm_contract_type:power=供用电合同 / energy=能源服务合同 / resident=居配合同 / solar=光伏合同
|
*/
|
private String contractType;
|
/**
|
* 电压等级
|
*
|
* 字典 crm_voltage_level
|
*/
|
private String voltageLevel;
|
/**
|
* 用电类型
|
*
|
* 字典 crm_electricity_type
|
*/
|
private String electricityType;
|
/**
|
* 合同容量(kVA)
|
*/
|
private BigDecimal contractCapacity;
|
/**
|
* 电价模式
|
*
|
* 字典 crm_tariff_mode
|
*/
|
private String tariffMode;
|
/**
|
* 计量方式
|
*
|
* 字典 crm_meter_mode
|
*/
|
private String meterMode;
|
/**
|
* 缴费周期(月)
|
*/
|
private Integer payCycle;
|
|
}
|