379 |
|
|
380 |
# the maximum length of this name |
# the maximum length of this name |
381 |
maximum_length (int) |
maximum_length (int) |
382 |
|
:history: |
383 |
|
|
384 |
/* |
/* |
385 |
product_name_type |
product_name_type |
404 |
product -> product |
product -> product |
405 |
type -> product_code_type |
type -> product_code_type |
406 |
code (varchar(30)) |
code (varchar(30)) |
407 |
|
:history: |
408 |
|
|
409 |
product_code_type: |
product_code_type: |
410 |
id (serial) |
id (serial) |
423 |
product -> product |
product -> product |
424 |
type -> product_measure_type |
type -> product_measure_type |
425 |
measure (numeric(12,4)) |
measure (numeric(12,4)) |
426 |
|
:history: |
427 |
|
|
428 |
product_measure_type: |
product_measure_type: |
429 |
id (serial) |
id (serial) |
523 |
id (bigserial) |
id (bigserial) |
524 |
product -> product |
product -> product |
525 |
file -> file |
file -> file |
526 |
|
:history: |
527 |
|
|
528 |
/* |
/* |
529 |
File |
File |
622 |
document_type -> document_type |
document_type -> document_type |
623 |
branch -> entity |
branch -> entity |
624 |
number (char(30)) |
number (char(30)) |
625 |
|
:history: |
626 |
|
|
627 |
/* |
/* |
628 |
Entity |
Entity |
653 |
# blow your mind |
# blow your mind |
654 |
observations (text) |
observations (text) |
655 |
:history: |
:history: |
656 |
|
:account: |
657 |
|
|
658 |
/* |
/* |
659 |
entity_uid and entity_uid_type |
entity_uid and entity_uid_type |
663 |
*/ |
*/ |
664 |
entity_uid_type: |
entity_uid_type: |
665 |
id (serial) |
id (serial) |
666 |
name |
name (varchar(255)) |
667 |
|
:history: |
668 |
|
|
669 |
entity_uid: |
entity_uid: |
670 |
id (serial) |
id (serial) |
671 |
_type -> entity_uid_type |
_type -> entity_uid_type |
672 |
uid (varchar(50)) |
uid (varchar(50)) |
673 |
|
:history: |
674 |
|
|
675 |
/* |
/* |
676 |
entity_currency |
entity_currency |
682 |
id (serial) |
id (serial) |
683 |
entity -> entity |
entity -> entity |
684 |
currency-> currency |
currency-> currency |
685 |
|
:history: |
686 |
|
|
687 |
/* |
/* |
688 |
credit_limit |
credit_limit |
757 |
entity_from -> entity |
entity_from -> entity |
758 |
entity_to -> entity |
entity_to -> entity |
759 |
relation -> relation_type |
relation -> relation_type |
760 |
|
:history: |
761 |
|
|
762 |
relation_type: |
relation_type: |
763 |
id (serial) |
id (serial) |
775 |
alien_entity: |
alien_entity: |
776 |
id (serial) |
id (serial) |
777 |
entity -> entity |
entity -> entity |
778 |
:account: |
:history: |
779 |
|
|
780 |
/* |
/* |
781 |
own_entity |
own_entity |
788 |
own_entity: |
own_entity: |
789 |
id (serial) |
id (serial) |
790 |
entity -> entity |
entity -> entity |
791 |
:account: |
:history: |
792 |
|
|
793 |
/* |
/* |
794 |
alien_storehouse |
alien_storehouse |
801 |
alien_storehouse: |
alien_storehouse: |
802 |
id (serial) |
id (serial) |
803 |
alien_entity -> alien_entity |
alien_entity -> alien_entity |
804 |
:account: |
:history: |
805 |
|
|
806 |
|
|
807 |
/* |
/* |
808 |
Contact |
Contact |
815 |
contact: |
contact: |
816 |
id (serial) |
id (serial) |
817 |
alien_entity -> alien_entity |
alien_entity -> alien_entity |
818 |
|
:history: |
819 |
|
|
820 |
/* |
/* |
821 |
Persona |
Persona |
830 |
persona: |
persona: |
831 |
id (serial) |
id (serial) |
832 |
alien_entity -> alien_entity |
alien_entity -> alien_entity |
833 |
:account: |
:history: |
834 |
|
|
835 |
/* |
/* |
836 |
Client |
Client |
848 |
price_type -> price_type |
price_type -> price_type |
849 |
|
|
850 |
# how much commission we get for selling to this person |
# how much commission we get for selling to this person |
851 |
commission (numeric(10,2)) |
commission -> commission |
852 |
# app-specific score, for contests, bonuses, or whatever |
# app-specific score, for contests, bonuses, or whatever |
853 |
score (int) |
score (int) |
|
:account: |
|
854 |
:history: |
:history: |
855 |
|
|
856 |
/* |
/* |
863 |
provider: |
provider: |
864 |
id (serial) |
id (serial) |
865 |
persona -> persona |
persona -> persona |
866 |
:account: |
:history: |
867 |
|
|
868 |
/* |
/* |
869 |
tax_profile and persona_tax_profile |
tax_profile and persona_tax_profile |
884 |
id (serial) |
id (serial) |
885 |
persona -> entity |
persona -> entity |
886 |
profile -> tax_profile |
profile -> tax_profile |
887 |
|
:history: |
888 |
|
|
889 |
/* |
/* |
890 |
Employee |
Employee |
901 |
# how much commission this employee gets for selling stuff in |
# how much commission this employee gets for selling stuff in |
902 |
# general |
# general |
903 |
commission -> commission |
commission -> commission |
904 |
|
:history: |
905 |
|
|
906 |
/* |
/* |
907 |
employee_comm_x_client |
employee_comm_x_client |
918 |
employee -> entity |
employee -> entity |
919 |
client -> entity |
client -> entity |
920 |
commission -> commission |
commission -> commission |
921 |
|
:history: |
922 |
|
|
923 |
/* |
/* |
924 |
employee_commission_x_product |
employee_commission_x_product |
932 |
employee -> entity |
employee -> entity |
933 |
product -> product |
product -> product |
934 |
commission -> commission |
commission -> commission |
935 |
|
:history: |
936 |
|
|
937 |
/* |
/* |
938 |
employee_commission_x_product_n_client |
employee_commission_x_product_n_client |
947 |
product -> product |
product -> product |
948 |
client -> entity |
client -> entity |
949 |
commission -> commission |
commission -> commission |
950 |
|
:history: |
951 |
|
|
952 |
/* |
/* |
953 |
commission_x_proudct_n_client |
commission_x_proudct_n_client |
961 |
product -> product |
product -> product |
962 |
client -> entity |
client -> entity |
963 |
commission -> commission |
commission -> commission |
964 |
|
:history: |
965 |
|
|
966 |
|
|
967 |
/* |
/* |
979 |
id (serial) |
id (serial) |
980 |
role -> role |
role -> role |
981 |
employee -> entity |
employee -> entity |
982 |
|
:history: |
983 |
|
|
984 |
/* |
/* |
985 |
own_storehouse |
own_storehouse |
992 |
own_storehouse: |
own_storehouse: |
993 |
id (serial) |
id (serial) |
994 |
own_entity -> own_entity |
own_entity -> own_entity |
995 |
|
:history: |
996 |
|
|
997 |
/* |
/* |
998 |
own_branch |
own_branch |
1005 |
own_branch: |
own_branch: |
1006 |
id (serial) |
id (serial) |
1007 |
own_entity -> own_entity |
own_entity -> own_entity |
1008 |
|
:history: |
1009 |
|
|
1010 |
/* |
/* |
1011 |
tax |
tax |
1130 |
persona -> persona |
persona -> persona |
1131 |
# you can get at this from entity_relation |
# you can get at this from entity_relation |
1132 |
# bank -> bank |
# bank -> bank |
1133 |
|
:history: |
1134 |
|
|
1135 |
/* |
/* |
1136 |
Bank |
Bank |
1157 |
id (serial) |
id (serial) |
1158 |
|
|
1159 |
# the bank |
# the bank |
1160 |
bank -> bank |
bank -> bank_branch |
1161 |
|
|
1162 |
# how much we think we had in the bank |
# how much we think we had in the bank |
1163 |
credit (numeric(12,4)) |
credit (numeric(12,4)) |
1252 |
ticket: |
ticket: |
1253 |
id (serial) |
id (serial) |
1254 |
:account: |
:account: |
1255 |
|
:history: |
1256 |
|
|
1257 |
/* |
/* |
1258 |
ticket_movement |
ticket_movement |
1367 |
id (serial) |
id (serial) |
1368 |
name (varchar(80)) |
name (varchar(80)) |
1369 |
parent -> account_plan |
parent -> account_plan |
1370 |
|
:history: |
1371 |
|
|
1372 |
/* |
/* |
1373 |
logical_structure |
logical_structure |
1396 |
:history: |
:history: |
1397 |
|
|
1398 |
/* |
/* |
1399 |
Logical2Physical |
logical2physical |
1400 |
|
|
1401 |
what logical structures are contained in which physical structures (or |
what logical structures are contained in which physical structures (or |
1402 |
viceversa) |
viceversa) |
1406 |
id (serial) |
id (serial) |
1407 |
logical -> logical_structure |
logical -> logical_structure |
1408 |
physical -> physical_structure |
physical -> physical_structure |
1409 |
|
:history: |
1410 |
|
|
1411 |
/* |
/* |
1412 |
Entry |
Entry |
1437 |
commission: |
commission: |
1438 |
id (serial) |
id (serial) |
1439 |
name (varchar(80)) |
name (varchar(80)) |
1440 |
|
rule (text) |
1441 |
:history: |
:history: |
1442 |
|
|
1443 |
/* |
/* |