Contract.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. <?php
  2. class Contract implements JsonSerializable {
  3. private $id; // 合同ID
  4. private $bizId; // 业务ID,一个合同对应一个bizId,不能重复
  5. private $sn; // 合同编号
  6. private $subject; // 合同主题(合同名称)
  7. private $description; // 合同描述
  8. private $tenantName; //
  9. private $status;
  10. private $expireTime; // 合同过期时间;格式为yyyy-MM-dd HH:mm:ss,默认过期时间为业务分类中配置的时间
  11. private $publishTime;
  12. private $endTime;
  13. private $ordinal; // 是否顺序签署;默认为true
  14. private $send; // 是否发起合同
  15. private $category; // 业务分类;默认为“默认业务分类”
  16. private $creator; // 创建人;默认为虚拟用户
  17. private $signatories; // 签署方;签署合同的公司/个人
  18. private $templateParams; // 模板参数,用于文件模板的填参
  19. private $documents; // 合同文档
  20. private $copySendReceivers;
  21. private $comments;
  22. private $invalidReason;
  23. private $tags;
  24. private $signFlowStrategy;
  25. private $actualSponsorName;
  26. private $relatedContractIds;
  27. private $customFields;
  28. public function jsonSerialize() {
  29. $data = [];
  30. foreach ($this as $key=>$val){
  31. if ($val !== null) $data[$key] = $val;
  32. }
  33. if(sizeof($data) < 1){
  34. return null;
  35. }
  36. return $data;
  37. }
  38. /**
  39. * @return mixed
  40. */
  41. public function getId()
  42. {
  43. return $this->id;
  44. }
  45. /**
  46. * @param mixed $id
  47. */
  48. public function setId($id)
  49. {
  50. $this->id = $id;
  51. }
  52. /**
  53. * @return mixed
  54. */
  55. public function getBizId()
  56. {
  57. return $this->bizId;
  58. }
  59. /**
  60. * @param mixed $bizId
  61. */
  62. public function setBizId($bizId)
  63. {
  64. $this->bizId = $bizId;
  65. }
  66. /**
  67. * @return mixed
  68. */
  69. public function getSn()
  70. {
  71. return $this->sn;
  72. }
  73. /**
  74. * @param mixed $sn
  75. */
  76. public function setSn($sn)
  77. {
  78. $this->sn = $sn;
  79. }
  80. /**
  81. * @return mixed
  82. */
  83. public function getSubject()
  84. {
  85. return $this->subject;
  86. }
  87. /**
  88. * @param mixed $subject
  89. */
  90. public function setSubject($subject)
  91. {
  92. $this->subject = $subject;
  93. }
  94. /**
  95. * @return mixed
  96. */
  97. public function getDescription()
  98. {
  99. return $this->description;
  100. }
  101. /**
  102. * @param mixed $description
  103. */
  104. public function setDescription($description)
  105. {
  106. $this->description = $description;
  107. }
  108. /**
  109. * @return mixed
  110. */
  111. public function getExpireTime()
  112. {
  113. return $this->expireTime;
  114. }
  115. /**
  116. * @param mixed $expireTime
  117. */
  118. public function setExpireTime($expireTime)
  119. {
  120. $this->expireTime = $expireTime;
  121. }
  122. /**
  123. * @return mixed
  124. */
  125. public function getTenantName()
  126. {
  127. return $this->tenantName;
  128. }
  129. /**
  130. * @param mixed $tenantName
  131. */
  132. public function setTenantName($tenantName)
  133. {
  134. $this->tenantName = $tenantName;
  135. }
  136. /**
  137. * @return mixed
  138. */
  139. public function getOrdinal()
  140. {
  141. return $this->ordinal;
  142. }
  143. /**
  144. * @param mixed $ordinal
  145. */
  146. public function setOrdinal($ordinal)
  147. {
  148. $this->ordinal = $ordinal;
  149. }
  150. /**
  151. * @return mixed
  152. */
  153. public function getSend()
  154. {
  155. return $this->send;
  156. }
  157. /**
  158. * @param mixed $send
  159. */
  160. public function setSend($send)
  161. {
  162. $this->send = $send;
  163. }
  164. /**
  165. * @return mixed
  166. */
  167. public function getCategory()
  168. {
  169. return $this->category;
  170. }
  171. /**
  172. * @param mixed $category
  173. */
  174. public function setCategory($category)
  175. {
  176. $this->category = $category;
  177. }
  178. /**
  179. * @return mixed
  180. */
  181. public function getCreator()
  182. {
  183. return $this->creator;
  184. }
  185. /**
  186. * @param mixed $creator
  187. */
  188. public function setCreator($creator)
  189. {
  190. $this->creator = $creator;
  191. }
  192. /**
  193. * @return mixed
  194. */
  195. public function getSignatories()
  196. {
  197. return $this->signatories;
  198. }
  199. /**
  200. * @param mixed $signatories
  201. */
  202. public function setSignatories($signatories)
  203. {
  204. $this->signatories = $signatories;
  205. }
  206. /**
  207. * @return mixed
  208. */
  209. public function getTemplateParams()
  210. {
  211. return $this->templateParams;
  212. }
  213. /**
  214. * @param mixed $templateParams
  215. */
  216. public function setTemplateParams($templateParams)
  217. {
  218. $this->templateParams = $templateParams;
  219. }
  220. /**
  221. * @return mixed
  222. */
  223. public function getDocuments()
  224. {
  225. return $this->documents;
  226. }
  227. /**
  228. * @param mixed $documents
  229. */
  230. public function setDocuments($documents)
  231. {
  232. $this->documents = $documents;
  233. }
  234. /**
  235. * @return mixed
  236. */
  237. public function getStatus()
  238. {
  239. return $this->status;
  240. }
  241. /**
  242. * @param mixed $status
  243. */
  244. public function setStatus($status)
  245. {
  246. $this->status = $status;
  247. }
  248. /**
  249. * @return mixed
  250. */
  251. public function getPublishTime()
  252. {
  253. return $this->publishTime;
  254. }
  255. /**
  256. * @param mixed $publishTime
  257. */
  258. public function setPublishTime($publishTime)
  259. {
  260. $this->publishTime = $publishTime;
  261. }
  262. /**
  263. * @return mixed
  264. */
  265. public function getEndTime()
  266. {
  267. return $this->endTime;
  268. }
  269. /**
  270. * @param mixed $endTime
  271. */
  272. public function setEndTime($endTime)
  273. {
  274. $this->endTime = $endTime;
  275. }
  276. /**
  277. * @return mixed
  278. */
  279. public function getCopySendReceivers()
  280. {
  281. return $this->copySendReceivers;
  282. }
  283. /**
  284. * @param mixed $copySendReceivers
  285. */
  286. public function setCopySendReceivers($copySendReceivers)
  287. {
  288. $this->copySendReceivers = $copySendReceivers;
  289. }
  290. /**
  291. * @return mixed
  292. */
  293. public function getComments()
  294. {
  295. return $this->comments;
  296. }
  297. /**
  298. * @param mixed $comments
  299. */
  300. public function setComments($comments)
  301. {
  302. $this->comments = $comments;
  303. }
  304. /**
  305. * @return mixed
  306. */
  307. public function getInvalidReason()
  308. {
  309. return $this->invalidReason;
  310. }
  311. /**
  312. * @param mixed $invalidReason
  313. */
  314. public function setInvalidReason($invalidReason)
  315. {
  316. $this->invalidReason = $invalidReason;
  317. }
  318. /**
  319. * @return mixed
  320. */
  321. public function getTags()
  322. {
  323. return $this->tags;
  324. }
  325. /**
  326. * @param mixed $tags
  327. */
  328. public function setTags($tags)
  329. {
  330. $this->tags = $tags;
  331. }
  332. /**
  333. * @return mixed
  334. */
  335. public function getSignFlowStrategy()
  336. {
  337. return $this->signFlowStrategy;
  338. }
  339. /**
  340. * @param mixed $signFlowStrategy
  341. */
  342. public function setSignFlowStrategy($signFlowStrategy)
  343. {
  344. $this->signFlowStrategy = $signFlowStrategy;
  345. }
  346. /**
  347. * @return mixed
  348. */
  349. public function getActualSponsorName()
  350. {
  351. return $this->actualSponsorName;
  352. }
  353. /**
  354. * @param mixed $actualSponsorName
  355. */
  356. public function setActualSponsorName($actualSponsorName)
  357. {
  358. $this->actualSponsorName = $actualSponsorName;
  359. }
  360. /**
  361. * @return mixed
  362. */
  363. public function getRelatedContractIds()
  364. {
  365. return $this->relatedContractIds;
  366. }
  367. /**
  368. * @param mixed $relatedContractIds
  369. */
  370. public function setRelatedContractIds($relatedContractIds)
  371. {
  372. $this->relatedContractIds = $relatedContractIds;
  373. }
  374. /**
  375. * @return mixed
  376. */
  377. public function getCustomFields()
  378. {
  379. return $this->customFields;
  380. }
  381. /**
  382. * @param mixed $customFields
  383. */
  384. public function setCustomFields($customFields)
  385. {
  386. $this->customFields = $customFields;
  387. }
  388. }