expense_model.dart 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. import '../../shared/models/approval_status.dart';
  2. /// 费用报销主表,对应 [Expense] 表。
  3. class ExpenseModel {
  4. final String id;
  5. final String expenseNo;
  6. final DateTime? expenseDate;
  7. final String applicantId;
  8. final String applicantName;
  9. final String deptId;
  10. final String deptName;
  11. final String currencyCode;
  12. final bool isGenerateVoucher;
  13. final String voucherNo;
  14. final double approvedAmount;
  15. final double totalAmount;
  16. final double totalAmtnSh;
  17. final String purpose;
  18. final String remark;
  19. final String paymentMethod;
  20. final bool isInvoiceVerified;
  21. final bool isTaxIdMatched;
  22. final bool isCategoryCompliant;
  23. final String bankTransferNo;
  24. final String paymentStatus;
  25. final String status;
  26. final String approvalInstanceId;
  27. final String previousInstanceIds;
  28. final DateTime? effectiveDate;
  29. final String auditorId;
  30. final int version;
  31. final DateTime createTime;
  32. final DateTime updateTime;
  33. final bool isDeleted;
  34. final int isTransferred;
  35. final int isClosed;
  36. // ── 瞬态字段(API 从 ERP 实时查询,非存储) ──
  37. final String currentApproverId;
  38. final List<String> approvalChain;
  39. final List<ApprovalRecord> approvalRecords;
  40. // ── 子表 ──
  41. final List<ExpenseDetailModel> details;
  42. final List<String> attachments;
  43. const ExpenseModel({
  44. required this.id,
  45. required this.expenseNo,
  46. this.expenseDate,
  47. this.applicantId = '',
  48. this.applicantName = '',
  49. this.deptId = '',
  50. this.deptName = '',
  51. this.currencyCode = '',
  52. this.isGenerateVoucher = true,
  53. this.voucherNo = '',
  54. this.approvedAmount = 0.0,
  55. this.totalAmount = 0.0,
  56. this.totalAmtnSh = 0.0,
  57. this.purpose = '',
  58. this.remark = '',
  59. this.paymentMethod = '',
  60. this.isInvoiceVerified = false,
  61. this.isTaxIdMatched = false,
  62. this.isCategoryCompliant = false,
  63. this.bankTransferNo = '',
  64. this.paymentStatus = 'unpaid',
  65. this.status = 'draft',
  66. this.approvalInstanceId = '',
  67. this.previousInstanceIds = '',
  68. this.effectiveDate,
  69. this.auditorId = '',
  70. this.version = 1,
  71. required this.createTime,
  72. required this.updateTime,
  73. this.isDeleted = false,
  74. this.isTransferred = 0,
  75. this.isClosed = 0,
  76. this.currentApproverId = '',
  77. this.approvalChain = const [],
  78. this.approvalRecords = const [],
  79. this.details = const [],
  80. this.attachments = const [],
  81. });
  82. factory ExpenseModel.fromJson(Map<String, dynamic> json) {
  83. return ExpenseModel(
  84. id: json['id'] as String? ?? '',
  85. expenseNo: json['expenseNo'] as String? ?? '',
  86. expenseDate: json['expenseDate'] != null
  87. ? DateTime.parse(json['expenseDate'] as String)
  88. : null,
  89. applicantId: json['usrNo'] as String? ?? '',
  90. applicantName:
  91. json['applicantName'] as String? ?? json['usrNo'] as String? ?? '',
  92. deptId: json['dept'] as String? ?? '',
  93. deptName: json['deptName'] as String? ?? json['dept'] as String? ?? '',
  94. currencyCode: json['curId'] as String? ?? '',
  95. isGenerateVoucher: (json['vohId'] as String?) == 'T',
  96. voucherNo: json['vohNo'] as String? ?? '',
  97. approvedAmount: (json['approvedAmount'] as num?)?.toDouble() ?? 0.0,
  98. totalAmount: (json['totalAmount'] as num?)?.toDouble() ?? 0.0,
  99. totalAmtnSh: (json['totalAmtnSh'] as num?)?.toDouble() ?? 0.0,
  100. purpose: json['reason'] as String? ?? json['purpose'] as String? ?? '',
  101. remark: json['rem'] as String? ?? '',
  102. paymentMethod: json['payId'] as String? ?? '',
  103. isInvoiceVerified: json['isInvoiceVerified'] as bool? ?? false,
  104. isTaxIdMatched: json['isTaxIdMatched'] as bool? ?? false,
  105. isCategoryCompliant: json['isCategoryCompliant'] as bool? ?? false,
  106. bankTransferNo: json['bankTransferNo'] as String? ?? '',
  107. paymentStatus: json['paymentStatus'] as String? ?? 'unpaid',
  108. status: json['clsDate'] != null
  109. ? 'closed'
  110. : (json['status'] as String? ?? 'draft'),
  111. approvalInstanceId: json['approvalInstanceId'] as String? ?? '',
  112. previousInstanceIds: json['previousInstanceIds'] as String? ?? '',
  113. effectiveDate: json['effDd'] != null
  114. ? DateTime.parse(json['effDd'] as String)
  115. : null,
  116. auditorId: json['chkMan'] as String? ?? '',
  117. version: json['version'] as int? ?? 1,
  118. createTime: json['createTime'] != null
  119. ? DateTime.parse(json['createTime'] as String)
  120. : DateTime.now(),
  121. updateTime: json['updateTime'] != null
  122. ? DateTime.parse(json['updateTime'] as String)
  123. : DateTime.now(),
  124. isDeleted: json['isDeleted'] as bool? ?? false,
  125. isTransferred: json['isTransferred'] as int? ?? 0,
  126. isClosed: json['isClosed'] as int? ?? 0,
  127. currentApproverId: json['currentApproverId'] as String? ?? '',
  128. approvalChain:
  129. (json['approvalChain'] as List<dynamic>?)
  130. ?.map((e) => e as String)
  131. .toList() ??
  132. [],
  133. approvalRecords:
  134. (json['approvalRecords'] as List<dynamic>?)
  135. ?.map((e) => ApprovalRecord.fromJson(e as Map<String, dynamic>))
  136. .toList() ??
  137. [],
  138. details:
  139. (json['details'] as List<dynamic>?)
  140. ?.map(
  141. (e) => ExpenseDetailModel.fromJson(e as Map<String, dynamic>),
  142. )
  143. .toList() ??
  144. [],
  145. attachments:
  146. (json['attachments'] as List<dynamic>?)
  147. ?.map((e) => e as String)
  148. .toList() ??
  149. [],
  150. );
  151. }
  152. Map<String, dynamic> toJson() => {
  153. 'id': id,
  154. 'expenseNo': expenseNo,
  155. 'expenseDate': expenseDate?.toIso8601String(),
  156. 'applicantId': applicantId,
  157. 'applicantName': applicantName,
  158. 'deptId': deptId,
  159. 'deptName': deptName,
  160. 'currencyCode': currencyCode,
  161. 'isGenerateVoucher': isGenerateVoucher,
  162. 'voucherNo': voucherNo,
  163. 'approvedAmount': approvedAmount,
  164. 'totalAmount': totalAmount,
  165. 'totalAmtnSh': totalAmtnSh,
  166. 'purpose': purpose,
  167. 'remark': remark,
  168. 'paymentMethod': paymentMethod,
  169. 'isInvoiceVerified': isInvoiceVerified,
  170. 'isTaxIdMatched': isTaxIdMatched,
  171. 'isCategoryCompliant': isCategoryCompliant,
  172. 'bankTransferNo': bankTransferNo,
  173. 'paymentStatus': paymentStatus,
  174. 'status': status,
  175. 'approvalInstanceId': approvalInstanceId,
  176. 'previousInstanceIds': previousInstanceIds,
  177. 'effectiveDate': effectiveDate?.toIso8601String(),
  178. 'auditorId': auditorId,
  179. 'version': version,
  180. 'createTime': createTime.toIso8601String(),
  181. 'updateTime': updateTime.toIso8601String(),
  182. 'isDeleted': isDeleted,
  183. 'isTransferred': isTransferred,
  184. 'isClosed': isClosed,
  185. 'currentApproverId': currentApproverId,
  186. 'approvalChain': approvalChain,
  187. 'approvalRecords': approvalRecords.map((r) => r.toJson()).toList(),
  188. 'details': details.map((d) => d.toJson()).toList(),
  189. 'attachments': attachments,
  190. };
  191. ExpenseModel copyWith({
  192. String? id,
  193. String? expenseNo,
  194. DateTime? expenseDate,
  195. String? applicantId,
  196. String? applicantName,
  197. String? deptId,
  198. String? deptName,
  199. String? currencyCode,
  200. bool? isGenerateVoucher,
  201. String? voucherNo,
  202. double? approvedAmount,
  203. double? totalAmount,
  204. double? totalAmtnSh,
  205. String? purpose,
  206. String? remark,
  207. String? paymentMethod,
  208. bool? isInvoiceVerified,
  209. bool? isTaxIdMatched,
  210. bool? isCategoryCompliant,
  211. String? bankTransferNo,
  212. String? paymentStatus,
  213. String? status,
  214. String? approvalInstanceId,
  215. String? previousInstanceIds,
  216. DateTime? effectiveDate,
  217. String? auditorId,
  218. int? version,
  219. DateTime? createTime,
  220. DateTime? updateTime,
  221. bool? isDeleted,
  222. int? isTransferred,
  223. int? isClosed,
  224. String? currentApproverId,
  225. List<String>? approvalChain,
  226. List<ApprovalRecord>? approvalRecords,
  227. List<ExpenseDetailModel>? details,
  228. List<String>? attachments,
  229. }) {
  230. return ExpenseModel(
  231. id: id ?? this.id,
  232. expenseNo: expenseNo ?? this.expenseNo,
  233. expenseDate: expenseDate ?? this.expenseDate,
  234. applicantId: applicantId ?? this.applicantId,
  235. applicantName: applicantName ?? this.applicantName,
  236. deptId: deptId ?? this.deptId,
  237. deptName: deptName ?? this.deptName,
  238. currencyCode: currencyCode ?? this.currencyCode,
  239. isGenerateVoucher: isGenerateVoucher ?? this.isGenerateVoucher,
  240. voucherNo: voucherNo ?? this.voucherNo,
  241. approvedAmount: approvedAmount ?? this.approvedAmount,
  242. totalAmount: totalAmount ?? this.totalAmount,
  243. totalAmtnSh: totalAmtnSh ?? this.totalAmtnSh,
  244. purpose: purpose ?? this.purpose,
  245. remark: remark ?? this.remark,
  246. paymentMethod: paymentMethod ?? this.paymentMethod,
  247. isInvoiceVerified: isInvoiceVerified ?? this.isInvoiceVerified,
  248. isTaxIdMatched: isTaxIdMatched ?? this.isTaxIdMatched,
  249. isCategoryCompliant: isCategoryCompliant ?? this.isCategoryCompliant,
  250. bankTransferNo: bankTransferNo ?? this.bankTransferNo,
  251. paymentStatus: paymentStatus ?? this.paymentStatus,
  252. status: status ?? this.status,
  253. approvalInstanceId: approvalInstanceId ?? this.approvalInstanceId,
  254. previousInstanceIds: previousInstanceIds ?? this.previousInstanceIds,
  255. effectiveDate: effectiveDate ?? this.effectiveDate,
  256. auditorId: auditorId ?? this.auditorId,
  257. version: version ?? this.version,
  258. createTime: createTime ?? this.createTime,
  259. updateTime: updateTime ?? this.updateTime,
  260. isDeleted: isDeleted ?? this.isDeleted,
  261. isTransferred: isTransferred ?? this.isTransferred,
  262. isClosed: isClosed ?? this.isClosed,
  263. currentApproverId: currentApproverId ?? this.currentApproverId,
  264. approvalChain: approvalChain ?? this.approvalChain,
  265. approvalRecords: approvalRecords ?? this.approvalRecords,
  266. details: details ?? this.details,
  267. attachments: attachments ?? this.attachments,
  268. );
  269. }
  270. }
  271. /// 费用报销明细,对应 [ExpenseDetail] 表。
  272. class ExpenseDetailModel {
  273. final String id;
  274. final String expenseId;
  275. final String expenseApplyId;
  276. final String expenseApplyNo;
  277. final DateTime? expenseApplyDate;
  278. final String expenseCategory;
  279. final String categoryName;
  280. final String priority;
  281. final String purpose;
  282. final String projectId;
  283. final String projectName;
  284. final String costDeptId;
  285. final String costDeptName;
  286. final String acctSubjectId;
  287. final String acctSubjectName;
  288. final double amount;
  289. final double taxRate;
  290. final double taxAmount;
  291. final double totalAmount;
  292. final String currencyCode;
  293. final double exchangeRate;
  294. final double baseAmount;
  295. final double approvedAmount;
  296. final String customerVendorId;
  297. final String customerVendorName;
  298. final double offsetAmount;
  299. final String bankName;
  300. final String bankAccountName;
  301. final String bankAccount;
  302. final String sqMan;
  303. final String sqManName;
  304. final String aeNo;
  305. final String aeDd;
  306. final String remark;
  307. final int? preItm;
  308. final int sortOrder;
  309. final List<String> attachments;
  310. final DateTime createTime;
  311. final DateTime updateTime;
  312. final bool isDeleted;
  313. const ExpenseDetailModel({
  314. required this.id,
  315. required this.expenseId,
  316. this.expenseApplyId = '',
  317. this.expenseApplyNo = '',
  318. this.expenseApplyDate,
  319. this.expenseCategory = '',
  320. this.categoryName = '',
  321. this.priority = '1',
  322. this.purpose = '',
  323. this.projectId = '',
  324. this.projectName = '',
  325. this.costDeptId = '',
  326. this.costDeptName = '',
  327. this.acctSubjectId = '',
  328. this.acctSubjectName = '',
  329. required this.amount,
  330. this.taxRate = 0,
  331. this.taxAmount = 0.0,
  332. required this.totalAmount,
  333. this.currencyCode = '',
  334. this.exchangeRate = 1.0,
  335. this.baseAmount = 0.0,
  336. this.approvedAmount = 0.0,
  337. this.customerVendorId = '',
  338. this.customerVendorName = '',
  339. this.offsetAmount = 0.0,
  340. this.bankName = '',
  341. this.bankAccountName = '',
  342. this.bankAccount = '',
  343. this.sqMan = '',
  344. this.sqManName = '',
  345. this.aeNo = '',
  346. this.aeDd = '',
  347. this.remark = '',
  348. this.preItm,
  349. this.sortOrder = 1,
  350. this.attachments = const [],
  351. required this.createTime,
  352. required this.updateTime,
  353. this.isDeleted = false,
  354. });
  355. factory ExpenseDetailModel.fromJson(Map<String, dynamic> json) {
  356. return ExpenseDetailModel(
  357. id: json['id'] as String? ?? '',
  358. expenseId: json['expenseId'] as String? ?? '',
  359. expenseApplyId: json['aeNo'] as String? ?? '',
  360. expenseApplyNo: json['aeNo'] as String? ?? '',
  361. expenseApplyDate: json['aeDd'] != null
  362. ? DateTime.parse(json['aeDd'] as String)
  363. : null,
  364. expenseCategory:
  365. json['idxNo'] as String? ?? json['expenseCategory'] as String? ?? '',
  366. categoryName:
  367. json['idxName'] as String? ?? json['categoryName'] as String? ?? '',
  368. priority: json['priority'] as String? ?? '1',
  369. purpose: json['purpose'] as String? ?? '',
  370. projectId: json['objNo'] as String? ?? '',
  371. projectName:
  372. json['objName'] as String? ?? json['projectName'] as String? ?? '',
  373. costDeptId: json['dep'] as String? ?? '',
  374. costDeptName: json['depName'] as String? ?? json['dep'] as String? ?? '',
  375. acctSubjectId: json['accNo'] as String? ?? '',
  376. acctSubjectName: json['accName'] as String? ?? '',
  377. amount:
  378. (json['amount'] as num?)?.toDouble() ??
  379. (json['amtn'] as num?)?.toDouble() ??
  380. 0.0,
  381. taxRate:
  382. (json['taxRate'] as num?)?.toDouble() ??
  383. (json['taxRto'] as num?)?.toDouble() ??
  384. 0.0,
  385. taxAmount:
  386. (json['taxAmount'] as num?)?.toDouble() ??
  387. (json['tax'] as num?)?.toDouble() ??
  388. 0.0,
  389. totalAmount:
  390. (json['totalAmount'] as num?)?.toDouble() ??
  391. (json['amt'] as num?)?.toDouble() ??
  392. 0.0,
  393. currencyCode: json['currencyCode'] as String? ?? '',
  394. exchangeRate: (json['exchangeRate'] as num?)?.toDouble() ?? 1.0,
  395. baseAmount: (json['baseAmount'] as num?)?.toDouble() ?? 0.0,
  396. approvedAmount: (json['approvedAmount'] as num?)?.toDouble() ?? 0.0,
  397. customerVendorId: json['cust'] as String? ?? '',
  398. customerVendorName: json['custName'] as String? ?? '',
  399. offsetAmount: (json['offsetAmount'] as num?)?.toDouble() ?? 0.0,
  400. bankName: json['bankName'] as String? ?? '',
  401. bankAccountName: json['bankAccountName'] as String? ?? '',
  402. bankAccount: json['bankAccount'] as String? ?? '',
  403. sqMan: json['sqMan'] as String? ?? '',
  404. sqManName:
  405. json['sqName'] as String? ??
  406. json['sqManName'] as String? ??
  407. json['sqMan'] as String? ??
  408. '',
  409. aeNo: json['aeNo'] as String? ?? '',
  410. aeDd: json['aeDd'] as String? ?? '',
  411. remark: json['rem'] as String? ?? '',
  412. preItm: json['preItm'] as int?,
  413. sortOrder: json['itm'] as int? ?? 1,
  414. attachments:
  415. (json['attachments'] as List<dynamic>?)
  416. ?.map((e) => e as String)
  417. .toList() ??
  418. [],
  419. createTime: json['createTime'] != null
  420. ? DateTime.parse(json['createTime'] as String)
  421. : DateTime.now(),
  422. updateTime: json['updateTime'] != null
  423. ? DateTime.parse(json['updateTime'] as String)
  424. : DateTime.now(),
  425. isDeleted: json['isDeleted'] as bool? ?? false,
  426. );
  427. }
  428. Map<String, dynamic> toJson() => {
  429. 'id': id,
  430. 'expenseId': expenseId,
  431. 'expenseApplyId': expenseApplyId,
  432. 'expenseApplyNo': expenseApplyNo,
  433. 'expenseApplyDate': expenseApplyDate?.toIso8601String(),
  434. 'expenseCategory': expenseCategory,
  435. 'categoryName': categoryName,
  436. 'priority': priority,
  437. 'purpose': purpose,
  438. 'projectId': projectId,
  439. 'projectName': projectName,
  440. 'costDeptId': costDeptId,
  441. 'costDeptName': costDeptName,
  442. 'acctSubjectId': acctSubjectId,
  443. 'acctSubjectName': acctSubjectName,
  444. 'amount': amount,
  445. 'taxRate': taxRate,
  446. 'taxAmount': taxAmount,
  447. 'totalAmount': totalAmount,
  448. 'currencyCode': currencyCode,
  449. 'exchangeRate': exchangeRate,
  450. 'baseAmount': baseAmount,
  451. 'approvedAmount': approvedAmount,
  452. 'customerVendorId': customerVendorId,
  453. 'customerVendorName': customerVendorName,
  454. 'offsetAmount': offsetAmount,
  455. 'bankName': bankName,
  456. 'bankAccountName': bankAccountName,
  457. 'bankAccount': bankAccount,
  458. 'sqMan': sqMan,
  459. 'sqManName': sqManName,
  460. 'aeNo': aeNo,
  461. 'aeDd': aeDd,
  462. 'remark': remark,
  463. 'preItm': preItm,
  464. 'sortOrder': sortOrder,
  465. 'attachments': attachments,
  466. 'createTime': createTime.toIso8601String(),
  467. 'updateTime': updateTime.toIso8601String(),
  468. 'isDeleted': isDeleted,
  469. };
  470. ExpenseDetailModel copyWith({
  471. String? id,
  472. String? expenseId,
  473. String? expenseApplyId,
  474. String? expenseApplyNo,
  475. DateTime? expenseApplyDate,
  476. String? expenseCategory,
  477. String? categoryName,
  478. String? priority,
  479. String? purpose,
  480. String? projectId,
  481. String? projectName,
  482. String? costDeptId,
  483. String? costDeptName,
  484. String? acctSubjectId,
  485. String? acctSubjectName,
  486. double? amount,
  487. double? taxRate,
  488. double? taxAmount,
  489. double? totalAmount,
  490. String? currencyCode,
  491. double? exchangeRate,
  492. double? baseAmount,
  493. double? approvedAmount,
  494. String? customerVendorId,
  495. String? customerVendorName,
  496. double? offsetAmount,
  497. String? bankName,
  498. String? bankAccountName,
  499. String? bankAccount,
  500. String? sqMan,
  501. String? sqManName,
  502. String? aeNo,
  503. String? aeDd,
  504. String? remark,
  505. int? preItm,
  506. int? sortOrder,
  507. List<String>? attachments,
  508. DateTime? createTime,
  509. DateTime? updateTime,
  510. bool? isDeleted,
  511. }) {
  512. return ExpenseDetailModel(
  513. id: id ?? this.id,
  514. expenseId: expenseId ?? this.expenseId,
  515. expenseApplyId: expenseApplyId ?? this.expenseApplyId,
  516. expenseApplyNo: expenseApplyNo ?? this.expenseApplyNo,
  517. expenseApplyDate: expenseApplyDate ?? this.expenseApplyDate,
  518. expenseCategory: expenseCategory ?? this.expenseCategory,
  519. categoryName: categoryName ?? this.categoryName,
  520. priority: priority ?? this.priority,
  521. purpose: purpose ?? this.purpose,
  522. projectId: projectId ?? this.projectId,
  523. projectName: projectName ?? this.projectName,
  524. costDeptId: costDeptId ?? this.costDeptId,
  525. costDeptName: costDeptName ?? this.costDeptName,
  526. acctSubjectId: acctSubjectId ?? this.acctSubjectId,
  527. acctSubjectName: acctSubjectName ?? this.acctSubjectName,
  528. amount: amount ?? this.amount,
  529. taxRate: taxRate ?? this.taxRate,
  530. taxAmount: taxAmount ?? this.taxAmount,
  531. totalAmount: totalAmount ?? this.totalAmount,
  532. currencyCode: currencyCode ?? this.currencyCode,
  533. exchangeRate: exchangeRate ?? this.exchangeRate,
  534. baseAmount: baseAmount ?? this.baseAmount,
  535. approvedAmount: approvedAmount ?? this.approvedAmount,
  536. customerVendorId: customerVendorId ?? this.customerVendorId,
  537. customerVendorName: customerVendorName ?? this.customerVendorName,
  538. offsetAmount: offsetAmount ?? this.offsetAmount,
  539. bankName: bankName ?? this.bankName,
  540. bankAccountName: bankAccountName ?? this.bankAccountName,
  541. bankAccount: bankAccount ?? this.bankAccount,
  542. sqMan: sqMan ?? this.sqMan,
  543. sqManName: sqManName ?? this.sqManName,
  544. aeNo: aeNo ?? this.aeNo,
  545. aeDd: aeDd ?? this.aeDd,
  546. remark: remark ?? this.remark,
  547. preItm: preItm ?? this.preItm,
  548. sortOrder: sortOrder ?? this.sortOrder,
  549. attachments: attachments ?? this.attachments,
  550. createTime: createTime ?? this.createTime,
  551. updateTime: updateTime ?? this.updateTime,
  552. isDeleted: isDeleted ?? this.isDeleted,
  553. );
  554. }
  555. }