Advertisement
aadddrr

TableBase.sql

Sep 13th, 2017
543
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DELETE FROM t_tenant;
  2. DELETE FROM t_ou;
  3. DELETE FROM t_ou_legal;
  4. DELETE FROM t_user;
  5. DELETE FROM t_role;
  6. DELETE FROM t_user_role;
  7. DELETE FROM t_policy;
  8.  
  9.  
  10. INSERT INTO t_tenant(
  11.             tenant_id, tenant_code, description, tenant_key, tenant_name,
  12.             email, host, create_datetime, create_user_id, update_datetime,
  13.             update_user_id, version, active, active_datetime, non_active_datetime)
  14.     VALUES (10, 'STS', 'Solusi Teknologi Sejati, PT', 'c86ee0d9d7ed3e7b4fdbf486fa6c0ebb', 'INDOCOM NIAGA, PT',
  15.             'admin@indocomniaga.co.id', ' ', '20141104181100', -1, '20141104181100',
  16.             -1, 0, 'Y', '20141104181100', ' ');
  17.            
  18.  
  19. INSERT INTO t_ou(
  20.             ou_id, tenant_id, ou_code, ou_name, ou_parent_id, ou_type_id,
  21.             create_datetime, create_user_id, update_datetime, update_user_id,
  22.             version, active, active_datetime, non_active_datetime)
  23.     VALUES (10, 10, 'IN', 'Indocom Niaga, PT', -99, 10, '20140708143200', -1, '20140708143200', -1, 0, 'Y', '20140708143200', ' '),
  24.             (11, 10, 'NC', 'Niaga Computindo', -99, 10, '20140708143200', -1, '20150313080205', -1, 2, 'Y', '20140708143200', ' '),
  25.             (12, 10, 'IGS', 'Integra Global Solusi, PT', -99, 10, '20140708143200', -1, '20140708143200', -1, 0, 'Y', '20140708143200', ' '),
  26.             (13, 10, 'IGSNP', 'Integra Global Solusi', -99, 10, '20140708143200', -1, '20150313080235', -1, 3, 'Y', '20140708143200', ' '),
  27.             (14, 10, 'IN-ACT', 'Accounting', 10, 12, '20140708143200', -1, '20140708143200', -1, 0, 'Y', '20140708143200', ' ');
  28.  
  29.  
  30. INSERT INTO t_ou_legal(
  31.             ou_legal_id, tenant_id, ou_id, legal_name, address1, address2,
  32.             address3, city, zip_code, state_or_province, country, phone1,
  33.             phone2, fax1, fax2, npwp_name, npwp_no, npwp_date, npwp_address,
  34.             npwp_phone, npwp_fax, create_datetime, create_user_id, update_datetime,
  35.             update_user_id, version, active, active_datetime, non_active_datetime,
  36.             flg_pkp)
  37.     VALUES (10, 10, 10, 'PT INDOCOM NIAGA', 'Jl  Mangga XIV No. 6 Blok L/305A RT007/013,Duri Kepa', 'Kebon Jeruk', '''', 'Jakarta Barat',
  38.             '11510', 'DKI Jakarta Raya', 'Indonesia', '021-56944121', '''', '021-56944122', '''', 'PT INDOCOM NIAGA', '02.424.079.8-039.000',
  39.             '20040929', 'JL MANGGA XIV NO 6 BLOK L/305A RT 007/013, DURI KEPA, KEBON JERUK, JAKARTA BARAT, DKI JAKARTA RAYA 11510', '''', '''',
  40.             '20141110210816', 49, '20150106150937', -1, 1, 'Y', '20141110210816', ' ', 'Y'),
  41.             (11, 10, 12, 'PT INTEGRA GLOBAL SOLUSI', 'JL.MANGGA XIV BLOK.L NO.306 RT.007/003', 'Duri Kepa, Kebon Jeruk', '''', 'Jakarta Barat',
  42.             '11510', 'DKI Jakarta', 'Indonesia', '''', '''', '''', '''', 'PT. INTEGRA GLOBAL SOLUSI', '02.556.091.3-039.000', '20140613',
  43.             'JL.MANGGA XIV BLOK.L NO.306 RT.007/003, Duri Kepa, Kebon Jeruk, Jakarta Barat 11510', '''', '''',
  44.             '20150812095322', -1, '20160907164346', -1, 1, 'Y', '20150812095322', ' ', 'Y');
  45.  
  46.  
  47. INSERT INTO t_user(
  48.             user_id, tenant_id, username, email, fullname, password, phone,
  49.             role_default_id, private_key, create_datetime, create_user_id,
  50.             update_datetime, update_user_id, version, active, active_datetime,
  51.             non_active_datetime, ou_default_id, policy_default_id)
  52.     VALUES (-1, -1, 'gloryman', ' ', 'Super Administrator', 'a8f5f167f44f4964e6c998dee827110c', ' ',
  53.             -1, '2ad1d85a0b54037266d57c7b3ff8c2f2', '20120101080000', -1, '20150102161424', -1, 1, 'Y', '20120101080000', ' ', 0, 10),
  54.             (10, 10, 'acct1', 'Putri@indocomniaga.co.id', 'Putri', 'a8f5f167f44f4964e6c998dee827110c', '02156944121',
  55.             57, '5ba8660c4549ae4f5c930f73a54815fb', '20140825100000', -1, '20160818101130', 10, 1, 'Y', '20140825100000', ' ', 10, 10),
  56.             (11, 10, 'acct2', 'maryati@indocomniaga.co.id', 'Maryati', 'a8f5f167f44f4964e6c998dee827110c', ' ',
  57.             57, 'f47c69b683987b6a2a67199be976e44c', '20140825100000', -1, '20140825100000', -1, 0, 'Y', '20140825100000', ' ', 10, 10),
  58.             (12, 10, 'acct3', 'Wiendy@indocomniaga.co.id', 'Wiendy', 'a8f5f167f44f4964e6c998dee827110c', '02156944121',
  59.             59, 'e5913c410e1408e80490618d8759b8e3', '20140825100000', -1, '20161208132103', 12, 6, 'Y', '20161208132103', ' ', 10, 10),
  60.             (13, 10, 'acct5', 'desi.k@igsolusi.com', 'Desi Kurniawati', 'a8f5f167f44f4964e6c998dee827110c', '08179885233',
  61.             58, '3749a6591daa7d3ea8bb95efd5bbf435', '20140825100000', -1, '20161207094420', 13, 10, 'Y', '20161207094420', ' ', 10, 10);
  62.  
  63.            
  64.  
  65. INSERT INTO t_role(
  66.             role_id, role_name, tenant_id, role_type, create_datetime, create_user_id,
  67.             update_datetime, update_user_id, version, active, active_datetime,
  68.             non_active_datetime)
  69.     VALUES (-1, 'SA', -1, 'ADMIN', '20120101080000', -1, '20120101080000', -1, 0, 'Y', '20120101080000', ' '),
  70.             (10, 'Accounting', 10, 'USER', '20140825100000', -1, '20140825100000', -1, 0, 'Y', '20140825100000', ' '),
  71.             (11, 'Finance', 10, 'USER', '20140825100000', -1, '20140825100000', -1, 0, 'Y', '20140825100000', ' '),
  72.             (12, 'General', 10, 'USER', '20140825100000', -1, '20140825100000', -1, 0, 'Y', '20140825100000', ' ');
  73.  
  74.  
  75. INSERT INTO t_user_role(
  76.             user_role_id, user_id, role_id, policy_id, create_datetime, create_user_id,
  77.             update_datetime, update_user_id, version, active, active_datetime,
  78.             non_active_datetime)
  79.     VALUES (1, -1, -1, 10, '20120101080000', -1, '20120101080000', -1, 0, 'Y', '20120101080000', ' '),
  80.             (75, 10, 57, 10, '20141105000000', -1, '20141105000000', -1, 0, 'Y', '20141105000000', ' '),
  81.             (76, 11, 57, 10, '20141105000000', -1, '20141105000000', -1, 0, 'Y', '20141105000000', ' '),
  82.             (77, 12, 59, 10, '20141105000000', -1, '20141105000000', -1, 0, 'Y', '20141105000000', ' '),
  83.             (78, 14, 57, 10, '20141105000000', -1, '20150618191243', 49, 1, 'Y', '20141105000000', ' ');
  84.  
  85.  
  86. INSERT INTO t_policy(
  87.             policy_id, tenant_id, policy_code, policy_name, create_datetime,
  88.             create_user_id, update_datetime, update_user_id, version, active,
  89.             active_datetime, non_active_datetime)
  90.     VALUES (10, 10, 'ALL', 'ALL', '20140930160000', -1, '20140930160000', -1, 0, 'Y', '20140930160000', ' '),
  91.             (11, 10, 'IN', 'INDOCOM', '20140930160000', -1, '20140930160000', -1, 0, 'Y', '20140930160000', ' '),
  92.             (12, 10, 'IGS', 'IGS', '20140930160000', -1, '20140930160000', -1, 0, 'Y', '20140930160000', ' '),
  93.             (13, 10, 'ALL-SRBY', 'ALL OU BRANCH SURABAYA', '20150302013601', -1, '20150302013601', -1, 0, 'Y', '20150302013601', ' ');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement