# | Column Name | Nullable | Data Type | Max Length | Description |
---|---|---|---|---|---|
1 | compound_item_detail_id | integer | 0 | The primary key of this table, which is also a serial field. | |
2 | compound_item_id | integer | 0 | Foreign key to the table core.comound_items | |
3 | item_id | integer | 0 | Foreign key to the table core.items | |
4 | unit_id | integer | 0 | Foreign key to the table core.units. | |
5 | quantity | integer_strict | 0 | The quantity composition of compound items. | |
6 | price | money_strict | 0 | The price detail of compound items. | |
7 | audit_user_id | integer | 0 | Contains the id of the user who last inserted or updated the corresponding row. | |
8 | audit_ts | timestamp with time zone | 0 | Contains the date and timestamp of the last insert or update action. |
# | Column Name | Key Name | References |
---|---|---|---|
2 | compound_item_id | compound_item_details_compound_item_id_fkey | core.compound_items.compound_item_id |
3 | item_id | compound_item_details_item_id_fkey | core.items.item_id |
4 | unit_id | compound_item_details_unit_id_fkey | core.units.unit_id |
7 | audit_user_id | compound_item_details_audit_user_id_fkey | office.users.user_id |
Index Name | Owner | Access Method | Definition | Description |
---|---|---|---|---|
compound_item_details_pkey | postgres | btree | compound_item_detail_id | |
compound_item_details_item_id_uix | postgres | btree | compound_item_id item_id |
Constraint Name | Description |
---|---|
compound_item_details_unit_chk CHECK (core.is_valid_unit(item_id, unit_id)) |
# | Column Name | Default |
---|---|---|
1 | compound_item_detail_id | nextval('core.compound_item_details_compound_item_detail_id_seq'::regclass) |
8 | audit_ts | now() |
Trigger Name | Targets | On Event | Timing | Condition | Order | Orientation | Description |
---|