# | Column Name | Nullable | Data Type | Max Length | Description |
---|---|---|---|---|---|
1 | store_id | integer | 0 | ||
2 | office_id | integer | 0 | ||
3 | store_code | character varying | 12 | ||
4 | store_name | character varying | 50 | ||
5 | address | character varying | 50 | ||
6 | store_type_id | integer | 0 | ||
7 | allow_sales | boolean | 0 | ||
8 | sales_tax_id | integer | 0 | ||
9 | default_cash_account_id | bigint | 0 | ||
10 | default_cash_repository_id | integer | 0 | ||
11 | audit_user_id | integer | 0 | Contains the id of the user who last inserted or updated the corresponding row. | |
12 | 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 | office_id | stores_office_id_fkey | office.offices.office_id |
6 | store_type_id | stores_store_type_id_fkey | office.store_types.store_type_id |
8 | sales_tax_id | stores_sales_tax_id_fkey | core.sales_taxes.sales_tax_id |
9 | default_cash_account_id | stores_default_cash_account_id_fkey | core.accounts.account_id |
10 | default_cash_repository_id | stores_default_cash_repository_id_fkey | office.cash_repositories.cash_repository_id |
11 | audit_user_id | stores_audit_user_id_fkey | office.users.user_id |
Index Name | Owner | Access Method | Definition | Description |
---|---|---|---|---|
stores_pkey | postgres | btree | store_id | |
stores_store_name_uix | postgres | btree | office_id upper(store_name::text) | |
stores_store_code_uix | postgres | btree | office_id upper(store_code::text) |
Constraint Name | Description |
---|---|
store_default_cash_repository_chk CHECK (office.get_office_id_by_cash_repository_id(default_cash_repository_id) = office_id) | |
stores_default_cash_account_id_chk CHECK (core.is_cash_equivalent(default_cash_account_id)) | |
stores_sales_tax_id_chk CHECK (core.get_office_id_by_sales_tax_id(sales_tax_id) = office_id) |
# | Column Name | Default |
---|---|---|
1 | store_id | nextval('office.stores_store_id_seq'::regclass) |
7 | allow_sales | true |
12 | audit_ts | now() |
Trigger Name | Targets | On Event | Timing | Condition | Order | Orientation | Description |
---|