Add share_user support to Invoice and SO ListItem.
[xtuple] / enyo-client / database / orm / models / invoice.json
1 [
2   {
3     "context": "xtuple",
4     "nameSpace": "XM",
5     "type": "Invoice",
6     "table": "xt.invcheadinfo",
7     "isRest": true,
8     "idSequenceName": "invchead_invchead_id_seq",
9     "orderSequence":"InvcNumber",
10     "lockable": true,
11     "comment": "Invoice Map",
12     "privileges": {
13       "all": {
14         "create": "MaintainMiscInvoices",
15         "read": "ViewMiscInvoices",
16         "update": "MaintainMiscInvoices",
17         "delete": "MaintainMiscInvoices"
18       },
19       "attribute": {
20         "isPosted": {
21           "update": false
22         },
23         "isPrinted": {
24           "update": false
25         },
26         "isVoid": {
27           "update": false
28         }
29       }
30     },
31     "properties": [
32       {
33         "name": "id",
34         "attr": {
35           "type": "Number",
36           "column": "invchead_id",
37           "isPrimaryKey": true
38         }
39       },
40       {
41         "name": "number",
42         "attr": {
43           "type": "String",
44           "column": "invchead_invcnumber",
45           "isNaturalKey": true
46         }
47       },
48       {
49         "name": "invoiceDate",
50         "attr": {
51           "type": "Date",
52           "column": "invchead_invcdate",
53           "required": true
54         }
55       },
56       {
57         "name": "dueDate",
58         "attr": {
59           "type": "Date",
60           "column": "due_date"
61         }
62       },
63       {
64         "name": "discountDate",
65         "attr": {
66           "type": "Date",
67           "column": "dis_date"
68         }
69       },
70       {
71         "name": "isPrinted",
72         "attr": {
73           "type": "Boolean",
74           "column": "invchead_printed",
75           "required": true
76         }
77       },
78       {
79         "name": "isPosted",
80         "attr": {
81           "type": "Boolean",
82           "column": "invchead_posted",
83           "required": true
84         }
85       },
86       {
87         "name": "isVoid",
88         "attr": {
89           "type": "Boolean",
90           "column": "invchead_void",
91           "required": true
92         }
93       },
94       {
95         "name": "customer",
96         "toOne": {
97           "type": "BillingCustomer",
98           "column": "invchead_cust_id",
99           "isNested": true,
100           "required": true
101         }
102       },
103       {
104         "name": "billtoName",
105         "attr": {
106           "type": "String",
107           "column": "invchead_billto_name"
108         }
109       },
110       {
111         "name": "billtoAddress1",
112         "attr": {
113           "type": "String",
114           "column": "invchead_billto_address1"
115         }
116       },
117       {
118         "name": "billtoAddress2",
119         "attr": {
120           "type": "String",
121           "column": "invchead_billto_address2"
122         }
123       },
124       {
125         "name": "billtoAddress3",
126         "attr": {
127           "type": "String",
128           "column": "invchead_billto_address3"
129         }
130       },
131       {
132         "name": "billtoCity",
133         "attr": {
134           "type": "String",
135           "column": "invchead_billto_city"
136         }
137       },
138       {
139         "name": "billtoState",
140         "attr": {
141           "type": "String",
142           "column": "invchead_billto_state"
143         }
144       },
145       {
146         "name": "billtoPostalCode",
147         "attr": {
148           "type": "String",
149           "column": "invchead_billto_zipcode"
150         }
151       },
152       {
153         "name": "billtoCountry",
154         "attr": {
155           "type": "String",
156           "column": "invchead_billto_country"
157         }
158       },
159       {
160         "name": "billtoPhone",
161         "attr": {
162           "type": "String",
163           "column": "invchead_billto_phone"
164         }
165       },
166       {
167         "name": "currency",
168         "toOne": {
169           "type": "Currency",
170           "column": "invchead_curr_id"
171         }
172       },
173       {
174         "name": "terms",
175         "toOne": {
176           "type": "Terms",
177           "column": "invchead_terms_id",
178           "isNested": true
179         }
180       },
181       {
182         "name": "salesRep",
183         "toOne": {
184           "type": "SalesRep",
185           "column": "invchead_salesrep_id"
186         }
187       },
188       {
189         "name": "commission",
190         "attr": {
191           "type": "Percent",
192           "column": "invchead_commission",
193           "required": true
194         }
195       },
196       {
197         "name": "saleType",
198         "toOne": {
199           "type": "SaleType",
200           "column": "invchead_saletype_id"
201         }
202       },
203       {
204         "name": "customerPurchaseOrderNumber",
205         "attr": {
206           "type": "String",
207           "column": "invchead_ponumber"
208         }
209       },
210       {
211         "name": "taxZone",
212         "toOne": {
213           "type": "TaxZone",
214           "column": "invchead_taxzone_id"
215         }
216       },
217       {
218         "name": "notes",
219         "attr": {
220           "type": "String",
221           "column": "invchead_notes"
222         }
223       },
224       {
225         "name": "miscCharge",
226         "attr": {
227           "type": "Money",
228           "column": "invchead_misc_amount"
229         }
230       },
231       {
232         "name": "recurringInvoice",
233         "toOne": {
234           "type": "InvoiceRelation",
235           "column": "invchead_recurring_invchead_id"
236         }
237       },
238       {
239         "name": "allocatedCredit",
240         "attr": {
241           "type": "Money",
242           "column": "allocated_credit"
243         }
244       },
245       {
246         "name": "outstandingCredit",
247         "attr": {
248           "type": "Money",
249           "column": "outstanding_credit"
250         }
251       },
252       {
253         "name": "subtotal",
254         "attr": {
255           "type": "Money",
256           "column": "subtotal"
257         }
258       },
259       {
260         "name": "taxTotal",
261         "attr": {
262           "type": "Money",
263           "column": "tax_total"
264         }
265       },
266       {
267         "name": "total",
268         "attr": {
269           "type": "Money",
270           "column": "total"
271         }
272       },
273       {
274         "name": "balance",
275         "attr": {
276           "type": "Money",
277           "column": "balance"
278         }
279       },
280       {
281         "name": "characteristics",
282         "toMany": {
283           "type": "InvoiceCharacteristic",
284           "column": "invchead_id",
285           "inverse": "invoice",
286           "isNested": true
287         }
288       },
289       {
290         "name": "lineItems",
291         "toMany": {
292           "isNested": true,
293           "type": "InvoiceLine",
294           "column": "invchead_id",
295           "inverse": "invoice"
296         }
297       },
298       {
299         "name": "taxAdjustments",
300         "toMany": {
301           "isNested": true,
302           "type": "InvoiceTax",
303           "column": "invchead_id",
304           "inverse": "invoice"
305         }
306       },
307       {
308         "name": "allocations",
309         "toMany": {
310           "isNested": true,
311           "type": "InvoiceAllocation",
312           "column": "invchead_id",
313           "inverse": "invoice"
314         }
315       },
316       {
317         "name": "contacts",
318         "toMany": {
319           "isNested": true,
320           "type": "InvoiceContact",
321           "column": "invchead_id",
322           "inverse": "source"
323         }
324       },
325       {
326         "name": "accounts",
327         "toMany": {
328           "isNested": true,
329           "type": "InvoiceAccount",
330           "column": "invchead_id",
331           "inverse": "source"
332         }
333       },
334       {
335         "name": "customers",
336         "toMany": {
337           "isNested": true,
338           "type": "InvoiceCustomer",
339           "column": "invchead_id",
340           "inverse": "source"
341         }
342       },
343       {
344         "name": "files",
345         "toMany": {
346           "isNested": true,
347           "type": "InvoiceFile",
348           "column": "invchead_id",
349           "inverse": "source"
350         }
351       },
352       {
353         "name": "urls",
354         "toMany": {
355           "isNested": true,
356           "type": "InvoiceUrl",
357           "column": "invchead_id",
358           "inverse": "source"
359         }
360       },
361       {
362         "name": "items",
363         "toMany": {
364           "isNested": true,
365           "type": "InvoiceItem",
366           "column": "invchead_id",
367           "inverse": "source"
368         }
369       }
370     ],
371     "isSystem": true
372   },
373   {
374     "context": "xtuple",
375     "nameSpace": "XM",
376     "type": "InvoiceListItem",
377     "table": "xt.invcheadinfo",
378     "isRest": true,
379     "idSequenceName": "invchead_invchead_id_seq",
380     "lockable": true,
381     "comment": "Invoice List Item Map",
382     "privileges": {
383       "all": {
384         "create": false,
385         "read": "MaintainMiscInvoices ViewMiscInvoices",
386         "update": false,
387         "delete": false
388       },
389       "personal": {
390         "create": false,
391         "read": "ViewPersonalCRMAccounts",
392         "update": false,
393         "delete": false,
394         "properties": [
395           "crmaccountUsers"
396         ]
397       }
398     },
399     "properties": [
400       {
401         "name": "id",
402         "attr": {
403           "type": "Number",
404           "column": "invchead_id",
405           "isPrimaryKey": true
406         }
407       },
408       {
409         "name": "number",
410         "attr": {
411           "type": "String",
412           "column": "invchead_invcnumber",
413           "isNaturalKey": true
414         }
415       },
416       {
417         "name": "invoiceDate",
418         "attr": {
419           "type": "Date",
420           "column": "invchead_invcdate",
421           "required": true
422         }
423       },
424       {
425         "name": "isPrinted",
426         "attr": {
427           "type": "Boolean",
428           "column": "invchead_printed",
429           "required": true
430         }
431       },
432       {
433         "name": "isPosted",
434         "attr": {
435           "type": "Boolean",
436           "column": "invchead_posted",
437           "required": true
438         }
439       },
440       {
441         "name": "isVoid",
442         "attr": {
443           "type": "Boolean",
444           "column": "invchead_void",
445           "required": true
446         }
447       },
448       {
449         "name": "total",
450         "attr": {
451           "type": "Money",
452           "column": "total"
453         }
454       },
455       {
456         "name": "currency",
457         "toOne": {
458           "type": "Currency",
459           "column": "invchead_curr_id"
460         }
461       },
462       {
463         "name": "billtoName",
464         "attr": {
465           "type": "String",
466           "column": "invchead_billto_name"
467         }
468       },
469       {
470         "name": "billtoCity",
471         "attr": {
472           "type": "String",
473           "column": "invchead_billto_city"
474         }
475       },
476       {
477         "name": "billtoState",
478         "attr": {
479           "type": "String",
480           "column": "invchead_billto_state"
481         }
482       },
483       {
484         "name": "billtoCountry",
485         "attr": {
486           "type": "String",
487           "column": "invchead_billto_country"
488         }
489       },
490       {
491         "name": "customer",
492         "toOne": {
493           "type": "BillingCustomer",
494           "column": "invchead_cust_id",
495           "isNested": true,
496           "required": true
497         }
498       },
499       {
500         "name": "crmaccountUsers",
501         "toMany": {
502           "type": "ShareUsers",
503           "column": "obj_uuid",
504           "inverse": "uuid"
505         }
506       }
507     ],
508     "isSystem": true
509   },
510   {
511     "context": "xtuple",
512     "nameSpace": "XM",
513     "type": "InvoiceRelation",
514     "table": "xt.invcheadinfo",
515     "isRest": true,
516     "idSequenceName": "invchead_invchead_id_seq",
517     "lockable": true,
518     "comment": "Invoice Relation Map",
519     "privileges": {
520       "all": {
521         "create": false,
522         "read": true,
523         "update": false,
524         "delete": false
525       }
526     },
527     "properties": [
528       {
529         "name": "id",
530         "attr": {
531           "type": "Number",
532           "column": "invchead_id",
533           "isPrimaryKey": true
534         }
535       },
536       {
537         "name": "number",
538         "attr": {
539           "type": "String",
540           "column": "invchead_invcnumber",
541           "isNaturalKey": true
542         }
543       },
544       {
545         "name": "invoiceDate",
546         "attr": {
547           "type": "Date",
548           "column": "invchead_invcdate",
549           "required": true
550         }
551       },
552       {
553         "name": "isPosted",
554         "attr": {
555           "type": "Boolean",
556           "column": "invchead_posted",
557           "required": true
558         }
559       },
560       {
561         "name": "isVoid",
562         "attr": {
563           "type": "Boolean",
564           "column": "invchead_void",
565           "required": true
566         }
567       },
568       {
569         "name": "customer",
570         "toOne": {
571           "type": "CustomerRelation",
572           "column": "invchead_cust_id",
573           "isNested": true,
574           "required": true
575         }
576       }
577     ],
578     "isSystem": true
579   },
580   {
581     "context": "xtuple",
582     "nameSpace": "XM",
583     "type": "InvoiceCharacteristic",
584     "table": "charass",
585     "idSequenceName": "charass_charass_id_seq",
586     "comment": "Invoice Characteristic Map",
587     "privileges": {
588       "all": {
589         "create": true,
590         "read": true,
591         "update": true,
592         "delete": true
593       }
594     },
595     "properties": [
596       {
597         "name": "id",
598         "attr": {
599           "type": "Number",
600           "column": "charass_id",
601           "isPrimaryKey": true
602         }
603       },
604       {
605         "name": "uuid",
606         "attr": {
607           "type": "String",
608           "column": "obj_uuid",
609           "isNaturalKey": true
610         }
611       },
612       {
613         "name": "targetType",
614         "attr": {
615           "type": "String",
616           "column": "charass_target_type",
617           "value": "I"
618         }
619       },
620       {
621         "name": "invoice",
622         "attr": {
623           "type": "Number",
624           "column": "charass_target_id"
625         }
626       },
627       {
628         "name": "characteristic",
629         "toOne": {
630           "type": "Characteristic",
631           "column": "charass_char_id",
632           "required": true
633         }
634       },
635       {
636         "name": "value",
637         "attr": {
638           "type": "String",
639           "column": "charass_value"
640         }
641       }
642     ],
643     "isNestedOnly": true,
644     "isSystem": true
645   },
646   {
647     "context": "xtuple",
648     "nameSpace": "XM",
649     "type": "InvoiceTax",
650     "table": "invcheadtax",
651     "isRest": true,
652     "idSequenceName": "taxhist_taxhist_id_seq",
653     "comment": "Invoice Tax Map",
654     "privileges": {
655       "all": {
656         "create": true,
657         "read": true,
658         "update": true,
659         "delete": true
660       }
661     },
662     "properties": [
663       {
664         "name": "id",
665         "attr": {
666           "type": "Number",
667           "column": "taxhist_id",
668           "isPrimaryKey": true
669         }
670       },
671       {
672         "name": "uuid",
673         "attr": {
674           "type": "String",
675           "column": "obj_uuid",
676           "isNaturalKey": true
677         }
678       },
679       {
680         "name": "invoice",
681         "attr": {
682           "type": "Number",
683           "column": "taxhist_parent_id"
684         }
685       },
686       {
687         "name": "taxCode",
688         "toOne": {
689           "type": "TaxCode",
690           "column": "taxhist_tax_id",
691           "required": true
692         }
693       },
694       {
695         "name": "amount",
696         "attr": {
697           "type": "Money",
698           "column": "taxhist_tax"
699         }
700       },
701       {
702         "name": "basis",
703         "attr": {
704           "type": "Money",
705           "column": "taxhist_basis",
706           "value": 0
707         }
708       },
709       {
710         "name": "percent",
711         "attr": {
712           "type": "Money",
713           "column": "taxhist_percent",
714           "value": 0
715         }
716       },
717       {
718         "name": "taxRateAmount",
719         "attr": {
720           "type": "Money",
721           "column": "taxhist_amount",
722           "value": 0
723         }
724       },
725       {
726         "name": "taxType",
727         "attr": {
728           "type": "Money",
729           "column": "taxhist_taxtype_id",
730           "value": 3
731         }
732       },
733       {
734         "name": "documentDate",
735         "attr": {
736           "type": "Date",
737           "column": "taxhist_docdate"
738         }
739       }
740     ],
741     "isNestedOnly": true,
742     "isSystem": true
743   },
744   {
745     "context": "xtuple",
746     "nameSpace": "XM",
747     "type": "InvoiceAllocation",
748     "table": "aropenalloc",
749     "isRest": true,
750     "idSequenceName": "aropenalloc_aropenalloc_id_seq",
751     "comment": "Invoice Allocation Map",
752     "privileges": {
753       "all": {
754         "create": "ApplyARMemos",
755         "read": true,
756         "update": "ApplyARMemos",
757         "delete": "ApplyARMemos"
758       }
759     },
760     "properties": [
761       {
762         "name": "id",
763         "attr": {
764           "type": "Number",
765           "column": "aropenalloc_aropen_id",
766           "isPrimaryKey": true
767         }
768       },
769       {
770         "name": "uuid",
771         "attr": {
772           "type": "String",
773           "column": "obj_uuid",
774           "isNaturalKey": true
775         }
776       },
777       {
778         "name": "docType",
779         "attr": {
780           "type": "String",
781           "column": "aropenalloc_doctype",
782           "value": "I"
783         }
784       },
785       {
786         "name": "invoice",
787         "attr": {
788           "type": "Number",
789           "column": "aropenalloc_doc_id"
790         }
791       },
792       {
793         "name": "amount",
794         "attr": {
795           "type": "Money",
796           "column": "aropenalloc_amount"
797         }
798       },
799       {
800         "name": "currency",
801         "toOne": {
802           "type": "Currency",
803           "column": "aropenalloc_curr_id"
804         }
805       }
806     ],
807     "isNestedOnly": true,
808     "isSystem": true
809   },
810   {
811     "context": "xtuple",
812     "nameSpace": "XM",
813     "type": "InvoiceContact",
814     "table": "xt.doc",
815     "idSequenceName": "docass_docass_id_seq",
816     "comment": "Invoice Contact Map",
817     "privileges": {
818       "all": {
819         "create": true,
820         "read": true,
821         "update": false,
822         "delete": true
823       }
824     },
825     "properties": [
826       {
827         "name": "id",
828         "attr": {
829           "type": "Number",
830           "column": "id",
831           "isPrimaryKey": true
832         }
833       },
834       {
835         "name": "uuid",
836         "attr": {
837           "type": "String",
838           "column": "obj_uuid",
839           "isNaturalKey": true
840         }
841       },
842       {
843         "name": "sourceType",
844         "attr": {
845           "type": "String",
846           "column": "source_type",
847           "value": "INV"
848         }
849       },
850       {
851         "name": "source",
852         "attr": {
853           "type": "Number",
854           "column": "source_id"
855         }
856       },
857       {
858         "name": "targetType",
859         "attr": {
860           "type": "String",
861           "column": "target_type",
862           "value": "T"
863         }
864       },
865       {
866         "name": "contact",
867         "toOne": {
868           "isNested": true,
869           "type": "ContactRelation",
870           "column": "target_id"
871         }
872       },
873       {
874         "name": "purpose",
875         "attr": {
876           "type": "String",
877           "column": "purpose"
878         }
879       }
880     ],
881     "isNestedOnly": true,
882     "isSystem": true
883   },
884   {
885     "context": "xtuple",
886     "nameSpace": "XM",
887     "type": "InvoiceAccount",
888     "table": "xt.doc",
889     "idSequenceName": "docass_docass_id_seq",
890     "comment": "Invoice Account Map",
891     "privileges": {
892       "all": {
893         "create": true,
894         "read": true,
895         "update": false,
896         "delete": true
897       }
898     },
899     "properties": [
900       {
901         "name": "id",
902         "attr": {
903           "type": "Number",
904           "column": "id",
905           "isPrimaryKey": true
906         }
907       },
908       {
909         "name": "uuid",
910         "attr": {
911           "type": "String",
912           "column": "obj_uuid",
913           "isNaturalKey": true
914         }
915       },
916       {
917         "name": "sourceType",
918         "attr": {
919           "type": "String",
920           "column": "source_type",
921           "value": "INV"
922         }
923       },
924       {
925         "name": "source",
926         "attr": {
927           "type": "Number",
928           "column": "source_id"
929         }
930       },
931       {
932         "name": "targetType",
933         "attr": {
934           "type": "String",
935           "column": "target_type",
936           "value": "CRMA"
937         }
938       },
939       {
940         "name": "account",
941         "toOne": {
942           "isNested": true,
943           "type": "AccountRelation",
944           "column": "target_id"
945         }
946       },
947       {
948         "name": "purpose",
949         "attr": {
950           "type": "String",
951           "column": "purpose"
952         }
953       }
954     ],
955     "isNestedOnly": true,
956     "isSystem": true
957   },
958   {
959     "context": "xtuple",
960     "nameSpace": "XM",
961     "type": "InvoiceCustomer",
962     "table": "xt.doc",
963     "idSequenceName": "docass_docass_id_seq",
964     "comment": "Invoice Customer Map",
965     "privileges": {
966       "all": {
967         "create": true,
968         "read": true,
969         "update": false,
970         "delete": true
971       }
972     },
973     "properties": [
974       {
975         "name": "id",
976         "attr": {
977           "type": "Number",
978           "column": "id",
979           "isPrimaryKey": true
980         }
981       },
982       {
983         "name": "uuid",
984         "attr": {
985           "type": "String",
986           "column": "obj_uuid",
987           "isNaturalKey": true
988         }
989       },
990       {
991         "name": "sourceType",
992         "attr": {
993           "type": "String",
994           "column": "source_type",
995           "value": "INV"
996         }
997       },
998       {
999         "name": "source",
1000         "attr": {
1001           "type": "Number",
1002           "column": "source_id"
1003         }
1004       },
1005       {
1006         "name": "targetType",
1007         "attr": {
1008           "type": "String",
1009           "column": "target_type",
1010           "value": "C"
1011         }
1012       },
1013       {
1014         "name": "customer",
1015         "toOne": {
1016           "isNested": true,
1017           "type": "CustomerRelation",
1018           "column": "target_id"
1019         }
1020       },
1021       {
1022         "name": "purpose",
1023         "attr": {
1024           "type": "String",
1025           "column": "purpose"
1026         }
1027       }
1028     ],
1029     "isNestedOnly": true,
1030     "isSystem": true
1031   },
1032   {
1033     "context": "xtuple",
1034     "nameSpace": "XM",
1035     "type": "InvoiceFile",
1036     "table": "xt.doc",
1037     "idSequenceName": "docass_docass_id_seq",
1038     "comment": "Invoice File Map",
1039     "privileges": {
1040       "all": {
1041         "create": true,
1042         "read": true,
1043         "update": false,
1044         "delete": true
1045       }
1046     },
1047     "properties": [
1048       {
1049         "name": "id",
1050         "attr": {
1051           "type": "Number",
1052           "column": "id",
1053           "isPrimaryKey": true
1054         }
1055       },
1056       {
1057         "name": "uuid",
1058         "attr": {
1059           "type": "String",
1060           "column": "obj_uuid",
1061           "isNaturalKey": true
1062         }
1063       },
1064       {
1065         "name": "sourceType",
1066         "attr": {
1067           "type": "String",
1068           "column": "source_type",
1069           "value": "INV"
1070         }
1071       },
1072       {
1073         "name": "source",
1074         "attr": {
1075           "type": "Number",
1076           "column": "source_id"
1077         }
1078       },
1079       {
1080         "name": "targetType",
1081         "attr": {
1082           "type": "String",
1083           "column": "target_type",
1084           "value": "FILE"
1085         }
1086       },
1087       {
1088         "name": "file",
1089         "toOne": {
1090           "isNested": true,
1091           "type": "FileRelation",
1092           "column": "target_id"
1093         }
1094       },
1095       {
1096         "name": "purpose",
1097         "attr": {
1098           "type": "String",
1099           "column": "purpose"
1100         }
1101       }
1102     ],
1103     "isNestedOnly": true,
1104     "isSystem": true
1105   },
1106   {
1107     "context": "xtuple",
1108     "nameSpace": "XM",
1109     "type": "InvoiceUrl",
1110     "table": "xt.doc",
1111     "idSequenceName": "docass_docass_id_seq",
1112     "comment": "Invoice Url Map",
1113     "privileges": {
1114       "all": {
1115         "create": true,
1116         "read": true,
1117         "update": false,
1118         "delete": true
1119       }
1120     },
1121     "properties": [
1122       {
1123         "name": "id",
1124         "attr": {
1125           "type": "Number",
1126           "column": "id",
1127           "isPrimaryKey": true
1128         }
1129       },
1130       {
1131         "name": "uuid",
1132         "attr": {
1133           "type": "String",
1134           "column": "obj_uuid",
1135           "isNaturalKey": true
1136         }
1137       },
1138       {
1139         "name": "sourceType",
1140         "attr": {
1141           "type": "String",
1142           "column": "source_type",
1143           "value": "INV"
1144         }
1145       },
1146       {
1147         "name": "source",
1148         "attr": {
1149           "type": "Number",
1150           "column": "source_id"
1151         }
1152       },
1153       {
1154         "name": "targetType",
1155         "attr": {
1156           "type": "String",
1157           "column": "target_type",
1158           "value": "URL"
1159         }
1160       },
1161       {
1162         "name": "url",
1163         "toOne": {
1164           "isNested": true,
1165           "type": "Url",
1166           "column": "target_id"
1167         }
1168       },
1169       {
1170         "name": "purpose",
1171         "attr": {
1172           "type": "String",
1173           "column": "purpose"
1174         }
1175       }
1176     ],
1177     "isNestedOnly": true,
1178     "isSystem": true
1179   },
1180   {
1181     "context": "xtuple",
1182     "nameSpace": "XM",
1183     "type": "InvoiceItem",
1184     "table": "xt.doc",
1185     "idSequenceName": "docass_docass_id_seq",
1186     "comment": "Invoice Item Map",
1187     "privileges": {
1188       "all": {
1189         "create": true,
1190         "read": true,
1191         "update": false,
1192         "delete": true
1193       }
1194     },
1195     "properties": [
1196       {
1197         "name": "id",
1198         "attr": {
1199           "type": "Number",
1200           "column": "id",
1201           "isPrimaryKey": true
1202         }
1203       },
1204       {
1205         "name": "uuid",
1206         "attr": {
1207           "type": "String",
1208           "column": "obj_uuid",
1209           "isNaturalKey": true
1210         }
1211       },
1212       {
1213         "name": "sourceType",
1214         "attr": {
1215           "type": "String",
1216           "column": "source_type",
1217           "value": "INV"
1218         }
1219       },
1220       {
1221         "name": "source",
1222         "attr": {
1223           "type": "Number",
1224           "column": "source_id"
1225         }
1226       },
1227       {
1228         "name": "targetType",
1229         "attr": {
1230           "type": "String",
1231           "column": "target_type",
1232           "value": "I"
1233         }
1234       },
1235       {
1236         "name": "item",
1237         "toOne": {
1238           "isNested": true,
1239           "type": "ItemRelation",
1240           "column": "target_id"
1241         }
1242       },
1243       {
1244         "name": "purpose",
1245         "attr": {
1246           "type": "String",
1247           "column": "purpose"
1248         }
1249       }
1250     ],
1251     "isNestedOnly": true,
1252     "isSystem": true
1253   },
1254   {
1255     "context": "xtuple",
1256     "nameSpace": "XM",
1257     "type": "InvoiceLine",
1258     "table": "xt.invciteminfo",
1259     "isRest": true,
1260     "idSequenceName": "invcitem_invcitem_id_seq",
1261     "comment": "Invoice Line Map",
1262     "privileges": {
1263       "all": {
1264         "create": "MaintainMiscInvoices",
1265         "read": "ViewMiscInvoices",
1266         "update": "MaintainMiscInvoices",
1267         "delete": "MaintainMiscInvoices"
1268       },
1269       "attribute": {
1270         "taxType": {
1271           "create": "OverrideTax",
1272           "read": true,
1273           "update": "OverrideTax"
1274         }
1275       }
1276     },
1277     "properties": [
1278       {
1279         "name": "id",
1280         "attr": {
1281           "type": "Number",
1282           "column": "invcitem_id",
1283           "isPrimaryKey": true
1284         }
1285       },
1286       {
1287         "name": "uuid",
1288         "attr": {
1289           "type": "String",
1290           "column": "obj_uuid",
1291           "isNaturalKey": true
1292         }
1293       },
1294       {
1295         "name": "invoice",
1296         "attr": {
1297           "type": "Number",
1298           "column": "invcitem_invchead_id"
1299         }
1300       },
1301       {
1302         "name": "lineNumber",
1303         "attr": {
1304           "type": "Number",
1305           "column": "invcitem_linenumber"
1306         }
1307       },
1308       {
1309         "name": "item",
1310         "toOne": {
1311           "isNested": true,
1312           "type": "ItemRelation",
1313           "column": "invcitem_item_id",
1314           "required": true
1315         }
1316       },
1317       {
1318         "name": "site",
1319         "toOne": {
1320           "isNested": true,
1321           "type": "SiteRelation",
1322           "column": "invcitem_warehous_id",
1323           "required": true
1324         }
1325       },
1326       {
1327         "name": "customerPartNumber",
1328         "attr": {
1329           "type": "String",
1330           "column": "invcitem_custpn"
1331         }
1332       },
1333       {
1334         "name": "isMiscellaneous",
1335         "attr": {
1336           "type": "Boolean",
1337           "column": "invcitem_is_misc"
1338         }
1339       },
1340       {
1341         "name": "itemNumber",
1342         "attr": {
1343           "type": "String",
1344           "column": "invcitem_number"
1345         }
1346       },
1347       {
1348         "name": "itemDescription",
1349         "attr": {
1350           "type": "String",
1351           "column": "invcitem_descrip"
1352         }
1353       },
1354       {
1355         "name": "quantity",
1356         "attr": {
1357           "type": "Quantity",
1358           "column": "invcitem_ordered"
1359         }
1360       },
1361       {
1362         "name": "quantityUnit",
1363         "toOne": {
1364           "type": "Unit",
1365           "column": "invcitem_qty_uom_id"
1366         }
1367       },
1368       {
1369         "name": "quantityUnitRatio",
1370         "attr": {
1371           "type": "UnitRatio",
1372           "column": "invcitem_qty_invuomratio"
1373         }
1374       },
1375       {
1376         "name": "billed",
1377         "attr": {
1378           "type": "Quantity",
1379           "column": "invcitem_billed"
1380         }
1381       },
1382       {
1383         "name": "customerPrice",
1384         "attr": {
1385           "type": "Number",
1386           "column": "invcitem_custprice"
1387         }
1388       },
1389       {
1390         "name": "price",
1391         "attr": {
1392           "type": "SalesPrice",
1393           "column": "invcitem_price"
1394         }
1395       },
1396       {
1397         "name": "priceUnit",
1398         "toOne": {
1399           "type": "Unit",
1400           "column": "invcitem_price_uom_id"
1401         }
1402       },
1403       {
1404         "name": "priceUnitRatio",
1405         "attr": {
1406           "type": "UnitRatio",
1407           "column": "invcitem_price_invuomratio"
1408         }
1409       },
1410       {
1411         "name": "extendedPrice",
1412         "attr": {
1413           "type": "ExtendedPrice",
1414           "column": "invcitem_ext_price"
1415         }
1416       },
1417       {
1418         "name": "notes",
1419         "attr": {
1420           "type": "String",
1421           "column": "invcitem_notes"
1422         }
1423       },
1424       {
1425         "name": "taxType",
1426         "toOne": {
1427           "type": "TaxType",
1428           "column": "invcitem_taxtype_id"
1429         }
1430       },
1431       {
1432         "name": "taxTotal",
1433         "attr": {
1434           "type": "Money",
1435           "column": "invcitem_tax_total"
1436         }
1437       },
1438       {
1439         "name": "taxes",
1440         "toMany": {
1441           "isNested": true,
1442           "type": "InvoiceLineTax",
1443           "column": "invcitem_id",
1444           "inverse": "parent"
1445         }
1446       }
1447     ],
1448     "isNestedOnly": true,
1449     "isSystem": true
1450   },
1451   {
1452     "context": "xtuple",
1453     "nameSpace": "XM",
1454     "type": "InvoiceLineTax",
1455     "table": "xt.invcitemtaxinfo",
1456     "isRest": true,
1457     "idSequenceName": "taxhist_taxhist_id_seq",
1458     "comment": "Invoice Line Tax Map",
1459     "privileges": {
1460       "all": {
1461         "create": true,
1462         "read": true,
1463         "update": true,
1464         "delete": true
1465       }
1466     },
1467     "properties": [
1468       {
1469         "name": "id",
1470         "attr": {
1471           "type": "Number",
1472           "column": "taxhist_id",
1473           "isPrimaryKey": true
1474         }
1475       },
1476       {
1477         "name": "uuid",
1478         "attr": {
1479           "type": "String",
1480           "column": "obj_uuid",
1481           "isNaturalKey": true
1482         }
1483       },
1484       {
1485         "name": "taxType",
1486         "toOne": {
1487           "type": "TaxType",
1488           "column": "taxhist_taxtype_id"
1489         }
1490       },
1491       {
1492         "name": "taxCode",
1493         "toOne": {
1494           "type": "TaxCode",
1495           "column": "taxhist_tax_id",
1496           "required": true
1497         }
1498       },
1499       {
1500         "name": "parent",
1501         "attr": {
1502           "type": "Number",
1503           "column": "taxhist_parent_id"
1504         }
1505       },
1506       {
1507         "name": "amount",
1508         "attr": {
1509           "type": "Money",
1510           "column": "taxhist_tax"
1511         }
1512       }
1513     ],
1514     "isNestedOnly": true,
1515     "isSystem": true
1516   }
1517 ]