Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- public.attendances definition
- -- Drop table
- -- DROP TABLE public.attendances;
- CREATE TABLE public.attendances (
- id uuid NOT NULL,
- user_id uuid NULL,
- attendance_start timestamptz NULL,
- attendance_end timestamptz NULL,
- deleted_at timestamptz NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- user_info jsonb NULL,
- CONSTRAINT attendances_pkey PRIMARY KEY (id)
- );
- -- public.batchs definition
- -- Drop table
- -- DROP TABLE public.batchs;
- CREATE TABLE public.batchs (
- id uuid NOT NULL,
- batch_name varchar(25) NULL,
- batch_isactive bool NULL DEFAULT true,
- batch_delivery_date timestamptz NULL,
- batch_pickup_date timestamptz NULL,
- deleted_at timestamptz NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- user_info jsonb NULL,
- CONSTRAINT batchs_pkey PRIMARY KEY (id)
- );
- -- public.client_product_track definition
- -- Drop table
- -- DROP TABLE public.client_product_track;
- CREATE TABLE public.client_product_track (
- id uuid NOT NULL,
- clinet_product_id uuid NULL,
- times_info jsonb NULL,
- user_info jsonb NULL,
- deleted_at timestamptz NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- CONSTRAINT client_product_track_pkey PRIMARY KEY (id)
- );
- -- public.client_products definition
- -- Drop table
- -- DROP TABLE public.client_products;
- CREATE TABLE public.client_products (
- id uuid NOT NULL,
- client_id uuid NULL,
- product_id uuid NULL,
- product_number jsonb NULL,
- product_info jsonb NULL,
- status_id uuid NULL,
- user_info jsonb NULL,
- deleted_at timestamptz NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- status_track jsonb NULL,
- product_completed bool NULL DEFAULT false,
- CONSTRAINT client_products_pkey PRIMARY KEY (id)
- );
- -- public.client_track definition
- -- Drop table
- -- DROP TABLE public.client_track;
- CREATE TABLE public.client_track (
- id uuid NOT NULL,
- client_id uuid NULL,
- track_info jsonb NULL,
- user_info jsonb NULL,
- CONSTRAINT client_track_pkey PRIMARY KEY (id)
- );
- -- public.clients definition
- -- Drop table
- -- DROP TABLE public.clients;
- CREATE TABLE public.clients (
- id uuid NOT NULL,
- client_number varchar(30) NULL,
- client_name varchar(100) NULL,
- client_address jsonb NULL,
- project_id uuid NULL,
- user_info jsonb NULL,
- client_isactive bool NULL DEFAULT true,
- deleted_at timestamptz NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- client_stage jsonb NULL,
- status_id uuid NULL,
- batch_id uuid NULL,
- client_info jsonb NULL,
- CONSTRAINT clients_pkey PRIMARY KEY (id)
- );
- -- public.districts definition
- -- Drop table
- -- DROP TABLE public.districts;
- CREATE TABLE public.districts (
- id uuid NOT NULL,
- district_name varchar(150) NULL,
- district_isactive bool NULL DEFAULT true,
- regency_id uuid NULL,
- deleted_at timestamptz NULL,
- user_info json NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- CONSTRAINT districts_pkey PRIMARY KEY (id)
- );
- -- public.package_items definition
- -- Drop table
- -- DROP TABLE public.package_items;
- CREATE TABLE public.package_items (
- id uuid NOT NULL,
- package_name varchar NULL,
- package_items jsonb NULL,
- project_id uuid NULL,
- user_info jsonb NULL,
- CONSTRAINT package_items_pkey PRIMARY KEY (id)
- );
- -- public.products definition
- -- Drop table
- -- DROP TABLE public.products;
- CREATE TABLE public.products (
- id uuid NOT NULL,
- product_name varchar(100) NULL,
- product_info jsonb NULL,
- product_order int4 NULL DEFAULT 0,
- product_isserial bool NULL DEFAULT true,
- product_status jsonb NULL,
- status_id uuid NULL,
- product_isactive bool NULL DEFAULT true,
- user_info jsonb NULL,
- deleted_at timestamptz NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- product_is_install bool NULL DEFAULT false,
- product_menu_url varchar(150) NULL,
- product_specs text NULL,
- product_code varchar(15) NULL,
- CONSTRAINT products_pkey PRIMARY KEY (id)
- );
- -- public.project_products definition
- -- Drop table
- -- DROP TABLE public.project_products;
- CREATE TABLE public.project_products (
- id uuid NOT NULL,
- product_id uuid NULL,
- product_qty int4 NULL DEFAULT 1,
- project_id uuid NULL,
- user_info jsonb NULL,
- deleted_at timestamptz NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- CONSTRAINT project_products_pkey PRIMARY KEY (id)
- );
- -- public.projects definition
- -- Drop table
- -- DROP TABLE public.projects;
- CREATE TABLE public.projects (
- id uuid NOT NULL,
- project_name varchar(35) NULL,
- project_start_date timestamptz NULL,
- project_end_date timestamptz NULL,
- user_info jsonb NULL,
- deleted_at timestamptz NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NULL,
- project_code varchar(15) NULL,
- project_quota int4 NULL DEFAULT 0,
- CONSTRAINT projects_pkey PRIMARY KEY (id)
- );
- -- public.provinces definition
- -- Drop table
- -- DROP TABLE public.provinces;
- CREATE TABLE public.provinces (
- id uuid NOT NULL,
- province_name varchar(50) NOT NULL,
- province_isactive bool NULL DEFAULT true,
- province_timezone varchar(20) NULL,
- province_utc varchar(6) NULL,
- province_iso varchar(5) NULL,
- deleted_at timestamptz NULL,
- user_info json NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- CONSTRAINT provinces_pkey PRIMARY KEY (id)
- );
- -- public.regencies definition
- -- Drop table
- -- DROP TABLE public.regencies;
- CREATE TABLE public.regencies (
- id uuid NOT NULL,
- regency_name varchar(100) NULL,
- regency_isactive bool NULL DEFAULT true,
- province_id uuid NULL,
- deleted_at timestamptz NULL,
- user_info json NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- CONSTRAINT regencies_pkey PRIMARY KEY (id)
- );
- -- public.status definition
- -- Drop table
- -- DROP TABLE public.status;
- CREATE TABLE public.status (
- id uuid NOT NULL,
- status_name varchar(20) NULL,
- status_order int4 NULL DEFAULT 0,
- project_id uuid NULL,
- user_info jsonb NULL,
- deleted_at timestamptz NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- status_next uuid NULL,
- status_completed bool NULL DEFAULT false,
- status_code varchar(15) NULL,
- status_group varchar(1) NULL,
- client_stage varchar(1) NULL,
- status_icon varchar(150) NULL,
- status_color varchar(15) NULL,
- CONSTRAINT status_pkey PRIMARY KEY (id)
- );
- -- public.sys_layout definition
- -- Drop table
- -- DROP TABLE public.sys_layout;
- CREATE TABLE public.sys_layout (
- id int4 NOT NULL,
- organization varchar(50) NULL,
- "name" varchar(150) NULL,
- "data" jsonb NULL,
- notes text NULL,
- created_at timestamptz NULL,
- updated_at timestamptz NULL,
- CONSTRAINT sys_layout_pkey PRIMARY KEY (id)
- );
- -- public.sys_menu definition
- -- Drop table
- -- DROP TABLE public.sys_menu;
- CREATE TABLE public.sys_menu (
- code varchar(90) NOT NULL,
- "name" varchar(50) NULL,
- seqno int4 NULL,
- parent varchar(50) NULL,
- link varchar(90) NULL,
- notes varchar(100) NULL,
- created_at timestamptz NULL,
- updated_at timestamptz NULL,
- CONSTRAINT sys_menu_pkey PRIMARY KEY (code)
- );
- -- public.sys_role definition
- -- Drop table
- -- DROP TABLE public.sys_role;
- CREATE TABLE public.sys_role (
- id uuid NOT NULL,
- role_name varchar(50) NULL,
- role_notes varchar(250) NULL,
- role_first_url varchar(200) NULL,
- role_isactive bool NULL DEFAULT true,
- menus jsonb NULL,
- created_at timestamptz NULL,
- updated_at timestamptz NULL,
- deleted_at timestamptz NULL,
- CONSTRAINT sys_role_pkey PRIMARY KEY (id)
- );
- -- public.sys_token definition
- -- Drop table
- -- DROP TABLE public.sys_token;
- CREATE TABLE public.sys_token (
- id uuid NOT NULL,
- access_token varchar(500) NULL,
- refresh_token varchar(500) NULL,
- expired_at timestamptz NULL,
- client varchar(90) NULL,
- username varchar(50) NULL,
- revoked_at timestamptz NULL,
- user_id uuid NULL,
- created_at timestamptz NULL,
- updated_at timestamptz NULL,
- revoked int4 NULL DEFAULT 0,
- CONSTRAINT sys_token_pkey PRIMARY KEY (id)
- );
- -- public.sys_user_role definition
- -- Drop table
- -- DROP TABLE public.sys_user_role;
- CREATE TABLE public.sys_user_role (
- id uuid NOT NULL,
- role_id uuid NULL,
- user_id uuid NULL,
- created_at timestamptz NULL,
- updated_at timestamptz NULL,
- CONSTRAINT sys_user_role_pkey PRIMARY KEY (id)
- );
- -- public.sys_users definition
- -- Drop table
- -- DROP TABLE public.sys_users;
- CREATE TABLE public.sys_users (
- id uuid NOT NULL,
- username varchar(50) NULL,
- fullname varchar(150) NULL,
- gender varchar(1) NULL,
- email varchar(50) NULL,
- "password" varchar(100) NULL,
- isactive bool NULL DEFAULT true,
- verified bool NULL DEFAULT false,
- created_at timestamptz NULL,
- updated_at timestamptz NULL,
- deleted_at timestamptz NULL,
- CONSTRAINT sys_users_pkey PRIMARY KEY (id)
- );
- -- public.tmp_clients definition
- -- Drop table
- -- DROP TABLE public.tmp_clients;
- CREATE TABLE public.tmp_clients (
- kode varchar(20) NOT NULL,
- nama varchar(100) NULL,
- pic varchar(50) NULL,
- pic_tlp varchar(15) NULL,
- alamat varchar(200) NULL,
- village_id varchar(36) NULL,
- phone varchar(15) NULL,
- created_at timestamptz NULL,
- updated_at timestamptz NULL,
- deleted_at timestamptz NULL,
- project_id uuid NULL,
- CONSTRAINT tmp_client_pkey PRIMARY KEY (kode)
- );
- -- public.villages definition
- -- Drop table
- -- DROP TABLE public.villages;
- CREATE TABLE public.villages (
- id uuid NOT NULL,
- village_name varchar(150) NULL,
- district_id uuid NULL,
- village_latitud varchar(10) NULL,
- village_longitud varchar(10) NULL,
- village_utc varchar(10) NULL,
- village_geotag varchar(10) NULL,
- village_postal_code varchar(5) NULL,
- village_timezone varchar(20) NULL,
- deleted_at timestamptz NULL,
- user_info json NULL,
- created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
- CONSTRAINT villages_pkey PRIMARY KEY (id)
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement