· 6 years ago · Nov 18, 2019, 10:28 AM
1create table if not exist modules.core_service (
2 created_at timestamp with time zone default now(),
3 owner text,
4 status text,
5 state text
6);
7
8create table if not exists modules.core_account (
9 id serial primary key,
10 name text,
11 login text,
12 passwd text,
13 sedo text,
14 status text,
15 attributes jsonb,
16);
17
18create table if not exist modules.core_connector (
19 id serial primary key,
20 name text,
21 relation text,
22 organization integer not null references modules.core_organization (id),
23 active bool default false,
24 auto_sign bool not null
25)
26
27create table if not exists modules.core_signer (
28 id serial primary key,
29 account integer not null references modules.core_account (id),
30 first_name text,
31 middle_name text,
32 last_name text,
33 title text,
34 authority text,
35 org_authority text,
36 attributes jsonb
37);
38
39create table if not exists modules.core_organization (
40 id serial primary key,
41 sedo_uid varchar (256),
42 fns_uid varchar (256),
43
44 inn varchar(12) not null,
45 orgid varchar(100) not null,
46 kpp varchar(9),
47 ogrn varchar(15),
48 name varchar(256) not null,
49
50 type smallint not null references modules.counterparty_dictionary (i_type),
51
52 country varchar(16),
53 region varchar(64),
54 postal_code varchar(16),
55 territory varchar(64),
56 city varchar(64),
57 locality varchar(64),
58 street varchar(64),
59 buildings varchar(64),
60 block varchar(64),
61 apartment varchar(64),
62 foreigncode varchar(64),
63 foreignaddress varchar(64),
64 gar varchar(256),
65);