Schema "office"

Tables

# Table Name Owner Tablespace Description
1 cash_repositories postgres DEFAULT This table stores information related to cash repositories.
2 cashiers postgres DEFAULT This table stores information related to cashier.
3 configuration postgres DEFAULT
4 cost_centers postgres DEFAULT
5 counters postgres DEFAULT
6 departments postgres DEFAULT This table stores information on lists of deparments and other associated information.
7 offices postgres DEFAULT This table stores information on various braches of the entity.
8 roles postgres DEFAULT
9 store_types postgres DEFAULT
10 stores postgres DEFAULT
11 users postgres DEFAULT The users table contains users accounts and their login information. It also contains a sys user account which does not have a password. The sys user account is a special account used by the MixERP workflow to perform routine tasks. The sys user cannot have a valid password or cannot be allowed to log in interactively.
12 work_centers postgres DEFAULT

Sequences

# Sequence Name Owner Data Type Start Value Increment Description
1 cash_repositories_cash_repository_id_seq postgres bigint 1 1
2 cashiers_cashier_id_seq postgres bigint 1 1
3 configuration_configuration_id_seq postgres bigint 1 1
4 cost_centers_cost_center_id_seq postgres bigint 1 1
5 counters_counter_id_seq postgres bigint 1 1
6 departments_department_id_seq postgres bigint 1 1
7 offices_office_id_seq postgres bigint 1 1
8 roles_role_id_seq postgres bigint 1 1
9 store_types_store_type_id_seq postgres bigint 1 1
10 stores_store_id_seq postgres bigint 1 1
11 users_user_id_seq postgres bigint 1 1
12 work_centers_work_center_id_seq postgres bigint 1 1

Views

# View Name Owner Tablespace Description
1 cash_repository_scrud_view postgres DEFAULT
2 cash_repository_selector_view postgres DEFAULT
3 cost_center_scrud_view postgres DEFAULT
4 counter_scrud_view postgres DEFAULT
5 department_scrud_view postgres DEFAULT
6 office_scrud_view postgres DEFAULT
7 office_selector_view postgres DEFAULT
8 office_view postgres DEFAULT
9 role_scrud_view postgres DEFAULT
10 role_view postgres DEFAULT
11 sign_in_view postgres DEFAULT
12 store_scrud_view postgres DEFAULT
13 store_selector_view postgres DEFAULT
14 store_type_scrud_view postgres DEFAULT
15 store_type_selector_view postgres DEFAULT
16 store_view postgres DEFAULT
17 user_selector_view postgres DEFAULT
18 user_view postgres DEFAULT
19 work_center_view postgres DEFAULT

Materialized Views

# Matview Name Owner Tablespace Description

Functions

# Function Owner Description
1 can_login(user_id integer_strict, office_id integer_strict, OUT result boolean, OUT message text)
RETURNS record
postgres
2 count_item_in_stock(item_id_ integer, unit_id_ integer, office_id_ integer)
RETURNS numeric
postgres
3 create_user(role_id integer_strict, office_id integer_strict, user_name text, password text, full_name text, elevated boolean DEFAULT false)
RETURNS void
postgres
4 get_cash_repository_id_by_cash_repository_code(text)
RETURNS integer
postgres
5 get_cash_repository_id_by_cash_repository_name(text)
RETURNS integer
postgres
6 get_cost_center_id_by_cost_center_code(text)
RETURNS integer
postgres
7 get_cost_of_good_method(_office_id integer)
RETURNS text
postgres
8 get_logged_in_culture(_user_id integer)
RETURNS text
postgres
9 get_logged_in_office_id(_user_id integer)
RETURNS integer
postgres
10 get_login_id(_user_id integer)
RETURNS bigint
postgres
11 get_office_code_by_id(office_id integer_strict)
RETURNS text
postgres
12 get_office_id_by_cash_repository_id(integer)
RETURNS integer
postgres
13 get_office_id_by_office_code(office_code text)
RETURNS integer
postgres
14 get_office_id_by_store_id(integer)
RETURNS integer
postgres
15 get_office_id_by_user_id(user_id integer_strict)
RETURNS integer
postgres
16 get_office_ids(root_office_id integer)
RETURNS SETOF integer
postgres
17 get_office_name_by_id(office_id integer_strict)
RETURNS text
postgres
18 get_offices()
RETURNS SETOF office.office_type
postgres
19 get_role_code_by_user_name(user_name text)
RETURNS text
postgres
20 get_role_id_by_role_code(text)
RETURNS integer
postgres
21 get_role_id_by_role_name(text)
RETURNS integer
postgres
22 get_role_id_by_use_id(user_id integer_strict)
RETURNS integer
postgres
23 get_store_id_by_store_code(text)
RETURNS integer
postgres
24 get_store_id_by_store_name(text)
RETURNS integer
postgres
25 get_store_name_by_store_id(integer)
RETURNS text
postgres
26 get_store_type_id_by_store_type_code(text)
RETURNS integer
postgres
27 get_sys_user_id()
RETURNS integer
postgres
28 get_user_id_by_user_name(user_name text)
RETURNS integer
postgres
29 get_user_name_by_user_id(user_id integer)
RETURNS text
postgres
30 has_child_offices(integer)
RETURNS boolean
postgres
31 is_admin(integer)
RETURNS boolean
postgres
32 is_parent_office(parent integer_strict, child integer_strict)
RETURNS boolean
postgres
33 is_periodic_inventory(_office_id integer)
RETURNS boolean
postgres
34 is_sys(integer)
RETURNS boolean
postgres
35 is_sys_user(integer)
RETURNS boolean
postgres
36 is_valid_office_id(integer)
RETURNS boolean
postgres
37 sign_in(office_id integer_strict, user_name text, password text, browser text, ip_address text, remote_user text, culture text, challenge text, OUT login_id bigint, OUT message text)
RETURNS record
postgres
38 validate_login(user_name text, password text, challenge text)
RETURNS boolean
postgres

Triggers

# Trigger Owner Description
1 hash_password()
RETURNS TRIGGER
postgres
2 user_trigger()
RETURNS TRIGGER
postgres

Types

# Type Base Type Owner Collation Default Type StoreType NotNull Description
1 office_type - postgres Composite Type Compressed Inline/Seconary False