# | Column Name | Nullable | Data Type | Max Length | Description |
---|---|---|---|---|---|
1 | item_opening_inventory_id | bigint | 0 | The primary key of this table, which is also a serial field. | |
2 | entry_ts | timestamp with time zone | 0 | ||
3 | item_id | integer | 0 | Foreign key to the table core.items. | |
4 | store_id | integer | 0 | ||
5 | unit_id | integer | 0 | Foreign key to the table core.items. | |
6 | quantity | integer | 0 | ||
7 | amount | money_strict | 0 | ||
8 | base_unit_id | integer | 0 | ||
9 | base_quantity | numeric | 0 | ||
10 | audit_user_id | integer | 0 | Contains the id of the user who last inserted or updated the corresponding row. | |
11 | audit_ts | timestamp with time zone | 0 | Contains the date and timestamp of the last insert or update action. |
# | Column Name | Key Name | References |
---|---|---|---|
3 | item_id | item_opening_inventory_item_id_fkey | core.items.item_id |
4 | store_id | item_opening_inventory_store_id_fkey | office.stores.store_id |
5 | unit_id | item_opening_inventory_unit_id_fkey | core.units.unit_id |
8 | base_unit_id | item_opening_inventory_base_unit_id_fkey | core.units.unit_id |
10 | audit_user_id | item_opening_inventory_audit_user_id_fkey | office.users.user_id |
Index Name | Owner | Access Method | Definition | Description |
---|---|---|---|---|
item_opening_inventory_pkey | postgres | btree | item_opening_inventory_id |
Constraint Name | Description |
---|---|
item_opening_inventory_unit_chk CHECK (core.is_valid_unit(item_id, unit_id)) |
# | Column Name | Default |
---|---|---|
1 | item_opening_inventory_id | nextval('core.item_opening_inventory_item_opening_inventory_id_seq'::regclass) |
11 | audit_ts | now() |
Trigger Name | Targets | On Event | Timing | Condition | Order | Orientation | Description |
---|