hr.inventory_items
Schema: hr
English table: hr.inventory_items
Italian original table: hr.x_tipi_articoli
Description: Inventory items (articles) with stock quantities and classification by type and unit of measure.
Overview
- Columns: 13
- Primary key: id
- Outgoing foreign keys: 3
- Incoming foreign keys: 1
- Indexes: 4
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Primary key of the record. | |
itm_id | tipoart_id | integer | NO | Business identifier of the inventory item, unique within the tenant. | |
itm_code | tipoart_descrizione | character varying(30) | NO | Item code. | |
itm_item_type_id | tenant_id | integer | NO | Reference to the item type. | |
itm_description | `` | character varying(100) | NO | Item description. | |
itm_stock_qty | `` | numeric(6,2) | NO | Current stock quantity. | |
itm_is_disabled | `` | boolean | NO | Indicates whether the item is disabled. | |
tipoartmis_id | `` | integer | NO | Identifier of the related tipoartmis record. | |
itm_min_stock_qty | `` | numeric(6,2) | NO | Minimum stock quantity threshold. | |
tenant_id | `` | integer | YES | Tenant identifier for row-level partitioning. | |
colcustom | `` | jsonb | YES | '{}'::jsonb | Custom fields in JSON format. |
_deleted | `` | boolean | YES | false | Soft delete flag. |
itm_unit_type_id | `` | bigint | YES | Reference to the unit of measure type. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_init_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
fk_inventory_items_item_type_id | itm_item_type_id, tenant_id | hr.x_tipi_articoli | tipoart_id, tenant_id | RESTRICT | RESTRICT |
fk_inventory_items_unit_type_id | itm_unit_type_id, tenant_id | hr.x_item_units_of_measure | xium_id, tenant_id | RESTRICT | RESTRICT |
Referenced by
| From table | Foreign key | Source columns | Target columns |
|---|---|---|---|
hr.in_articoli_magazzino | fk_art_id | artma_art_id, tenant_id | itm_id, tenant_id |
Constraints
- Primary key:
pk_inventory_items→id - Unique:
c_uk_init_id_tenant→itm_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_itm_tenant | NO | btree | tenant_id |
idx_itm_tenant_item_type | NO | btree | tenant_id, itm_item_type_id) WHERE (_deleted = false |
idx_itm_tenant_itm | NO | btree | tenant_id, itm_id) WHERE (_deleted = false |
idx_itm_tenant_unit_type | NO | btree | tenant_id, itm_unit_type_id) WHERE (_deleted = false |
Navigation
- Back to main index
- [Back to
hrindex]../)