CrmQuote.java 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. package org.dromara.crm.domain;
  2. import com.baomidou.mybatisplus.annotation.*;
  3. import lombok.Data;
  4. import lombok.EqualsAndHashCode;
  5. import org.dromara.common.tenant.core.TenantEntity;
  6. import java.io.Serial;
  7. import java.math.BigDecimal;
  8. import java.time.LocalDate;
  9. import java.time.LocalDateTime;
  10. /**
  11. * 报价单对象 crm_quote
  12. *
  13. * @author 系统管理员
  14. * @date 2025-01-03
  15. */
  16. @Data
  17. @EqualsAndHashCode(callSuper = true)
  18. @TableName("crm_quote")
  19. public class CrmQuote extends TenantEntity {
  20. @Serial
  21. private static final long serialVersionUID = 1L;
  22. /**
  23. * 主键ID
  24. */
  25. @TableId(value = "id")
  26. private Long id;
  27. /**
  28. * 报价单编号(SXDD-yyyyMMdd+3位流水号,如:SXDD-20250922001)
  29. */
  30. private String quoteNo;
  31. /**
  32. * 报价单标题
  33. */
  34. private String quoteTitle;
  35. /**
  36. * 报价单类型(sales-销售/purchase-采购)
  37. */
  38. private String quoteType;
  39. /**
  40. * 客户ID
  41. */
  42. private Long customerId;
  43. /**
  44. * 客户名称(冗余字段)
  45. */
  46. private String customerName;
  47. /**
  48. * 商机ID
  49. */
  50. private Long opportunityId;
  51. /**
  52. * 联系人ID
  53. */
  54. private Long contactId;
  55. /**
  56. * 联系人姓名(冗余字段)
  57. */
  58. private String contactName;
  59. /**
  60. * 联系人手机(冗余字段)
  61. */
  62. private String contactMobile;
  63. /**
  64. * 联系人邮箱(冗余字段)
  65. */
  66. private String contactEmail;
  67. /**
  68. * 版本号(如V1.0,V1.1,V2.0)
  69. */
  70. private String version;
  71. /**
  72. * 父版本ID(版本管理,0表示首版)
  73. */
  74. private Long parentId;
  75. /**
  76. * 是否最新版本(0否 1是)
  77. */
  78. private Integer isLatest;
  79. /**
  80. * 总金额(未折扣前)
  81. */
  82. private BigDecimal totalAmount;
  83. /**
  84. * 整单折扣率(百分比)
  85. */
  86. private BigDecimal discountRate;
  87. /**
  88. * 折扣金额
  89. */
  90. private BigDecimal discountAmount;
  91. /**
  92. * 最终金额(折扣后)
  93. */
  94. private BigDecimal finalAmount;
  95. /**
  96. * 有效期(天数)
  97. */
  98. private Integer validityDays;
  99. /**
  100. * 报价日期
  101. */
  102. private LocalDate quoteDate;
  103. /**
  104. * 到期日期
  105. */
  106. private LocalDate expireDate;
  107. /**
  108. * 状态(draft-草稿/submitted-已提交/accepted-已接受/rejected-已拒绝/expired-已过期/contract-已转合同)
  109. */
  110. private String status;
  111. /**
  112. * 拒绝原因
  113. */
  114. private String rejectReason;
  115. /**
  116. * PDF文件路径
  117. */
  118. private String pdfUrl;
  119. /**
  120. * PDF是否已生成(0否 1是)
  121. */
  122. private Integer pdfGenerated;
  123. /**
  124. * 分享链接
  125. */
  126. private String shareLink;
  127. /**
  128. * 分享码
  129. */
  130. private String shareCode;
  131. /**
  132. * 分享密码(可选)
  133. */
  134. private String sharePassword;
  135. /**
  136. * 分享链接过期时间
  137. */
  138. private LocalDateTime shareExpireTime;
  139. /**
  140. * 查看次数
  141. */
  142. private Integer viewCount;
  143. /**
  144. * 最后查看时间
  145. */
  146. private LocalDateTime lastViewTime;
  147. /**
  148. * 负责人ID
  149. */
  150. private Long ownerUserId;
  151. /**
  152. * 负责人姓名(冗余字段)
  153. */
  154. private String ownerUserName;
  155. /**
  156. * 报价主体ID(关联crm_supplier_info表)
  157. */
  158. private Long supplierId;
  159. /**
  160. * 报价主体名称(冗余字段)
  161. */
  162. private String supplierName;
  163. /**
  164. * 关联合同ID(转合同后)
  165. */
  166. private Long contractId;
  167. /**
  168. * 付款条款
  169. */
  170. private String paymentTerms;
  171. /**
  172. * 交付条款
  173. */
  174. private String deliveryTerms;
  175. /**
  176. * 运费(元)
  177. */
  178. private BigDecimal freight;
  179. /**
  180. * 附件(多个用逗号分隔)
  181. */
  182. private String attachments;
  183. /**
  184. * 报价单模板内容(富文本HTML)
  185. */
  186. private String templateContent;
  187. /**
  188. * 逻辑删除标志(0存在 1删除)
  189. */
  190. @TableLogic
  191. private Integer delFlag;
  192. /**
  193. * 版本号(乐观锁)
  194. */
  195. @Version
  196. private Integer versionNo;
  197. /**
  198. * 备注
  199. */
  200. private String remark;
  201. }