1 |
/* |
/* |
2 |
|
|
3 |
Decripción en zot de la estructura de la base de datos (DER/ERD) |
Decripción en zot de la estructura de la base de datos (DER/ERD) |
4 |
zot description of the ERD/DER |
zot description of the ERD/DER |
14 |
en minúscula, separando palabras con barras bajas, y en |
en minúscula, separando palabras con barras bajas, y en |
15 |
singular. Es decir, por ejemplo, si la tabla describe la |
singular. Es decir, por ejemplo, si la tabla describe la |
16 |
estructura de los productos se llamará product_structure. |
estructura de los productos se llamará product_structure. |
17 |
|
|
18 |
Las tablas que se utilizan para expresar relaciones n:n llevarán |
Las tablas que se utilizan para expresar relaciones n:n llevarán |
19 |
su nombre en plural. |
su nombre en plural. |
20 |
|
|
21 |
Cuando una tabla se refiere a cosas de la empresa origen, es decir, |
Cuando una tabla se refiere a cosas de la empresa origen, es decir, |
22 |
la que está corriendo _esta_ instancia de PAPO, entonces esa tabla |
la que está corriendo _esta_ instancia de PAPO, entonces esa tabla |
23 |
es own_algo. Por ejemplo la tabla que se refiere a los documentos |
es own_algo. Por ejemplo la tabla que se refiere a los documentos |
87 |
is_void (boolean) |
is_void (boolean) |
88 |
|
|
89 |
# what day was this document made? |
# what day was this document made? |
90 |
date (timestamp) |
date (timestamp) |
91 |
|
|
92 |
# what is the number printed on this document? |
# what is the number printed on this document? |
93 |
number (char(30)) |
number (char(30)) |
105 |
# blow your mind |
# blow your mind |
106 |
observations (text) |
observations (text) |
107 |
|
|
108 |
# generates an accounting entry |
# generates an accounting entry |
109 |
:entry: |
:entry: |
110 |
|
|
111 |
/* |
/* |
125 |
# how much? |
# how much? |
126 |
amount (numeric(12,4)) |
amount (numeric(12,4)) |
127 |
|
|
128 |
# generates an accounting entry |
# generates an accounting entry |
129 |
:entry: |
:entry: |
130 |
|
|
131 |
/* |
/* |
252 |
|
|
253 |
# price used (points to historic value) |
# price used (points to historic value) |
254 |
price -> price |
price -> price |
255 |
unit_price (numeric(12,4)) |
unit_price (numeric(12,4)) |
256 |
|
|
257 |
# genealogical parent |
# genealogical parent |
258 |
own_item -> own_item |
own_item -> own_item |
275 |
:entry: |
:entry: |
276 |
|
|
277 |
/* |
/* |
278 |
|
own_maintenance_item |
279 |
|
*/ |
280 |
|
own_product_stock_item(own_item): |
281 |
|
id (bigserial) |
282 |
|
own_item -> own_item |
283 |
|
product -> product |
284 |
|
# the difference betwwen what the system sy s and what the real world says |
285 |
|
# may be negative |
286 |
|
difference (numeric(12,4)) |
287 |
|
observations (text) |
288 |
|
|
289 |
|
/* |
290 |
own_item_tax |
own_item_tax |
291 |
*/ |
*/ |
292 |
own_item_tax: |
own_item_tax: |
579 |
product -> product |
product -> product |
580 |
# price per unit |
# price per unit |
581 |
unit_price (numeric(12,4)) |
unit_price (numeric(12,4)) |
582 |
# the currency in which the price is |
# the currency in which the price is |
583 |
currency_type -> currency_type |
currency_type -> currency_type |
584 |
# if the product is excluded for the this price_type |
# if the product is excluded for the this price_type |
585 |
excluded (boolean) |
excluded (boolean) |
671 |
:account: |
:account: |
672 |
/* |
/* |
673 |
entity_type |
entity_type |
674 |
# the different kinds that an entity can be. |
# the different kinds that an entity can be. |
675 |
*/ |
*/ |
676 |
|
|
677 |
entity_types: |
entity_types: |
682 |
|
|
683 |
/* |
/* |
684 |
entity_type_uid_conf |
entity_type_uid_conf |
685 |
|
|
686 |
*/ |
*/ |
687 |
|
|
688 |
entity_type_uid_conf: |
entity_type_uid_conf: |
749 |
|
|
750 |
/* |
/* |
751 |
address is general: address, telephone, url, whatever attributes to locate entities. |
address is general: address, telephone, url, whatever attributes to locate entities. |
752 |
the value is in address and the type in address_type as obvious |
the value is in address and the type in address_type as obvious |
753 |
*/ |
*/ |
754 |
|
|
755 |
address: |
address: |
803 |
name (varchar(255)) |
name (varchar(255)) |
804 |
:history: |
:history: |
805 |
|
|
806 |
/* |
/* |
807 |
entity categories and attributes. |
entity categories and attributes. |
808 |
intended to group entities of the same categories |
intended to group entities of the same categories |
809 |
example: |
example: |
810 |
category type category attribute |
category type category attribute |
811 |
size <------ big , |
size <------ big , |
812 |
|__ small |
|__ small |
813 |
|__ mid |
|__ mid |
835 |
:history: |
:history: |
836 |
|
|
837 |
category_entity_type: |
category_entity_type: |
838 |
id (serial) |
id (serial) |
839 |
entity_type -> entity_type |
entity_type -> entity_type |
840 |
category_type -> category_type |
category_type -> category_type |
841 |
:history: |
:history: |
944 |
/* |
/* |
945 |
tax_profile and persona_tax_profile |
tax_profile and persona_tax_profile |
946 |
|
|
947 |
different personæ belogn in different 'tax brackets'; each of these |
different personæ belong in different 'tax brackets'; each of these |
948 |
would be a profile. So you tag a persona as belonging to a certain tax |
would be a profile. So you tag a persona as belonging to a certain tax |
949 |
bracket. This means you should define one tax_profile for each bracket |
bracket. This means you should define one tax_profile for each bracket |
950 |
for each tax... |
for each tax... |
1147 |
/* |
/* |
1148 |
movement and movement_type |
movement and movement_type |
1149 |
|
|
1150 |
this is the father of all movement_*. |
this is the father of all movement_*. |
1151 |
|
|
1152 |
*/ |
*/ |
1153 |
movement: |
movement: |
1175 |
id (serial) |
id (serial) |
1176 |
name (varchar(50)) |
name (varchar(50)) |
1177 |
rate (numeric(10,2)) |
rate (numeric(10,2)) |
1178 |
# the format in which the currency values are shown. ie Dollar -> "U$D %2f" |
# the format in which the currency values are shown. ie Dollar -> "U$D %2f" |
1179 |
format (varchar(50)) |
format (varchar(50)) |
1180 |
:account: |
:account: |
1181 |
:history: |
:history: |
1306 |
# when the cheque is due |
# when the cheque is due |
1307 |
credit_date (timestamp) |
credit_date (timestamp) |
1308 |
emmited_by (varchar(80)) |
emmited_by (varchar(80)) |
1309 |
# should be an educated guess |
# should be an educated guess |
1310 |
_delay (int) |
_delay (int) |
1311 |
:account: |
:account: |
1312 |
:entry: |
:entry: |
1658 |
|
|
1659 |
task_recipient: |
task_recipient: |
1660 |
task -> task |
task -> task |
1661 |
to_make_to -> entity |
to_make_to -> entity |
1662 |
|
|
1663 |
erm_task: |
erm_task: |
1664 |
id (serial) |
id (serial) |
1665 |
task -> task |
task -> task |
1666 |
erm -> erm |
erm -> erm |
1667 |
|
|
1668 |
erm: |
erm: |
1669 |
id (serial) |
id (serial) |
1670 |
description (varchar(80)) |
description (varchar(80)) |
1671 |
time (timestamp) |
time (timestamp) |
1679 |
|
|
1680 |
erm_entity: |
erm_entity: |
1681 |
id (serial) |
id (serial) |
1682 |
erm -> erm |
erm -> erm |
1683 |
made_to -> entity_types |
made_to -> entity_types |
1684 |
|
|
1685 |
# apunta a entity types para poder discriminarlo por el |
# apunta a entity types para poder discriminarlo por el |
1686 |
# tipo de entidad que se lo esta registrando |
# tipo de entidad que se lo esta registrando |
1687 |
# en el caso de que la entidad tenga más de un tipo |
# en el caso de que la entidad tenga más de un tipo |
1688 |
|
|
1689 |
erm_log: |
erm_log: |
1690 |
id (serial) |
id (serial) |
1695 |
id (serial) |
id (serial) |
1696 |
erm -> erm |
erm -> erm |
1697 |
file -> file |
file -> file |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|