-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathPartyEntities.xml
More file actions
1550 lines (1470 loc) · 117 KB
/
Copy pathPartyEntities.xml
File metadata and controls
1550 lines (1470 loc) · 117 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<!--
This software is in the public domain under CC0 1.0 Universal plus a
Grant of Patent License.
To the extent possible under law, the author(s) have dedicated all
copyright and related and neighboring rights to this software to the
public domain worldwide. This software is distributed without any
warranty.
You should have received a copy of the CC0 Public Domain Dedication
along with this software (see the LICENSE.md file). If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/entity-definition-2.1.xsd">
<!-- ========================================================= -->
<!-- - mantle.party -->
<!-- - mantle.party.agreement -->
<!-- - mantle.party.communication -->
<!-- - mantle.party.contact -->
<!-- - mantle.party.time -->
<!-- ========================================================= -->
<!-- ========================================================= -->
<!-- mantle.party -->
<!-- ========================================================= -->
<entity entity-name="Party" package="mantle.party" short-alias="parties">
<field name="partyId" type="id" is-pk="true"/>
<field name="pseudoId" type="id" default="partyId"/>
<field name="partyTypeEnumId" type="id"/>
<field name="disabled" type="text-indicator" enable-audit-log="true"/>
<field name="customerStatusId" type="id"/>
<field name="ownerPartyId" type="id" enable-audit-log="update" default="'_NA_'">
<description>If applicable, such as for customer records, the other Party that 'owns' the data for this Party.</description></field>
<field name="externalId" type="id"/>
<field name="dataSourceId" type="id"/>
<field name="gatewayCimId" type="text-short" enable-audit-log="update"/>
<field name="comments" type="text-long"/>
<field name="shippingInstructions" type="text-long"/>
<field name="hasDuplicates" type="text-indicator"/>
<field name="lastDupCheckDate" type="date-time"/>
<field name="mergedToPartyId" type="id"/><!-- no fk to avoid circular dependency, set automatically -->
<relationship type="one" title="PartyType" related="moqui.basic.Enumeration" short-alias="type">
<key-map field-name="partyTypeEnumId"/></relationship>
<relationship type="one" title="CustomerStatus" related="moqui.basic.StatusItem">
<key-map field-name="customerStatusId" related="statusId"/></relationship>
<relationship type="one" title="Owner" related="mantle.party.Party" short-alias="owner">
<key-map field-name="ownerPartyId"/></relationship>
<relationship type="one" related="moqui.basic.DataSource"/>
<relationship type="one-nofk" related="mantle.party.Organization" short-alias="organization" mutable="true"/>
<relationship type="one-nofk" related="mantle.party.Person" short-alias="person" mutable="true"/>
<relationship type="many" related="mantle.party.PartyBadge" short-alias="badges">
<key-map field-name="partyId"/></relationship>
<relationship type="many" related="mantle.party.PartyClassificationAppl" short-alias="classifications">
<key-map field-name="partyId"/></relationship>
<relationship type="many" related="mantle.party.PartyContent" short-alias="contents">
<key-map field-name="partyId"/></relationship>
<relationship type="many" related="mantle.party.PartyIdentification" short-alias="identifications">
<key-map field-name="partyId"/></relationship>
<relationship type="many" related="mantle.party.PartyNote" short-alias="notes">
<key-map field-name="partyId"/></relationship>
<relationship type="many" related="mantle.party.PartyRole" short-alias="roles">
<key-map field-name="partyId"/></relationship>
<relationship type="many" related="mantle.party.PartySetting" short-alias="settings">
<key-map field-name="partyId"/></relationship>
<relationship type="many" title="From" related="mantle.party.PartyRelationship" short-alias="fromRelationships">
<key-map field-name="partyId" related="fromPartyId"/></relationship>
<relationship type="many" title="To" related="mantle.party.PartyRelationship" short-alias="toRelationships">
<key-map field-name="partyId" related="toPartyId"/></relationship>
<relationship type="many" related="mantle.party.contact.PartyContactMech" short-alias="contactMechs">
<key-map field-name="partyId"/></relationship>
<relationship type="many" related="mantle.account.financial.FinancialAccount" short-alias="financialAccounts">
<key-map field-name="partyId" related="ownerPartyId"/></relationship>
<relationship type="many" related="mantle.account.method.PaymentMethod" short-alias="paymentMethods">
<key-map field-name="partyId" related="ownerPartyId"/></relationship>
<relationship type="many" related="moqui.security.UserAccount" short-alias="userAccounts">
<key-map field-name="partyId"/></relationship>
<index name="PARTY_ID_PSEUDO" unique="true"><index-field name="pseudoId"/><index-field name="ownerPartyId"/></index>
<index name="PARTY_ID_EXT"><index-field name="externalId"/></index>
<index name="PARTY_ID_MERGETO"><index-field name="mergedToPartyId"/></index>
<seed-data>
<!-- Party Type -->
<moqui.basic.EnumerationType description="Party Type" enumTypeId="PartyType"/>
<moqui.basic.Enumeration description="Automated Agent" enumId="PtyAutomatedAgent" enumTypeId="PartyType"/>
<moqui.basic.Enumeration description="Person" enumId="PtyPerson" enumTypeId="PartyType"/>
<moqui.basic.Enumeration description="Organization" enumId="PtyOrganization" enumTypeId="PartyType"/>
<!-- _NA_ Party -->
<Party partyId="_NA_" partyTypeEnumId="PtyPerson"/>
<Person partyId="_NA_" firstName="Not" lastName="Applicable"/>
</seed-data>
<master name="default">
<detail relationship="type"/>
<detail relationship="organization"/>
<detail relationship="person"/>
<!-- TODO: do something with UserAccount, exclude certain fields like PW/etc? -->
<detail relationship="badges"/>
<detail relationship="classifications">
<detail relationship="classification"><detail relationship="type"/></detail>
</detail>
<detail relationship="contents"><detail relationship="type"/></detail>
<detail relationship="identifications"><detail relationship="type"/></detail>
<detail relationship="notes"/>
<detail relationship="roles"><detail relationship="role"/></detail>
<detail relationship="fromRelationships">
<detail relationship="fromRole"/>
<detail relationship="toParty">
<detail relationship="organization"/>
<detail relationship="person"/>
</detail>
<detail relationship="toRole"/>
<detail relationship="status"/>
<detail relationship="type"/>
</detail>
<detail relationship="toRelationships">
<detail relationship="fromParty">
<detail relationship="organization"/>
<detail relationship="person"/>
</detail>
<detail relationship="fromRole"/>
<detail relationship="toRole"/>
<detail relationship="status"/>
<detail relationship="type"/>
</detail>
<detail relationship="contactMechs">
<detail relationship="contactMech" use-master="default"/>
<detail relationship="purpose"/>
</detail>
</master>
<master name="contact">
<detail relationship="type"/>
<detail relationship="organization"/>
<detail relationship="person"/>
<detail relationship="identifications"><detail relationship="type"/></detail>
<detail relationship="contactMechs">
<detail relationship="contactMech" use-master="default"/>
<detail relationship="purpose"/>
</detail>
</master>
<master name="basic">
<detail relationship="organization"/>
<detail relationship="person"/>
<detail relationship="identifications"><detail relationship="type"/></detail>
</master>
</entity>
<entity entity-name="Organization" package="mantle.party">
<field name="partyId" type="id" is-pk="true"/>
<field name="organizationName" type="text-medium"/>
<field name="officeSiteName" type="text-medium"/>
<field name="annualRevenue" type="currency-amount"/>
<field name="numEmployees" type="number-integer"/>
<relationship type="one" related="mantle.party.Party"/>
<relationship type="many" title="Owner" related="mantle.facility.Facility" short-alias="ownerFacilities">
<key-map field-name="partyId" related="ownerPartyId"/></relationship>
<index name="PTY_ORG_NAME_IDX"><index-field name="organizationName"/></index>
</entity>
<entity entity-name="Person" package="mantle.party">
<field name="partyId" type="id" is-pk="true"/>
<field name="salutation" type="text-medium"/>
<field name="firstName" type="text-medium"/>
<field name="middleName" type="text-medium"/>
<field name="lastName" type="text-medium" enable-audit-log="update"/>
<field name="personalTitle" type="text-medium"/>
<field name="suffix" type="text-medium"/>
<field name="nickname" type="text-medium"/>
<field name="gender" type="text-indicator"/>
<field name="birthDate" type="date"/>
<field name="deceasedDate" type="date"/>
<field name="height" type="number-float"/>
<field name="weight" type="number-float"/>
<field name="mothersMaidenName" type="text-medium" encrypt="true"/>
<field name="maritalStatusEnumId" type="id"/>
<field name="employmentStatusEnumId" type="id"/>
<field name="residenceStatusEnumId" type="id"/>
<field name="occupation" type="text-medium"/>
<relationship type="one" related="mantle.party.Party"/>
<relationship type="one" title="MaritalStatus" related="moqui.basic.Enumeration">
<key-map field-name="maritalStatusEnumId"/></relationship>
<relationship type="one" title="EmploymentStatus" related="moqui.basic.Enumeration">
<key-map field-name="employmentStatusEnumId"/></relationship>
<relationship type="one" title="ResidenceStatus" related="moqui.basic.Enumeration">
<key-map field-name="residenceStatusEnumId"/></relationship>
<index name="FIRST_NAME_IDX"><index-field name="firstName"/></index>
<index name="LAST_NAME_IDX"><index-field name="lastName"/></index>
<seed-data>
<moqui.basic.EnumerationType description="Marital Status" enumTypeId="MaritalStatus"/>
<moqui.basic.Enumeration description="Single" enumId="MarsSingle" enumTypeId="MaritalStatus"/>
<moqui.basic.Enumeration description="Married" enumId="MarsMarried" enumTypeId="MaritalStatus"/>
<moqui.basic.Enumeration description="Divorced" enumId="MarsDivorced" enumTypeId="MaritalStatus"/>
<moqui.basic.Enumeration description="Widowed/Widower" enumId="MarsWidow" enumTypeId="MaritalStatus"/>
<moqui.basic.EnumerationType description="Employment Status" enumTypeId="EmploymentStatus"/>
<moqui.basic.Enumeration description="Full-time Employed" enumId="EmpsFullTime" enumTypeId="EmploymentStatus"/>
<moqui.basic.Enumeration description="Part-time Employed" enumId="EmpsPartTime" enumTypeId="EmploymentStatus"/>
<moqui.basic.Enumeration description="Self Employed" enumId="EmpsSelf" enumTypeId="EmploymentStatus"/>
<moqui.basic.Enumeration description="House-Person" enumId="EmpsHouse" enumTypeId="EmploymentStatus"/>
<moqui.basic.Enumeration description="Retired" enumId="EmpsRetired" enumTypeId="EmploymentStatus"/>
<moqui.basic.Enumeration description="Student" enumId="EmpsStudent" enumTypeId="EmploymentStatus"/>
<moqui.basic.Enumeration description="Unemployed" enumId="EmpsUnemployed" enumTypeId="EmploymentStatus"/>
<moqui.basic.EnumerationType description="Residence Status" enumTypeId="ResidenceStatus"/>
<moqui.basic.Enumeration description="Own Home" enumId="RessOwn" enumTypeId="ResidenceStatus"/>
<moqui.basic.Enumeration description="Private Tenant" enumId="RessPrivateTenant" enumTypeId="ResidenceStatus"/>
<moqui.basic.Enumeration description="Public Tenant" enumId="RessPublicTenant" enumTypeId="ResidenceStatus"/>
<moqui.basic.Enumeration description="With Parents" enumId="RessParents" enumTypeId="ResidenceStatus"/>
</seed-data>
</entity>
<extend-entity entity-name="UserAccount" package="moqui.security">
<field name="partyId" type="id"/>
<relationship type="one" related="mantle.party.Party"/>
</extend-entity>
<entity entity-name="PartyBadge" package="mantle.party">
<field name="partyBadgeId" type="id" is-pk="true"/>
<field name="partyId" type="id"/>
<field name="organizationPartyId" type="id"/>
<field name="fromDate" type="date-time"/>
<field name="thruDate" type="date-time"/>
<field name="serialNumber" type="text-short"/>
<field name="storedValue" type="text-medium"><description>For RFID this is the unique tracking identifier
(the TID can be tracked in the serialNumber field)</description></field>
<relationship type="one" related="mantle.party.Party"/>
<relationship type="one" title="Organization" related="mantle.party.Party">
<key-map field-name="organizationPartyId"/></relationship>
<index name="PartyBadgeSerial" unique="true"><index-field name="serialNumber"/></index>
<index name="PartyBadgeStored" unique="true"><index-field name="storedValue"/></index>
</entity>
<entity entity-name="PartyBadgeScan" package="mantle.party">
<field name="partyBadgeId" type="id" is-pk="true"/>
<field name="scanDate" type="date-time" is-pk="true"/>
<field name="scanValue" type="text-short"/>
<field name="scanPurposeEnumId" type="id"/>
<field name="scanResultEnumId" type="id"/>
<field name="facilityId" type="id"/>
<field name="timeEntryId" type="id"/>
<relationship type="one" related="mantle.party.PartyBadge"/>
<relationship type="one" title="PartyBadgeScanPurpose" related="moqui.basic.Enumeration">
<key-map field-name="scanPurposeEnumId"/></relationship>
<relationship type="one" title="PartyBadgeScanResult" related="moqui.basic.Enumeration">
<key-map field-name="scanResultEnumId"/></relationship>
<relationship type="one" related="mantle.facility.Facility"/>
<relationship type="one" related="mantle.work.time.TimeEntry"/>
<seed-data>
<moqui.basic.EnumerationType description="Party Badge Scan Purpose" enumTypeId="PartyBadgeScanPurpose"/>
<moqui.basic.Enumeration description="Access" enumId="PbspAccess" enumTypeId="PartyBadgeScanPurpose"/>
<moqui.basic.Enumeration description="Clock In" enumId="PbspClockIn" enumTypeId="PartyBadgeScanPurpose"/>
<moqui.basic.Enumeration description="Clock Out" enumId="PbspClockOut" enumTypeId="PartyBadgeScanPurpose"/>
<moqui.basic.EnumerationType description="Party Badge Scan Result" enumTypeId="PartyBadgeScanResult"/>
<moqui.basic.Enumeration description="Success" enumId="PbsrSuccess" enumTypeId="PartyBadgeScanResult"/>
<moqui.basic.Enumeration description="Not Yet Valid" enumId="PbsrNotYetValid" enumTypeId="PartyBadgeScanResult"/>
<moqui.basic.Enumeration description="Expired" enumId="PbsrExpired" enumTypeId="PartyBadgeScanResult"/>
</seed-data>
</entity>
<entity entity-name="PartyClassification" package="mantle.party" cache="true">
<field name="partyClassificationId" type="id" is-pk="true"/>
<field name="classificationTypeEnumId" type="id"/>
<field name="parentClassificationId" type="id"/>
<field name="description" type="text-medium"/>
<field name="standardCode" type="text-medium"/>
<relationship type="one" title="PartyClassificationType" related="moqui.basic.Enumeration" short-alias="type">
<key-map field-name="classificationTypeEnumId"/></relationship>
<relationship type="one" title="Parent" related="mantle.party.PartyClassification">
<key-map field-name="parentClassificationId" related="partyClassificationId"/></relationship>
<seed-data>
<moqui.basic.EnumerationType description="Party Classification Type" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Customer" enumId="PcltCustomer" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="EEOC (Equal Opportunity)" enumId="PcltEeoc" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Minority" enumId="PcltMinority" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Income" enumId="PcltIncome" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Industry" enumId="PcltIndustry" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Revenue" enumId="PcltRevenue" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Number of Employees" enumId="PcltNumberEmployees" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="SIC Code" enumId="PcltSicCode" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="NAICS Code" enumId="PcltNaicsCode" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Ownership" enumId="PcltOwnership" enumTypeId="PartyClassificationType"/>
<!-- commenting these to simplify options; most are redundant with or less specific than remaining types:
<moqui.basic.Enumeration description="Trade" enumId="PcltTrade" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Trade - Wholesale" parentEnumId="PcltTrade" enumId="PcltTradeWholesale" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Trade - Retail" parentEnumId="PcltTrade" enumId="PcltTradeRetail" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Organization" enumId="PcltOrganization" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Person" enumId="PcltPerson" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Size" enumId="PcltSize" enumTypeId="PartyClassificationType"/>
<moqui.basic.Enumeration description="Value Rating" enumId="PcltValueRating" enumTypeId="PartyClassificationType"/>
-->
</seed-data>
</entity>
<entity entity-name="PartyClassificationAppl" package="mantle.party">
<field name="partyId" type="id" is-pk="true"/>
<field name="partyClassificationId" type="id" is-pk="true"/>
<field name="fromDate" type="date-time" is-pk="true"/>
<field name="thruDate" type="date-time"/>
<relationship type="one" related="mantle.party.Party" short-alias="party"/>
<relationship type="one" related="mantle.party.PartyClassification" short-alias="classification"/>
</entity>
<!-- in general PartyClassificationAppl is better, enforce single through service while retaining history
<entity entity-name="PartyClassificationSingle" package="mantle.party">
<field name="partyId" type="id" is-pk="true"/>
<field name="classificationTypeEnumId" type="id" is-pk="true"/>
<field name="partyClassificationId" type="id"/>
<relationship type="one" related="mantle.party.Party" short-alias="party"/>
<relationship type="one" title="PartyClassificationType" related="moqui.basic.Enumeration" short-alias="type">
<key-map field-name="classificationTypeEnumId"/></relationship>
<relationship type="one" related="mantle.party.PartyClassification" short-alias="classification"/>
</entity>
-->
<entity entity-name="PartyContent" package="mantle.party">
<field name="partyContentId" type="id" is-pk="true"/>
<field name="partyId" type="id"/>
<field name="contentLocation" type="text-medium"/>
<field name="partyContentTypeEnumId" type="id"/>
<field name="description" type="text-long"/>
<field name="contentDate" type="date-time" default="ec.user.nowTimestamp"/>
<field name="userId" type="id" default="ec.user.userId"/>
<relationship type="one" related="mantle.party.Party"/>
<relationship type="one" title="PartyContentType" related="moqui.basic.Enumeration" short-alias="type">
<key-map field-name="partyContentTypeEnumId"/></relationship>
<seed-data>
<!-- Party Content Type -->
<moqui.basic.EnumerationType description="Party Content Type" enumTypeId="PartyContentType"/>
<moqui.basic.Enumeration description="Internal Content" enumId="PcntInternal" enumTypeId="PartyContentType"/>
<moqui.basic.Enumeration description="User Defined Content" enumId="PcntUserDefined" enumTypeId="PartyContentType"/>
<moqui.basic.Enumeration description="Primary Image" enumId="PcntPrimaryImage" enumTypeId="PartyContentType"/>
<moqui.basic.Enumeration description="Logo Image" enumId="PcntLogoImage" enumTypeId="PartyContentType"/>
<moqui.basic.Enumeration description="Face Image" enumId="PcntFaceImage" enumTypeId="PartyContentType"/>
<moqui.basic.Enumeration description="Vendor Shipping Info" enumId="PcntVendorShipping" enumTypeId="PartyContentType"/>
<moqui.basic.Enumeration description="Payment Signature Primary" enumId="PcntPaymentSignaturePrimary" enumTypeId="PartyContentType"/>
<moqui.basic.Enumeration description="Payment Signature Secondary" enumId="PcntPaymentSignatureSecondary" enumTypeId="PartyContentType"/>
<moqui.basic.Enumeration description="Identity Document" enumId="PcntIdentityDocument" enumTypeId="PartyContentType"/>
<moqui.basic.Enumeration description="Employment Authorization Document" enumId="PcntEmplAuthzDocument" enumTypeId="PartyContentType"/>
</seed-data>
</entity>
<entity entity-name="PartyGeoPoint" package="mantle.party">
<field name="partyId" type="id" is-pk="true"/>
<field name="geoPointId" type="id" is-pk="true"/>
<field name="fromDate" type="date-time" is-pk="true"/>
<field name="thruDate" type="date-time"/>
<relationship type="one" related="mantle.party.Party"/>
<relationship type="one" related="moqui.basic.GeoPoint"/>
</entity>
<entity entity-name="PartyIdentification" package="mantle.party">
<field name="partyIdentificationId" type="id" is-pk="true"/>
<field name="partyId" type="id"/>
<field name="partyIdTypeEnumId" type="id"/>
<field name="idValue" type="text-medium" encrypt="true"/>
<field name="issuedBy" type="text-medium"/>
<field name="issuedByPartyId" type="id"/>
<field name="fromDate" type="date"/>
<field name="thruDate" type="date"/>
<field name="expireDate" type="date"/>
<relationship type="one" title="PartyIdType" related="moqui.basic.Enumeration" short-alias="type">
<key-map field-name="partyIdTypeEnumId"/></relationship>
<relationship type="one" related="mantle.party.Party"/>
<relationship type="one" title="IssuedBy" related="mantle.party.Party">
<key-map field-name="issuedByPartyId"/></relationship>
<index name="PARTY_ID_VALUE"><index-field name="idValue"/></index>
<seed-data>
<moqui.basic.EnumerationType description="Party Identification Type" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="Passport Number" enumId="PtidPassport" enumTypeId="PartyIdType" optionValue="*{4,10}"/>
<moqui.basic.Enumeration description="Driver License Number" enumId="PtidDriverLicense" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="Social Security Number" enumId="PtidSsn" enumTypeId="PartyIdType" optionValue="999-99-9999"/>
<moqui.basic.Enumeration description="Federal Agent Indicator Code" enumId="PtidFaic" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="Federal EIN" enumId="PtidFein" enumTypeId="PartyIdType" optionValue="99-9999999"/>
<moqui.basic.Enumeration description="Federal User ID" enumId="PtidFuid" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="Matricula Consular ID" enumId="PtidMcid" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="Global Location Number" enumId="PtidGln" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="Alien Registration Number" enumId="PtidArn" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="Immigrant Admission Number" enumId="PtidIan" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="Dun and Bradstreet DUNS" enumId="PtidDuns" enumTypeId="PartyIdType" optionValue="99-999-9999"/>
<moqui.basic.Enumeration description="Dun and Bradstreet DUNS+4" enumId="PtidDuns4" enumTypeId="PartyIdType" optionValue="99-999-9999-9999"/>
<moqui.basic.Enumeration description="Customer Assigned" enumId="PtidCust" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="Vendor Assigned" enumId="PtidVend" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="Permanent Resident" enumId="PtidPermReg" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="I-551" enumId="PtidI551" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="I-766" enumId="PtidI766" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="I-94" enumId="PtidI94" enumTypeId="PartyIdType"/>
<moqui.basic.Enumeration description="I-94A" enumId="Ptid94A" enumTypeId="PartyIdType"/>
</seed-data>
</entity>
<entity entity-name="PartyNote" package="mantle.party">
<field name="partyId" type="id" is-pk="true"/>
<field name="noteDate" type="date-time" is-pk="true" default="ec.user.nowTimestamp"/>
<field name="noteText" type="text-long" enable-audit-log="true"/>
<field name="internalNote" type="text-indicator"/>
<field name="userId" type="id" default="ec.user.userId"/>
<relationship type="one" related="mantle.party.Party"/>
<relationship type="one" related="moqui.security.UserAccount"/>
</entity>
<entity entity-name="PartyRelationship" package="mantle.party">
<field name="partyRelationshipId" type="id" is-pk="true"/>
<field name="relationshipTypeEnumId" type="id"/>
<field name="fromPartyId" type="id"/>
<field name="fromRoleTypeId" type="id"/>
<field name="toPartyId" type="id"/>
<field name="toRoleTypeId" type="id"/>
<field name="fromDate" type="date-time"/>
<field name="thruDate" type="date-time"/>
<field name="statusId" type="id" enable-audit-log="true"/>
<!-- not used: <field name="priorityTypeEnumId" type="id"/> -->
<!-- not used: <field name="permissionsEnumId" type="id"/> -->
<field name="comments" type="text-medium"/>
<field name="relationshipName" type="text-medium">
<description>Official name of relationship, such as title in an organization.</description>
</field>
<relationship type="one" title="PartyRelationshipType" related="moqui.basic.Enumeration" short-alias="type">
<key-map field-name="relationshipTypeEnumId"/></relationship>
<relationship type="one" title="From" related="mantle.party.Party" short-alias="fromParty">
<key-map field-name="fromPartyId"/></relationship>
<relationship type="one" title="From" related="mantle.party.RoleType" short-alias="fromRole">
<key-map field-name="fromRoleTypeId"/></relationship>
<relationship type="one" title="To" related="mantle.party.Party" short-alias="toParty">
<key-map field-name="toPartyId"/></relationship>
<relationship type="one" title="To" related="mantle.party.RoleType" short-alias="toRole">
<key-map field-name="toRoleTypeId"/></relationship>
<relationship type="one" title="PartyRelationship" related="moqui.basic.StatusItem" short-alias="status"/>
<!-- not used: <relationship type="one" title="PriorityType" related="moqui.basic.Enumeration" short-alias="priorityType">
<key-map field-name="priorityTypeEnumId"/></relationship> -->
<seed-data>
<!-- NOTE: The partyRelationshipTypeEnumId describes the FROM Party, ie Joe is a customer of ACME, so Joe
is the fromPartyId (fromRoleTypeId=Customer) and ACME is the toPartyId (toRoleTypeId=OrgInternal); for
other examples see Table 2.5 in "The Data Model Resource Book, Revised Edition, Volume 1"-->
<moqui.basic.EnumerationType description="Party Relationship Type" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Agent" enumId="PrtAgent" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Child" enumId="PrtChild" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Contact" enumId="PrtContact" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Customer" enumId="PrtCustomer" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Employee" enumId="PrtEmployee" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Friend" enumId="PrtFriend" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Manager" enumId="PrtManager" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Organization Member" enumId="PrtMember" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Organization Rollup" enumId="PrtOrgRollup" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Partner" enumId="PrtPartner" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Representative" enumId="PrtRepresentative" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Sales Affiliate" enumId="PrtSalesAffiliate" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Spouse" enumId="PrtSpouse" enumTypeId="PartyRelationshipType"/>
<moqui.basic.Enumeration description="Supplier" enumId="PrtSupplier" enumTypeId="PartyRelationshipType"/>
<moqui.basic.StatusType description="Party Relationship" statusTypeId="PartyRelationship"/>
</seed-data>
</entity>
<entity entity-name="PartyRole" package="mantle.party">
<field name="partyId" type="id" is-pk="true"/>
<field name="roleTypeId" type="id" is-pk="true"/>
<relationship type="one" related="mantle.party.Party" short-alias="party"/>
<relationship type="one" related="mantle.party.RoleType" short-alias="role"/>
<!-- This relationship is necessary as a backward relationship used in a DataDocument, otherwise wouldn't be needed -->
<relationship type="many" title="Vendor" related="mantle.order.OrderPart">
<key-map field-name="partyId" related="vendorPartyId"/></relationship>
</entity>
<entity entity-name="RoleGroupMember" package="mantle.party">
<field name="roleGroupEnumId" type="id" is-pk="true"/>
<field name="roleTypeId" type="id" is-pk="true"/>
<relationship type="one" title="RoleGroup" related="moqui.basic.Enumeration">
<key-map field-name="roleGroupEnumId"/></relationship>
<relationship type="one" related="mantle.party.RoleType"/>
<seed-data>
<moqui.basic.EnumerationType description="Role Group" enumTypeId="RoleGroup"/>
</seed-data>
</entity>
<entity entity-name="RoleType" package="mantle.party" cache="true">
<!-- NOTE: RoleType is not moved to Enumeration because there are many of them (ID conflicts) and it is referred to in many places. -->
<field name="roleTypeId" type="id" is-pk="true"/>
<field name="parentTypeId" type="id"/>
<field name="description" type="text-medium"/>
<relationship type="one" title="Parent" related="mantle.party.RoleType">
<key-map field-name="parentTypeId" related="roleTypeId"/></relationship>
<seed-data>
<!-- Role to use when a role is not really applicable for the party association with a record. -->
<mantle.party.RoleType description="Not Applicable" roleTypeId="_NA_"/>
<!-- General Roles -->
<mantle.party.RoleType description="Agent" roleTypeId="Agent"/>
<mantle.party.RoleType description="Affiliate" roleTypeId="Affiliate"/>
<mantle.party.RoleType description="Carrier" roleTypeId="Carrier"/>
<mantle.party.RoleType description="Competitor" roleTypeId="Competitor"/>
<mantle.party.RoleType description="Consumer" roleTypeId="Consumer"/>
<mantle.party.RoleType description="Contractor" roleTypeId="Contractor"/>
<mantle.party.RoleType description="Distributor" roleTypeId="Distributor"/>
<mantle.party.RoleType description="Garnishment Payee" roleTypeId="GarnishmentPayee"/>
<mantle.party.RoleType description="Internet Service Provider" roleTypeId="InternetSp"/>
<mantle.party.RoleType description="Hosting Provider" roleTypeId="HostingProvider"/>
<mantle.party.RoleType description="Manufacturer" roleTypeId="Manufacturer"/>
<mantle.party.RoleType description="Owner" roleTypeId="Owner"/>
<mantle.party.RoleType description="Partner" roleTypeId="Partner"/>
<mantle.party.RoleType description="Payroll Other Payee" roleTypeId="PayrollOtherPayee"/>
<mantle.party.RoleType description="Prospect" roleTypeId="Prospect"/>
<mantle.party.RoleType description="Referrer" roleTypeId="Referrer"/>
<mantle.party.RoleType description="Sales Account" roleTypeId="Account"/>
<mantle.party.RoleType description="Sales Account Lead" roleTypeId="AccountLead"/>
<mantle.party.RoleType description="Shareholder" roleTypeId="Shareholder"/>
<mantle.party.RoleType description="Subscriber" roleTypeId="Subscriber"/>
<mantle.party.RoleType description="Supplier" roleTypeId="Supplier"/>
<mantle.party.RoleType description="Visitor" roleTypeId="Visitor"/>
<mantle.party.RoleType description="Web Master" roleTypeId="WebMaster"/>
<!-- Person Roles -->
<mantle.party.RoleType description="Accountant" roleTypeId="Accountant"/>
<mantle.party.RoleType description="Administrator" roleTypeId="Administrator"/>
<mantle.party.RoleType description="Assignee" roleTypeId="Assignee"/>
<mantle.party.RoleType description="Buyer" roleTypeId="Buyer"/>
<mantle.party.RoleType description="Cashier" roleTypeId="Cashier"/>
<mantle.party.RoleType description="Client Billing Rep" roleTypeId="ClientBilling"/>
<mantle.party.RoleType description="Client Manager" roleTypeId="ClientManager"/>
<mantle.party.RoleType description="Email Administrator" roleTypeId="EmailAdmin"/>
<mantle.party.RoleType description="Employee" roleTypeId="Employee"/>
<mantle.party.RoleType description="Executive" roleTypeId="Executive"/>
<mantle.party.RoleType description="Family Member" roleTypeId="FamilyMember"/>
<mantle.party.RoleType description="Human Resources Manager" roleTypeId="HumanResourcesManager"/>
<mantle.party.RoleType description="Inventory Manager" roleTypeId="InventoryManager"/>
<mantle.party.RoleType description="Manager" roleTypeId="Manager"/>
<mantle.party.RoleType description="Operator" roleTypeId="Operator"/>
<mantle.party.RoleType description="Order Clerk" roleTypeId="OrderClerk"/>
<mantle.party.RoleType description="Packer" roleTypeId="Packer"/>
<mantle.party.RoleType description="Payroll" roleTypeId="Payroll"/>
<mantle.party.RoleType description="Picker" roleTypeId="Picker"/>
<mantle.party.RoleType description="Production Manager" roleTypeId="ProductionManager"/>
<mantle.party.RoleType description="Production Worker" roleTypeId="ProductionWorker"/>
<mantle.party.RoleType description="Receiver" roleTypeId="Receiver"/>
<mantle.party.RoleType description="Reporter" roleTypeId="Reporter"/>
<mantle.party.RoleType description="Sales Contact" roleTypeId="Contact"/>
<mantle.party.RoleType description="Sales Representative" roleTypeId="SalesRepresentative"/>
<mantle.party.RoleType description="Shipment Clerk" roleTypeId="ShipmentClerk"/>
<mantle.party.RoleType description="Sponsor" roleTypeId="Sponsor"/>
<mantle.party.RoleType description="Spouse" roleTypeId="Spouse"/>
<mantle.party.RoleType description="Stocker" roleTypeId="Stocker"/>
<mantle.party.RoleType description="Supplier Agent" roleTypeId="SupplierAgent"/>
<mantle.party.RoleType description="Watcher" roleTypeId="Watcher"/>
<mantle.party.RoleType description="Worker" roleTypeId="Worker"/>
<mantle.party.RoleType description="Business Analyst" roleTypeId="BusinessAnalyst"/>
<mantle.party.RoleType description="Default Assignee" roleTypeId="DefaultAssignee"/>
<mantle.party.RoleType description="Expert User" roleTypeId="ExpertUser"/>
<mantle.party.RoleType description="Programmer" roleTypeId="Programmer"/>
<mantle.party.RoleType description="Programmer Lead" roleTypeId="ProgrammerLead"/>
<mantle.party.RoleType description="Project Manager" roleTypeId="ProjectManager"/>
<mantle.party.RoleType description="Quality Analyst" roleTypeId="QualityAnalyst"/>
<mantle.party.RoleType description="Quality Lead" roleTypeId="QualityLead"/>
<mantle.party.RoleType description="System Administrator" roleTypeId="SysAdmin"/>
<mantle.party.RoleType description="System Architect" roleTypeId="SysArchitect"/>
<mantle.party.RoleType description="UI Designer" roleTypeId="UiDesigner"/>
<moqui.basic.Enumeration description="Person Roles" enumId="RgpPerson" enumTypeId="RoleGroup"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Accountant"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Administrator"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Assignee"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Buyer"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Cashier"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="ClientBilling"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="ClientManager"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Contact"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="EmailAdmin"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Employee"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="FamilyMember"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="HumanResourcesManager"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="InventoryManager"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Manager"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Operator"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="OrderClerk"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Packer"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Picker"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="ProductionManager"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Receiver"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Reporter"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="SalesRepresentative"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="ShipmentClerk"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Sponsor"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Spouse"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Stocker"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="SupplierAgent"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Watcher"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Worker"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="BusinessAnalyst"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="DefaultAssignee"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="ExpertUser"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="Programmer"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="ProgrammerLead"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="ProjectManager"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="QualityAnalyst"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="QualityLead"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="SysAdmin"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="SysArchitect"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpPerson" roleTypeId="UiDesigner"/>
<!-- Organization Roles -->
<mantle.party.RoleType description="Association" roleTypeId="OrgAssociation"/>
<mantle.party.RoleType description="Corporation" roleTypeId="OrgCorporation"/>
<mantle.party.RoleType description="Department" roleTypeId="OrgDepartment"/>
<mantle.party.RoleType description="Division" roleTypeId="OrgDivision"/>
<mantle.party.RoleType description="Employer" roleTypeId="OrgEmployer"/>
<mantle.party.RoleType description="Family" roleTypeId="OrgFamily"/>
<mantle.party.RoleType description="Government" roleTypeId="OrgGovernment"/>
<mantle.party.RoleType description="Government Agency" roleTypeId="OrgGovernmentAgency"/>
<mantle.party.RoleType description="Household" roleTypeId="OrgHousehold"/>
<mantle.party.RoleType description="Internal" roleTypeId="OrgInternal"/>
<mantle.party.RoleType description="Team" roleTypeId="OrgTeam"/>
<mantle.party.RoleType description="Unit" roleTypeId="OrgUnit"/>
<mantle.party.RoleType description="Parent" roleTypeId="OrgParent"/>
<mantle.party.RoleType description="Regulatory Agency" roleTypeId="OrgRegulatoryAgency"/>
<mantle.party.RoleType description="Subsidiary" roleTypeId="OrgSubsidiary"/>
<mantle.party.RoleType description="Tax Authority" roleTypeId="OrgTaxAuthority"/>
<mantle.party.RoleType description="Union" roleTypeId="OrgUnion"/>
<moqui.basic.Enumeration description="Organization Roles" enumId="RgpOrganization" enumTypeId="RoleGroup"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgAssociation"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgCorporation"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgDepartment"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgDivision"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgFamily"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgGovernment"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgGovernmentAgency"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgHousehold"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgInternal"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgTeam"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgUnit"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgParent"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgRegulatoryAgency"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgSubsidiary"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgTaxAuthority"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrganization" roleTypeId="OrgUnion"/>
<!-- Calendar Roles -->
<mantle.party.RoleType description="Attendee" roleTypeId="Attendee"/>
<mantle.party.RoleType description="Delegate" roleTypeId="Delegate"/>
<mantle.party.RoleType description="Host" roleTypeId="Host"/>
<mantle.party.RoleType description="Organizer" roleTypeId="Organizer"/>
<moqui.basic.Enumeration description="Calendar Roles" enumId="RgpCalendar" enumTypeId="RoleGroup"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpCalendar" roleTypeId="Attendee"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpCalendar" roleTypeId="Delegate"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpCalendar" roleTypeId="Host"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpCalendar" roleTypeId="Organizer"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpCalendar" roleTypeId="Owner"/>
<!-- Customer and Vendor Roles -->
<!-- NOTE: these don't use RoleGroupMember because they are an actual hierarchy of roles (Customer and Vendor are valid roles with sub-roles) -->
<mantle.party.RoleType description="Customer" roleTypeId="Customer"/>
<mantle.party.RoleType description="Customer - Bill To" parentTypeId="Customer" roleTypeId="CustomerBillTo"/>
<mantle.party.RoleType description="Customer - End User" parentTypeId="Customer" roleTypeId="CustomerEndUser"/>
<mantle.party.RoleType description="Customer - Placing" parentTypeId="Customer" roleTypeId="CustomerPlacing"/>
<mantle.party.RoleType description="Customer - Ship To" parentTypeId="Customer" roleTypeId="CustomerShipTo"/>
<mantle.party.RoleType description="Vendor" roleTypeId="Vendor"/>
<mantle.party.RoleType description="Vendor - Bill From" parentTypeId="Vendor" roleTypeId="VendorBillFrom"/>
<mantle.party.RoleType description="Vendor - Ship From" parentTypeId="Vendor" roleTypeId="VendorShipFrom"/>
<mantle.party.RoleType description="Vendor - Pick Up From" parentTypeId="Vendor" roleTypeId="VendorPickUpFrom"/>
<moqui.basic.Enumeration description="Order Roles" enumId="RgpOrder" enumTypeId="RoleGroup"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Customer"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="CustomerBillTo"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="CustomerEndUser"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="CustomerPlacing"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="CustomerShipTo"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Vendor"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="VendorBillFrom"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="VendorShipFrom"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="VendorPickUpFrom"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Supplier"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Account"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Agent"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Affiliate"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Carrier"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Competitor"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Partner"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Referrer"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Buyer"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="Cashier"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="ClientBilling"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="OrderClerk"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpOrder" roleTypeId="SalesRepresentative"/>
<moqui.basic.Enumeration description="Account Contact Roles" enumId="RgpAccountContact" enumTypeId="RoleGroup"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="Accountant"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="Buyer"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="ClientBilling"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="ClientManager"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="InventoryManager"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="Manager"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="OrderClerk"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="Receiver"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="ProductionManager"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="SalesRepresentative"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="ShipmentClerk"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAccountContact" roleTypeId="SupplierAgent"/>
</seed-data>
</entity>
<entity entity-name="PartySetting" package="mantle.party">
<field name="partyId" type="id" is-pk="true"/>
<field name="partySettingTypeId" type="id" is-pk="true"/>
<field name="settingValue" type="text-medium"/>
<relationship type="one" related="mantle.party.Party" short-alias="party"/>
<relationship type="one" related="mantle.party.PartySettingType" short-alias="settingType"/>
<relationship type="one-nofk" related="moqui.basic.Enumeration">
<description>This is one-nofk because settingValue may by an enumId or may be plain text depending on PartySettingType</description>
<key-map field-name="settingValue"/></relationship>
</entity>
<entity entity-name="PartyRelationshipSetting" package="mantle.party">
<field name="partyRelationshipId" type="id" is-pk="true"/>
<field name="partySettingTypeId" type="id" is-pk="true"/>
<field name="settingValue" type="text-medium"/>
<relationship type="one" related="mantle.party.PartyRelationship" short-alias="partyRelationship"/>
<relationship type="one" related="mantle.party.PartySettingType" short-alias="settingType"/>
<relationship type="one-nofk" related="moqui.basic.Enumeration">
<description>This is one-nofk because settingValue may by an enumId or may be plain text depending on PartySettingType</description>
<key-map field-name="settingValue"/></relationship>
</entity>
<entity entity-name="PartySettingType" package="mantle.party" use="configuration" cache="true">
<field name="partySettingTypeId" type="id" is-pk="true"/>
<field name="description" type="text-medium"/>
<field name="validRegexp" type="text-medium"><description>For non-enum settings, regexp to validate</description></field>
<field name="enumTypeId" type="id"/>
<field name="defaultValue" type="text-medium"/>
<relationship type="one" related="moqui.basic.EnumerationType" short-alias="type"/>
<relationship type="many" related="mantle.party.PartySettingTypeRole" short-alias="roles">
<key-map field-name="partySettingTypeId"/></relationship>
<seed-data>
<mantle.party.PartySettingType partySettingTypeId="CustomerSingleLot" description="Single Lot per Order"
enumTypeId="BooleanYN" defaultValue="BlN"><roles roleTypeId="Customer"/></mantle.party.PartySettingType>
<mantle.party.PartySettingType partySettingTypeId="CustomerNewerInventory" description="Newer Inventory each Order"
enumTypeId="BooleanYN" defaultValue="BlN"><roles roleTypeId="Customer"/></mantle.party.PartySettingType>
<mantle.party.PartySettingType partySettingTypeId="OrgInvoiceProductStoreId" description="Default Invoice Product Store ID">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<!-- Address validate and default shipment gateways -->
<mantle.party.PartySettingType partySettingTypeId="ValidateAddressGatewayConfigId" description="Validate Address Gateway Config ID">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<mantle.party.PartySettingType partySettingTypeId="DefaultShipmentGatewayConfigId" description="Default Shipment Gateway Config ID">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<!-- PaymentMethod vault gateway - setting type per org for payment gateway config to use by default for CC vault -->
<!-- Support required for each payment gateway integration, org partyId is: PaymentMethod.ownerPartyId => Payment.ownerPartyId -->
<mantle.party.PartySettingType partySettingTypeId="VaultPaymentGatewayConfigId" description="Vault Payment Gateway Config ID">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<!-- Print/PDF Template Location Settings -->
<mantle.party.PartySettingType partySettingTypeId="OrgTemplateShipmentInsert" description="Template Location Shipment Insert">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<mantle.party.PartySettingType partySettingTypeId="OrgTemplateShipmentPick" description="Template Location Shipment Pick Sheet">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<mantle.party.PartySettingType partySettingTypeId="OrgTemplateShipmentPack" description="Template Location Shipment Pack Sheet">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<mantle.party.PartySettingType partySettingTypeId="OrgTemplateShipmentByPackage" description="Template Location Shipment By Package">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<mantle.party.PartySettingType partySettingTypeId="OrgTemplateInvoicePrint" description="Template Location Invoice Print">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<mantle.party.PartySettingType partySettingTypeId="OrgTemplateOrderPrint" description="Template Location Order Print">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<mantle.party.PartySettingType partySettingTypeId="OrgTemplatePaymentCheck" description="Template Location Payment Check">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<mantle.party.PartySettingType partySettingTypeId="OrgTemplatePaymentDetail" description="Template Location Payment Detail">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<!-- TODO: support template location setting -->
<mantle.party.PartySettingType partySettingTypeId="OrgTemplateReceivableStatement" description="Template Location Receivable Statement">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
<!-- TODO: support template location setting -->
<mantle.party.PartySettingType partySettingTypeId="OrgTemplateFinancialAccountStatement" description="Template Location Financial Account Statement">
<roles roleTypeId="OrgInternal"/></mantle.party.PartySettingType>
</seed-data>
</entity>
<entity entity-name="PartySettingTypeRole" package="mantle.party" use="configuration">
<field name="partySettingTypeId" type="id" is-pk="true"/>
<field name="roleTypeId" type="id" is-pk="true"/>
<relationship type="one" related="mantle.party.PartySettingType" short-alias="settingType"/>
<relationship type="one" related="mantle.party.RoleType" short-alias="role"/>
</entity>
<!-- ========================================================= -->
<!-- mantle.party.agreement -->
<!-- ========================================================= -->
<entity entity-name="Agreement" package="mantle.party.agreement" short-alias="agreements">
<field name="agreementId" type="id" is-pk="true"/>
<field name="agreementTypeEnumId" type="id"/>
<field name="statusId" type="id" enable-audit-log="true"/>
<field name="organizationPartyId" type="id"/>
<field name="organizationRoleTypeId" type="id"/>
<field name="otherPartyId" type="id" enable-audit-log="update"/>
<field name="otherRoleTypeId" type="id"/>
<field name="agreementDate" type="date-time"/>
<field name="fromDate" type="date-time" enable-audit-log="update"/>
<field name="thruDate" type="date-time" enable-audit-log="update"/>
<field name="description" type="text-medium"/>
<field name="currencyUomId" type="id"/>
<field name="textData" type="text-very-long"/>
<relationship type="one" title="AgreementType" related="moqui.basic.Enumeration" short-alias="type">
<key-map field-name="agreementTypeEnumId"/></relationship>
<relationship type="one" title="Agreement" related="moqui.basic.StatusItem" short-alias="status"/>
<relationship type="one" title="Organization" related="mantle.party.Party" short-alias="organization">
<key-map field-name="organizationPartyId"/></relationship>
<relationship type="one" title="Organization" related="mantle.party.RoleType" short-alias="organizationRole">
<key-map field-name="organizationRoleTypeId"/></relationship>
<relationship type="one" title="Other" related="mantle.party.Party" short-alias="other">
<key-map field-name="otherPartyId"/></relationship>
<relationship type="one" title="Other" related="mantle.party.RoleType" short-alias="otherRole">
<key-map field-name="otherRoleTypeId"/></relationship>
<relationship type="one" title="Currency" related="moqui.basic.Uom" short-alias="currencyUom">
<key-map field-name="currencyUomId"/></relationship>
<relationship type="many" related="mantle.party.agreement.AgreementTerm" short-alias="terms">
<key-map field-name="agreementId"/></relationship>
<relationship type="many" related="mantle.party.agreement.AgreementItem" short-alias="items">
<key-map field-name="agreementId"/></relationship>
<seed-data>
<!-- Agreement Type -->
<moqui.basic.EnumerationType description="Agreement Type" enumTypeId="AgreementType"/>
<moqui.basic.Enumeration enumId="AgrProduct" description="Product" enumTypeId="AgreementType"/>
<moqui.basic.Enumeration enumId="AgrSales" description="Sales" enumTypeId="AgreementType"/>
<moqui.basic.Enumeration enumId="AgrEmployment" description="Employment" enumTypeId="AgreementType"/>
<moqui.basic.Enumeration enumId="AgrOther" description="Other" enumTypeId="AgreementType"/>
<moqui.basic.Enumeration enumId="AgrCommission" description="Commission" enumTypeId="AgreementType"/>
<moqui.basic.Enumeration enumId="AgrEula" description="End User License Agreement" enumTypeId="AgreementType"/>
<!-- Agreement Status -->
<moqui.basic.StatusType description="Agreement" statusTypeId="Agreement"/>
<!-- Agreement Roles -->
<moqui.basic.Enumeration description="Agreement Roles" enumId="RgpAgreement" enumTypeId="RoleGroup"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAgreement" roleTypeId="Carrier"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAgreement" roleTypeId="Customer"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAgreement" roleTypeId="Employee"/>
<mantle.party.RoleGroupMember roleGroupEnumId="RgpAgreement" roleTypeId="Supplier"/>
</seed-data>
</entity>
<entity entity-name="AgreementAddendum" package="mantle.party.agreement">
<field name="agreementAddendumId" type="id" is-pk="true"/>
<field name="agreementId" type="id"/>
<field name="agreementItemSeqId" type="id"/>
<field name="addendumCreationDate" type="date-time"/>
<field name="addendumEffectiveDate" type="date-time"/>
<field name="addendumText" type="text-long"/>
<relationship type="one" related="mantle.party.agreement.Agreement"/>
<relationship type="one" related="mantle.party.agreement.AgreementItem">
<key-map field-name="agreementId"/>
<key-map field-name="agreementItemSeqId"/>
</relationship>
</entity>
<entity entity-name="AgreementContent" package="mantle.party.agreement">
<field name="agreementContentId" type="id" is-pk="true"/>
<field name="agreementId" type="id"/>
<field name="contentLocation" type="text-medium"/>
<field name="contentTypeEnumId" type="id"/>
<field name="description" type="text-long"/>
<field name="contentDate" type="date-time" default="ec.user.nowTimestamp"/>
<field name="userId" type="id" default="ec.user.userId"/>
<relationship type="one" related="mantle.party.agreement.Agreement"/>
<relationship type="one" title="AgreementContentType" related="moqui.basic.Enumeration" short-alias="type">
<key-map field-name="contentTypeEnumId"/></relationship>
<seed-data>
<moqui.basic.EnumerationType description="Agreement Content Type" enumTypeId="AgreementContentType"/>
<moqui.basic.Enumeration description="Agreement Document" enumId="AcntDocument" enumTypeId="AgreementContentType"/>
<moqui.basic.Enumeration description="Supporting Document" enumId="AcntSupporting" enumTypeId="AgreementContentType"/>
<moqui.basic.Enumeration description="Price Sheet" enumId="AcntPriceSheet" enumTypeId="AgreementContentType"/>
</seed-data>
</entity>
<entity entity-name="AgreementParty" package="mantle.party.agreement">
<field name="agreementId" type="id" is-pk="true"/>
<field name="partyId" type="id" is-pk="true"/>
<field name="roleTypeId" type="id" is-pk="true"/>
<relationship type="one" related="mantle.party.agreement.Agreement"/>
<relationship type="one" related="mantle.party.Party"/>
<relationship type="one" related="mantle.party.RoleType"/>
</entity>
<entity entity-name="AgreementTerm" package="mantle.party.agreement">
<field name="agreementTermId" type="id" is-pk="true"/>
<field name="agreementId" type="id"/>
<field name="agreementItemSeqId" type="id"/>
<field name="settlementTermId" type="id"/>
<field name="termTypeEnumId" type="id"/>
<!-- Really need these? redundant with fields on Agreement: <field name="fromDate" type="date-time"/><field name="thruDate" type="date-time"/> -->
<field name="termText" type="text-long"/>
<field name="termNumber" type="number-decimal"/>
<relationship type="one" related="mantle.party.agreement.Agreement"/>
<relationship type="one-nofk" related="mantle.party.agreement.AgreementItem">
<key-map field-name="agreementId"/><key-map field-name="agreementItemSeqId"/></relationship>
<relationship type="one" related="mantle.account.invoice.SettlementTerm"/>
<relationship type="one" title="TermType" related="moqui.basic.Enumeration">
<key-map field-name="termTypeEnumId"/></relationship>
<!-- see the mantle.account.invoice.SettlementTerm entity for TermType enums -->
</entity>
<entity entity-name="AgreementItem" package="mantle.party.agreement">
<description>For price lists associated with an AgreementItem use the ProducePrice entity.</description>
<field name="agreementId" type="id" is-pk="true"/>
<field name="agreementItemSeqId" type="id" is-pk="true"/>
<field name="agreementItemTypeEnumId" type="id"/>
<field name="fromDate" type="date-time"/>
<field name="thruDate" type="date-time"/>
<field name="productId" type="id"/>
<field name="quantity" type="number-decimal" enable-audit-log="true"/>
<field name="quantityUomId" type="id"/>
<field name="itemText" type="text-very-long"/>
<relationship type="one" related="mantle.party.agreement.Agreement"/>
<relationship type="one" title="AgreementItemType" related="moqui.basic.Enumeration">
<key-map field-name="agreementItemTypeEnumId"/></relationship>
<relationship type="one" related="mantle.product.Product" short-alias="product"/>
<relationship type="one" title="Quantity" related="moqui.basic.Uom" short-alias="quantityUom">
<key-map field-name="quantityUomId"/></relationship>
<relationship type="many" related="mantle.party.agreement.AgreementTerm" short-alias="terms">
<key-map field-name="agreementId"/><key-map field-name="agreementItemSeqId"/></relationship>
<seed-data>
<!-- Agreement Item Type -->
<moqui.basic.EnumerationType description="Agreement Item Type" enumTypeId="AgreementItemType"/>
<moqui.basic.Enumeration enumId="AitSubAgreement" description="Sub-Agreement" enumTypeId="AgreementItemType"/>
<moqui.basic.Enumeration enumId="AitExhibit" description="Exhibit" enumTypeId="AgreementItemType"/>
<moqui.basic.Enumeration enumId="AitPricing" description="Pricing" enumTypeId="AgreementItemType"/>
<moqui.basic.Enumeration enumId="AitPurchase" description="Purchase" enumTypeId="AgreementItemType"/>
<moqui.basic.Enumeration enumId="AitSection" description="Section" enumTypeId="AgreementItemType"/>
<moqui.basic.Enumeration enumId="AitCommissionRate" description="Commission Rate" enumTypeId="AgreementItemType"/>
</seed-data>
</entity>
<entity entity-name="AgreementItemEmployment" package="mantle.party.agreement">
<field name="agreementId" type="id" is-pk="true"/>
<field name="agreementItemSeqId" type="id" is-pk="true"/>
<field name="partyRelationshipId" type="id" is-pk="true"/>
<relationship type="one" related="mantle.humanres.employment.Employment"/>
<relationship type="one" related="mantle.party.agreement.AgreementItem">
<key-map field-name="agreementId"/>
<key-map field-name="agreementItemSeqId"/>
</relationship>
</entity>
<entity entity-name="AgreementItemGeo" package="mantle.party.agreement">
<field name="agreementId" type="id" is-pk="true"/>
<field name="agreementItemSeqId" type="id" is-pk="true"/>
<field name="geoId" type="id" is-pk="true"/>
<relationship type="one" related="mantle.party.agreement.AgreementItem">
<key-map field-name="agreementId"/>
<key-map field-name="agreementItemSeqId"/>
</relationship>
<relationship type="one" related="Geo"/>
</entity>
<entity entity-name="AgreementItemParty" package="mantle.party.agreement">
<field name="agreementId" type="id" is-pk="true"/>
<field name="agreementItemSeqId" type="id" is-pk="true"/>
<field name="partyId" type="id" is-pk="true"/>
<field name="roleTypeId" type="id" is-pk="true"/>
<relationship type="one" related="mantle.party.agreement.AgreementItem">
<key-map field-name="agreementId"/>
<key-map field-name="agreementItemSeqId"/>
</relationship>
<relationship type="one" related="mantle.party.Party"/>
<relationship type="one" related="mantle.party.RoleType"/>
</entity>
<entity entity-name="AgreementItemWorkEffort" package="mantle.party.agreement">
<field name="agreementId" type="id" is-pk="true"/>
<field name="agreementItemSeqId" type="id" is-pk="true"/>
<field name="workEffortId" type="id" is-pk="true"/>
<relationship type="one" related="mantle.party.agreement.AgreementItem">
<key-map field-name="agreementId"/>
<key-map field-name="agreementItemSeqId"/>
</relationship>
<relationship type="one" related="mantle.work.effort.WorkEffort"/>
</entity>
<!-- ========================================================= -->
<!-- mantle.party.communication -->
<!-- ========================================================= -->
<entity entity-name="CommunicationEvent" package="mantle.party.communication" short-alias="communicationEvents" cache="never">
<field name="communicationEventId" type="id" is-pk="true"/>
<field name="communicationEventTypeId" type="id"/>
<field name="contactMechTypeEnumId" type="id"/>
<field name="statusId" type="id" enable-audit-log="true"/>
<field name="parentCommEventId" type="id"/>
<field name="rootCommEventId" type="id"/>
<field name="fromContactMechId" type="id"/>
<field name="toContactMechId" type="id"/>
<field name="fromPartyId" type="id" enable-audit-log="update"/>
<field name="fromRoleTypeId" type="id"/>
<field name="toPartyId" type="id" enable-audit-log="update"/>
<field name="toRoleTypeId" type="id"/>
<field name="entryDate" type="date-time"/>
<field name="datetimeStarted" type="date-time"/>
<field name="datetimeEnded" type="date-time"/>
<field name="subject" type="text-long"/>
<field name="contentType" type="text-medium"/>
<field name="body" type="text-very-long"/>
<field name="note" type="text-long"/>