-- Name: safety_field_incidents_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.safety_field_incidents_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.safety_field_incidents_id_seq OWNER TO taf;

--
-- Name: safety_field_incidents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.safety_field_incidents_id_seq OWNED BY public.safety_field_incidents.id;


--
-- Name: safety_incident_files; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.safety_incident_files (
    id integer NOT NULL,
    incident_id integer NOT NULL,
    file_path character varying(255) DEFAULT NULL::character varying,
    uploaded_by integer,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.safety_incident_files OWNER TO taf;

--
-- Name: safety_incident_files_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.safety_incident_files_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.safety_incident_files_id_seq OWNER TO taf;

--
-- Name: safety_incident_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.safety_incident_files_id_seq OWNED BY public.safety_incident_files.id;


--
-- Name: safety_incident_types; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.safety_incident_types (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    form_id integer,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.safety_incident_types OWNER TO taf;

--
-- Name: safety_incident_types_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.safety_incident_types_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.safety_incident_types_id_seq OWNER TO taf;

--
-- Name: safety_incident_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.safety_incident_types_id_seq OWNED BY public.safety_incident_types.id;


--
-- Name: safety_incidents; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.safety_incidents (
    id integer NOT NULL,
    incident_type character varying(100) DEFAULT NULL::character varying,
    location character varying(255) DEFAULT NULL::character varying,
    description text,
    gps character varying(255) DEFAULT NULL::character varying,
    document_ids character varying(255) DEFAULT NULL::character varying,
    tenant_id integer,
    branch_id integer,
    updatedat timestamp with time zone DEFAULT now() NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL
);


ALTER TABLE public.safety_incidents OWNER TO taf;

--
-- Name: safety_incidents_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.safety_incidents_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.safety_incidents_id_seq OWNER TO taf;

--
-- Name: safety_incidents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.safety_incidents_id_seq OWNED BY public.safety_incidents.id;


--
-- Name: salaries; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.salaries (
    salary_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    org_id uuid NOT NULL,
    salary_type text NOT NULL,
    rate numeric NOT NULL,
    currency text DEFAULT 'FJD'::text,
    effective_date timestamp with time zone DEFAULT now() NOT NULL,
    end_date timestamp with time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL,
    CONSTRAINT salaries_salary_type_check CHECK ((salary_type = ANY (ARRAY['hourly'::text, 'monthly'::text, 'contract'::text])))
);


ALTER TABLE public.salaries OWNER TO taf;

--
-- Name: sales_receipts; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.sales_receipts (
    sales_receipt_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    org_id uuid,
    type text,
    invoicenumber text,
    requestedby text,
    sdcdatetime timestamp with time zone,
    invoicecounter text,
    invoicecounterextension text,
    taxitems jsonb,
    verificationurl text,
    verificationqrcode text,
    journal text,
    messages text,
    signedby text,
    encryptedinternaldata text,
    signature text,
    totalcounter integer,
    transactiontypecounter integer,
    totalamount numeric(10,2) DEFAULT NULL::numeric,
    taxgrouprevision integer,
    businessname text,
    tin text,
    locationname text,
    address text,
    district text,
    mrc text,
    transactiontype text,
    data jsonb,
    "timestamp" bigint,
    createdat timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.sales_receipts OWNER TO taf;

--
-- Name: sales_tax_types; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.sales_tax_types (
    salestax_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    country public.citext NOT NULL,
    name text NOT NULL,
    rate integer NOT NULL,
    code text NOT NULL,
    start_date timestamp with time zone,
    end_date timestamp with time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.sales_tax_types OWNER TO taf;

--
-- Name: scheduled_reports; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.scheduled_reports (
    id integer NOT NULL,
    tenant_id integer,
    branch_id integer,
    report_id integer NOT NULL,
    format character varying(10) DEFAULT 'csv'::character varying NOT NULL,
    recipients text,
    next_run timestamp without time zone NOT NULL,
    interval_days integer DEFAULT 1 NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.scheduled_reports OWNER TO taf;

--
-- Name: scheduled_reports_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.scheduled_reports_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.scheduled_reports_id_seq OWNER TO taf;

--
-- Name: scheduled_reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.scheduled_reports_id_seq OWNED BY public.scheduled_reports.id;


--
-- Name: service_connections; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.service_connections (
    id integer NOT NULL,
    tenant_id integer,
    user_id integer,
    branch_id integer,
    name character varying(100) NOT NULL,
    type character varying(50) NOT NULL,
    credentials text NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.service_connections OWNER TO taf;

--
-- Name: service_connections_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.service_connections_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.service_connections_id_seq OWNER TO taf;

--
-- Name: service_connections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.service_connections_id_seq OWNED BY public.service_connections.id;


--
-- Name: service_types; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.service_types (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    description text,
    make character varying(100) DEFAULT NULL::character varying,
    model character varying(100) DEFAULT NULL::character varying,
    type character varying(100) DEFAULT NULL::character varying,
    km_interval integer,
    month_interval integer,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.service_types OWNER TO taf;

--
-- Name: service_types_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.service_types_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.service_types_id_seq OWNER TO taf;

--
-- Name: service_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.service_types_id_seq OWNED BY public.service_types.id;


--
-- Name: sessions; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.sessions (
    session_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    auth_level public.auth_level DEFAULT 'aal1'::public.auth_level NOT NULL,
    created_at timestamp with time zone DEFAULT now() NOT NULL,
    last_seen_at timestamp with time zone DEFAULT now() NOT NULL,
    expires_at timestamp with time zone NOT NULL,
    ip inet,
    user_agent text,
    mfa_completed_at timestamp with time zone
);


ALTER TABLE public.sessions OWNER TO taf;

--
-- Name: settings; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.settings (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    value text NOT NULL,
    category character varying(50) DEFAULT NULL::character varying,
    user_id integer,
    group_id integer,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.settings OWNER TO taf;

--
-- Name: settings_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.settings_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.settings_id_seq OWNER TO taf;

--
-- Name: settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.settings_id_seq OWNED BY public.settings.id;


--
-- Name: shift_swaps; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.shift_swaps (
    id integer NOT NULL,
    requester_id integer NOT NULL,
    target_employee_id integer NOT NULL,
    requester_shift_id integer NOT NULL,
    target_shift_id integer NOT NULL,
    status character varying(20) DEFAULT NULL::character varying,
    approved_by integer,
    approved_at timestamp without time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.shift_swaps OWNER TO taf;

--
-- Name: shift_swaps_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.shift_swaps_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.shift_swaps_id_seq OWNER TO taf;

--
-- Name: shift_swaps_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.shift_swaps_id_seq OWNED BY public.shift_swaps.id;


--
-- Name: shifts; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.shifts (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    start_time time without time zone NOT NULL,
    end_time time without time zone NOT NULL,
    overtime_cap numeric(5,2) DEFAULT 0.00,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.shifts OWNER TO taf;

--
-- Name: shifts_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.shifts_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.shifts_id_seq OWNER TO taf;

--
-- Name: shifts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.shifts_id_seq OWNED BY public.shifts.id;


--
-- Name: software_info; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.software_info (
    software_info_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    manufacturer_name text,
    serial_number text,
    software_version text,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.software_info OWNER TO taf;

--
-- Name: storage_connectors; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.storage_connectors (
    storage_connector_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    org_id uuid,
    category_id uuid,
    name character varying(100) NOT NULL,
    type character varying(50) NOT NULL,
    credentials text NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.storage_connectors OWNER TO taf;

--
-- Name: supervisor_types; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.supervisor_types (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.supervisor_types OWNER TO taf;

--
-- Name: supervisor_types_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.supervisor_types_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.supervisor_types_id_seq OWNER TO taf;

--
-- Name: supervisor_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.supervisor_types_id_seq OWNED BY public.supervisor_types.id;


--
-- Name: sync_hook_logs; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.sync_hook_logs (
    log_id uuid DEFAULT gen_random_uuid() NOT NULL,
    hook_id uuid,
    hook_name character varying(100),
    trigger_table character varying(100) NOT NULL,
    trigger_operation character varying(20) NOT NULL,
    affected_records integer DEFAULT 0,
    execution_time_ms integer,
    status character varying(20) DEFAULT 'success'::character varying,
    error_message text,
    metadata jsonb DEFAULT '{}'::jsonb,
    created_at timestamp with time zone DEFAULT now(),
    CONSTRAINT sync_hook_logs_status_check CHECK (((status)::text = ANY ((ARRAY['success'::character varying, 'error'::character varying, 'skipped'::character varying])::text[])))
);


ALTER TABLE public.sync_hook_logs OWNER TO taf;

--
-- Name: TABLE sync_hook_logs; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON TABLE public.sync_hook_logs IS 'Audit log of all hook executions for debugging and performance monitoring';


--
-- Name: sync_hooks; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.sync_hooks (
    hook_id uuid DEFAULT gen_random_uuid() NOT NULL,
    name character varying(100) NOT NULL,
    description text,
    trigger_table character varying(100) NOT NULL,
    trigger_operations text[] DEFAULT ARRAY['INSERT'::text, 'UPDATE'::text, 'DELETE'::text],
    hook_type character varying(50) NOT NULL,
    config jsonb DEFAULT '{}'::jsonb NOT NULL,
    priority integer DEFAULT 100,
    is_active boolean DEFAULT true,
    created_at timestamp with time zone DEFAULT now(),
    updated_at timestamp with time zone DEFAULT now(),
    CONSTRAINT sync_hooks_hook_type_check CHECK (((hook_type)::text = ANY ((ARRAY['aggregate'::character varying, 'derive'::character varying, 'cascade'::character varying, 'validate'::character varying, 'custom'::character varying])::text[]))),
    CONSTRAINT valid_trigger_ops CHECK ((trigger_operations <@ ARRAY['INSERT'::text, 'UPDATE'::text, 'DELETE'::text, 'PULL'::text]))
);


ALTER TABLE public.sync_hooks OWNER TO taf;

--
-- Name: TABLE sync_hooks; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON TABLE public.sync_hooks IS 'Declarative hooks for sync operations - enables auto-aggregation, derivations, cascades without code changes';


--
-- Name: COLUMN sync_hooks.name; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON COLUMN public.sync_hooks.name IS 'Unique identifier for the hook';


--
-- Name: COLUMN sync_hooks.trigger_table; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON COLUMN public.sync_hooks.trigger_table IS 'Table that triggers this hook (e.g., time_clocks, inventory_txn)';


--
-- Name: COLUMN sync_hooks.trigger_operations; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON COLUMN public.sync_hooks.trigger_operations IS 'Which operations trigger the hook: INSERT, UPDATE, DELETE, PULL';


--
-- Name: COLUMN sync_hooks.hook_type; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON COLUMN public.sync_hooks.hook_type IS 'Type: aggregate (sum/count), derive (calculated fields), cascade (update related), validate, custom';


--
-- Name: COLUMN sync_hooks.config; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON COLUMN public.sync_hooks.config IS 'JSON config specific to hook type - see documentation below';


--
-- Name: COLUMN sync_hooks.priority; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON COLUMN public.sync_hooks.priority IS 'Execution order (lower = earlier), default 100. Lower numbers run first.';


--
-- Name: table_column_settings; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.table_column_settings (
    id integer NOT NULL,
    table_name character varying(100) NOT NULL,
    user_id integer,
    tenant_id integer,
    branch_id integer,
    hidden_columns jsonb,
    column_order json,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.table_column_settings OWNER TO taf;

--
-- Name: table_column_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.table_column_settings_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.table_column_settings_id_seq OWNER TO taf;

--
-- Name: table_column_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.table_column_settings_id_seq OWNED BY public.table_column_settings.id;


--
-- Name: table_views; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.table_views (
    id integer NOT NULL,
    form_id integer,
    table_name character varying(100) DEFAULT NULL::character varying,
    tenant_id integer,
    branch_id integer,
    category_id integer,
    name character varying(100) NOT NULL,
    columns json,
    sort_by character varying(100) DEFAULT NULL::character varying,
    sort_dir character varying(4) DEFAULT NULL::character varying,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.table_views OWNER TO taf;

--
-- Name: table_views_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.table_views_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.table_views_id_seq OWNER TO taf;

--
-- Name: table_views_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.table_views_id_seq OWNED BY public.table_views.id;


--
-- Name: tasks; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.tasks (
    id integer NOT NULL,
    employee_id integer NOT NULL,
    item_name character varying(100) DEFAULT NULL::character varying,
    manager_id integer,
    status character varying(100) DEFAULT 'pending'::character varying,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.tasks OWNER TO taf;

--
-- Name: tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.tasks_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.tasks_id_seq OWNER TO taf;

--
-- Name: tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.tasks_id_seq OWNED BY public.tasks.id;


--
-- Name: tax_core_request; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.tax_core_request (
    id integer NOT NULL,
    buyer_id integer,
    buyer_cost_center_id integer,
    cashier character varying(100) DEFAULT NULL::character varying,
    invoice_number integer,
    date_and_time_of_issue character varying(100) DEFAULT NULL::character varying,
    invoice_type character varying(100) DEFAULT NULL::character varying,
    transaction_type character varying(100) DEFAULT NULL::character varying,
    referent_document_number integer,
    payment jsonb,
    options character varying(100) DEFAULT NULL::character varying,
    items character varying(250) DEFAULT NULL::character varying,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.tax_core_request OWNER TO taf;

--
-- Name: tax_core_request_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.tax_core_request_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.tax_core_request_id_seq OWNER TO taf;

--
-- Name: tax_core_request_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.tax_core_request_id_seq OWNED BY public.tax_core_request.id;


--
-- Name: tax_core_response; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.tax_core_response (
    id integer NOT NULL,
    invoicenumber text,
    requestedby text,
    sdcdatetime timestamp with time zone,
    invoicecounter text,
    invoicecounterextension text,
    taxitems jsonb,
    verificationurl text,
    verificationqrcode text,
    journal text,
    messages text,
    signedby text,
    encryptedinternaldata text,
    signature text,
    totalcounter integer,
    transactiontypecounter integer,
    totalamount integer,
    taxgrouprevision integer,
    businessname text,
    tin text,
    locationname text,
    address text,
    district text,
    mrc text,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.tax_core_response OWNER TO taf;

--
-- Name: tax_core_response_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.tax_core_response_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.tax_core_response_id_seq OWNER TO taf;

--
-- Name: tax_core_response_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.tax_core_response_id_seq OWNED BY public.tax_core_response.id;


--
-- Name: tax_ledger; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.tax_ledger (
    id integer NOT NULL,
    payroll_run_id integer NOT NULL,
    employee_id integer NOT NULL,
    tax_type character varying(50) NOT NULL,
    amount numeric(10,2) NOT NULL,
    ytd_total numeric(10,2) NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.tax_ledger OWNER TO taf;

--
-- Name: tax_ledger_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.tax_ledger_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.tax_ledger_id_seq OWNER TO taf;

--
-- Name: tax_ledger_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.tax_ledger_id_seq OWNED BY public.tax_ledger.id;


--
-- Name: tenant_admins; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.tenant_admins (
    id integer NOT NULL,
    tenant_id integer NOT NULL,
    admin_user_id integer NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.tenant_admins OWNER TO taf;

--
-- Name: tenant_admins_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.tenant_admins_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.tenant_admins_id_seq OWNER TO taf;

--
-- Name: tenant_admins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.tenant_admins_id_seq OWNED BY public.tenant_admins.id;


--
-- Name: tenant_idp_configs; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.tenant_idp_configs (
    root_org_id uuid NOT NULL,
    provider_code text NOT NULL,
    enabled boolean DEFAULT true NOT NULL,
    config_json jsonb NOT NULL,
    mapping_json jsonb
);


ALTER TABLE public.tenant_idp_configs OWNER TO taf;

--
-- Name: tenant_module_settings; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.tenant_module_settings (
    id integer NOT NULL,
    tenant_id integer NOT NULL,
    branch_id integer,
    module_id integer NOT NULL,
    name character varying(100) NOT NULL,
    value text NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.tenant_module_settings OWNER TO taf;

--
-- Name: tenant_module_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.tenant_module_settings_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.tenant_module_settings_id_seq OWNER TO taf;

--
-- Name: tenant_module_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.tenant_module_settings_id_seq OWNED BY public.tenant_module_settings.id;


--
-- Name: tenant_modules; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.tenant_modules (
    id integer NOT NULL,
    tenant_id integer NOT NULL,
    branch_id integer,
    module_id integer NOT NULL,
    enabled boolean DEFAULT true NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.tenant_modules OWNER TO taf;

--
-- Name: tenant_modules_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.tenant_modules_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.tenant_modules_id_seq OWNER TO taf;

--
-- Name: tenant_modules_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.tenant_modules_id_seq OWNED BY public.tenant_modules.id;


--
-- Name: tenant_tables; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.tenant_tables (
    id integer NOT NULL,
    tenant_id integer,
    user_id integer,
    table_name character varying(100) NOT NULL,
    definition jsonb NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.tenant_tables OWNER TO taf;

--
-- Name: tenant_tables_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.tenant_tables_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.tenant_tables_id_seq OWNER TO taf;

--
-- Name: tenant_tables_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.tenant_tables_id_seq OWNED BY public.tenant_tables.id;


--
-- Name: tenants; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.tenants (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    subdomain character varying(100) DEFAULT NULL::character varying,
    custom_domain character varying(255) DEFAULT NULL::character varying,
    logo character varying(255) DEFAULT NULL::character varying,
    product_name character varying(255) DEFAULT NULL::character varying,
    dashboard_name character varying(255) DEFAULT NULL::character varying,
    settings json,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.tenants OWNER TO taf;

--
-- Name: tenants_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.tenants_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.tenants_id_seq OWNER TO taf;

--
-- Name: tenants_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.tenants_id_seq OWNED BY public.tenants.id;


--
-- Name: time_clock_aggregates; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.time_clock_aggregates (
    time_clock_aggregate_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    org_id uuid,
    user_id uuid NOT NULL,
    start_date date NOT NULL,
    end_date date NOT NULL,
    total_duration_minutes integer DEFAULT 0,
    total_days_worked integer DEFAULT 0,
    created_at timestamp with time zone DEFAULT now() NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL,
    total_net_hours numeric(10,2),
    total_overtime_hours numeric(10,2),
    total_regular_hours numeric(10,2),
    total_payable_hours numeric(10,2)
);


ALTER TABLE public.time_clock_aggregates OWNER TO taf;

--
-- Name: COLUMN time_clock_aggregates.total_net_hours; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON COLUMN public.time_clock_aggregates.total_net_hours IS 'Total worked hours (gross - breaks)';


--
-- Name: COLUMN time_clock_aggregates.total_overtime_hours; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON COLUMN public.time_clock_aggregates.total_overtime_hours IS 'Hours beyond regular work hours';


--
-- Name: COLUMN time_clock_aggregates.total_regular_hours; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON COLUMN public.time_clock_aggregates.total_regular_hours IS 'Regular work hours (up to standard)';


--
-- Name: COLUMN time_clock_aggregates.total_payable_hours; Type: COMMENT; Schema: public; Owner: taf
--

COMMENT ON COLUMN public.time_clock_aggregates.total_payable_hours IS 'Total hours to be paid (may include premiums)';


--
-- Name: time_clocks; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.time_clocks (
    time_clocks_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    org_id uuid,
    user_id uuid NOT NULL,
    clock_type character varying(50) NOT NULL,
    lat numeric(10,6) DEFAULT NULL::numeric,
    lng numeric(10,6) DEFAULT NULL::numeric,
    valid_gps boolean DEFAULT false NOT NULL,
    location_id integer,
    locationapproved boolean DEFAULT false NOT NULL,
    security_type character varying(50) NOT NULL,
    clocked_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL,
    tenant_id uuid,
    branch_id uuid,
    -- location public.geography(Point,4326) -- REMOVED: PostGIS not available,
    location_id_legacy integer,
    source jsonb DEFAULT '{}'::jsonb
);


ALTER TABLE public.time_clocks OWNER TO taf;

--
-- Name: time_entries; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.time_entries (
    time_entry_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    reference_id uuid,
    reference_table text,
    approved boolean DEFAULT false NOT NULL,
    user_id uuid NOT NULL,
    instructions text,
    hours numeric(8,2) DEFAULT 0 NOT NULL,
    date date,
    rate numeric(10,2) DEFAULT 0 NOT NULL,
    vat_rate numeric(5,4) DEFAULT 0.125 NOT NULL,
    description text,
    billed_to_client boolean DEFAULT false NOT NULL,
    added_to_cost_schedule boolean DEFAULT false NOT NULL,
    billable boolean DEFAULT false NOT NULL,
    status text DEFAULT 'Pending'::text NOT NULL,
    work_type_id uuid,
    title text,
    approval_comment text,
    comments text,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.time_entries OWNER TO taf;

--
-- Name: timesheets; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.timesheets (
    id integer NOT NULL,
    tenant_id integer,
    branch_id integer,
    user_id integer NOT NULL,
    date date NOT NULL,
    standard_hours numeric(5,2) DEFAULT 0.00 NOT NULL,
    overtime_hours numeric(5,2) DEFAULT 0.00 NOT NULL,
    break_hours numeric(5,2) DEFAULT 0.00 NOT NULL,
    supervisor_id integer,
    supervisor_type character varying(50) DEFAULT NULL::character varying,
    work_id integer,
    approval_comment text,
    approved boolean DEFAULT false NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.timesheets OWNER TO taf;

--
-- Name: timesheets_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.timesheets_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.timesheets_id_seq OWNER TO taf;

--
-- Name: timesheets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.timesheets_id_seq OWNED BY public.timesheets.id;


--
-- Name: training_answers; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_answers (
    id integer NOT NULL,
    question_id integer NOT NULL,
    answer text NOT NULL,
    tenant_id integer,
    branch_id integer,
    is_correct boolean DEFAULT false NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_answers OWNER TO taf;

--
-- Name: training_answers_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_answers_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_answers_id_seq OWNER TO taf;

--
-- Name: training_answers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_answers_id_seq OWNED BY public.training_answers.id;


--
-- Name: training_badges; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_badges (
    id integer NOT NULL,
    employee_id integer NOT NULL,
    course_id integer NOT NULL,
    badge_name character varying(255) NOT NULL,
    issued_at date NOT NULL,
    expires_at date,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_badges OWNER TO taf;

--
-- Name: training_badges_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_badges_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_badges_id_seq OWNER TO taf;

--
-- Name: training_badges_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_badges_id_seq OWNED BY public.training_badges.id;


--
-- Name: training_bookmarks; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_bookmarks (
    id integer NOT NULL,
    employee_id integer NOT NULL,
    content_id integer NOT NULL,
    "position" character varying(255) DEFAULT NULL::character varying,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_bookmarks OWNER TO taf;

--
-- Name: training_bookmarks_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_bookmarks_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_bookmarks_id_seq OWNER TO taf;

--
-- Name: training_bookmarks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_bookmarks_id_seq OWNED BY public.training_bookmarks.id;


--
-- Name: training_categories; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_categories (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    description text,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_categories OWNER TO taf;

--
-- Name: training_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_categories_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_categories_id_seq OWNER TO taf;

--
-- Name: training_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_categories_id_seq OWNED BY public.training_categories.id;


--
-- Name: training_certificates; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_certificates (
    id integer NOT NULL,
    user_id integer,
    certificate_name character varying(255) DEFAULT NULL::character varying,
    category character varying(255) DEFAULT NULL::character varying,
    issued_at date NOT NULL,
    expires_at date,
    expiry_date date,
    renewal_required boolean DEFAULT false NOT NULL,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_certificates OWNER TO taf;

--
-- Name: training_certificates_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_certificates_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_certificates_id_seq OWNER TO taf;

--
-- Name: training_certificates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_certificates_id_seq OWNED BY public.training_certificates.id;


--
-- Name: training_contents; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_contents (
    id integer NOT NULL,
    course_id integer NOT NULL,
    title character varying(255) DEFAULT NULL::character varying,
    file_path character varying(255) DEFAULT NULL::character varying,
    caption_path character varying(255) DEFAULT NULL::character varying,
    language_code character varying(10) DEFAULT NULL::character varying,
    url character varying(255) DEFAULT NULL::character varying,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_contents OWNER TO taf;

--
-- Name: training_contents_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_contents_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_contents_id_seq OWNER TO taf;

--
-- Name: training_contents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_contents_id_seq OWNED BY public.training_contents.id;


--
-- Name: training_courses; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_courses (
    id integer NOT NULL,
    title character varying(255) NOT NULL,
    description text,
    duration integer,
    recertification_interval integer,
    category_id integer,
    prerequisites text,
    target_audience text,
    language_code character varying(10) DEFAULT NULL::character varying,
    country_id integer,
    content_host character varying(50) DEFAULT NULL::character varying,
    external_lms_url character varying(255) DEFAULT NULL::character varying,
    lms_host character varying(255) DEFAULT NULL::character varying,
    lms_api_key character varying(255) DEFAULT NULL::character varying,
    archived boolean DEFAULT false NOT NULL,
    mandatory boolean DEFAULT false NOT NULL,
    createdby integer,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_courses OWNER TO taf;

--
-- Name: training_courses_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_courses_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_courses_id_seq OWNER TO taf;

--
-- Name: training_courses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_courses_id_seq OWNED BY public.training_courses.id;


--
-- Name: training_enrollments; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_enrollments (
    id integer NOT NULL,
    employee_id integer NOT NULL,
    session_id integer NOT NULL,
    status character varying(100) DEFAULT 'Enrolled'::character varying,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_enrollments OWNER TO taf;

--
-- Name: training_enrollments_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_enrollments_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_enrollments_id_seq OWNER TO taf;

--
-- Name: training_enrollments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_enrollments_id_seq OWNED BY public.training_enrollments.id;


--
-- Name: training_feedback; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_feedback (
    id integer NOT NULL,
    enrollment_id integer NOT NULL,
    rating integer,
    comments text,
    signature_path character varying(255) DEFAULT NULL::character varying,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_feedback OWNER TO taf;

--
-- Name: training_feedback_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_feedback_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_feedback_id_seq OWNER TO taf;

--
-- Name: training_feedback_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_feedback_id_seq OWNED BY public.training_feedback.id;


--
-- Name: training_path_courses; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_path_courses (
    id integer NOT NULL,
    path_id integer NOT NULL,
    course_id integer NOT NULL,
    sequence integer NOT NULL,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_path_courses OWNER TO taf;

--
-- Name: training_path_courses_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_path_courses_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_path_courses_id_seq OWNER TO taf;

--
-- Name: training_path_courses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_path_courses_id_seq OWNED BY public.training_path_courses.id;


--
-- Name: training_paths; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_paths (
    id integer NOT NULL,
    tenant_id integer,
    branch_id integer,
    country_id integer,
    department_id integer,
    role_id integer,
    name character varying(255) NOT NULL,
    description text,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_paths OWNER TO taf;

--
-- Name: training_paths_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_paths_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_paths_id_seq OWNER TO taf;

--
-- Name: training_paths_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_paths_id_seq OWNED BY public.training_paths.id;


--
-- Name: training_questions; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_questions (
    id integer NOT NULL,
    quiz_id integer NOT NULL,
    question text NOT NULL,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_questions OWNER TO taf;

--
-- Name: training_questions_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_questions_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_questions_id_seq OWNER TO taf;

--
-- Name: training_questions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_questions_id_seq OWNED BY public.training_questions.id;


--
-- Name: training_quizzes; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_quizzes (
    id integer NOT NULL,
    course_id integer NOT NULL,
    passing_score numeric(5,2) DEFAULT 0.00,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_quizzes OWNER TO taf;

--
-- Name: training_quizzes_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_quizzes_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_quizzes_id_seq OWNER TO taf;

--
-- Name: training_quizzes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_quizzes_id_seq OWNED BY public.training_quizzes.id;


--
-- Name: training_results; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_results (
    id integer NOT NULL,
    enrollment_id integer NOT NULL,
    score numeric(5,2) DEFAULT NULL::numeric,
    completed boolean DEFAULT false,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_results OWNER TO taf;

--
-- Name: training_results_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_results_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_results_id_seq OWNER TO taf;

--
-- Name: training_results_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_results_id_seq OWNED BY public.training_results.id;


--
-- Name: training_sessions; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.training_sessions (
    id integer NOT NULL,
    course_id integer NOT NULL,
    start_date timestamp without time zone NOT NULL,
    end_date timestamp without time zone,
    location character varying(255) DEFAULT NULL::character varying,
    createdby integer,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.training_sessions OWNER TO taf;

--
-- Name: training_sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.training_sessions_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.training_sessions_id_seq OWNER TO taf;

--
-- Name: training_sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.training_sessions_id_seq OWNED BY public.training_sessions.id;


--
-- Name: user_2fa; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_2fa (
    id integer NOT NULL,
    provider character varying(100) DEFAULT NULL::character varying,
    provider_user_id character varying(255) DEFAULT NULL::character varying,
    email character varying(255) DEFAULT NULL::character varying,
    name character varying(255) DEFAULT NULL::character varying,
    profile_pic text,
    linked_at timestamp without time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_2fa OWNER TO taf;

--
-- Name: user_2fa_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.user_2fa_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_2fa_id_seq OWNER TO taf;

--
-- Name: user_2fa_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.user_2fa_id_seq OWNED BY public.user_2fa.id;


--
-- Name: user_board_settings; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_board_settings (
    id integer NOT NULL,
    user_id integer NOT NULL,
    board_id integer NOT NULL,
    column_order json,
    hidden_columns json,
    selected boolean DEFAULT false NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_board_settings OWNER TO taf;

--
-- Name: user_board_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.user_board_settings_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_board_settings_id_seq OWNER TO taf;

--
-- Name: user_board_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.user_board_settings_id_seq OWNED BY public.user_board_settings.id;


--
-- Name: user_branch_memberships; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_branch_memberships (
    membership_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    branch_id uuid NOT NULL,
    role text,
    options jsonb,
    joined_at timestamp with time zone DEFAULT now() NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_branch_memberships OWNER TO taf;

--
-- Name: user_column_permissions; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_column_permissions (
    user_column_permission_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    table_name text NOT NULL,
    column_name text NOT NULL,
    access_mode text NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL,
    CONSTRAINT user_column_permissions_access_mode_check CHECK ((access_mode = ANY (ARRAY['hidden'::text, 'readonly'::text, 'readwrite'::text])))
);


ALTER TABLE public.user_column_permissions OWNER TO taf;

--
-- Name: user_emails; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_emails (
    user_email_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    email public.citext NOT NULL,
    is_primary boolean DEFAULT false NOT NULL,
    verified_at timestamp with time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_emails OWNER TO taf;

--
-- Name: user_faces; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_faces (
    id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    image_path text NOT NULL,
    embedding text NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_faces OWNER TO taf;

--
-- Name: user_group_memberships; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_group_memberships (
    membership_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    group_id uuid NOT NULL,
    role character varying(100) DEFAULT NULL::character varying,
    joined_at timestamp with time zone DEFAULT now() NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_group_memberships OWNER TO taf;

--
-- Name: user_identities; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_identities (
    provider_code text NOT NULL,
    subject text NOT NULL,
    user_id uuid NOT NULL,
    email_at_auth public.citext,
    claims_json jsonb,
    linked_at timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_identities OWNER TO taf;

--
-- Name: user_mfa_factors; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_mfa_factors (
    factor_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    type public.mfa_type NOT NULL,
    label text,
    is_primary boolean DEFAULT false NOT NULL,
    enabled boolean DEFAULT true NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL,
    last_used_at timestamp with time zone,
    isdeleted boolean DEFAULT false NOT NULL
);


ALTER TABLE public.user_mfa_factors OWNER TO taf;

--
-- Name: user_mfa_totp; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_mfa_totp (
    factor_id uuid NOT NULL,
    secret_b32 text NOT NULL,
    iv text NOT NULL,
    tag text NOT NULL,
    issuer text DEFAULT 'Cybex'::text NOT NULL,
    period smallint DEFAULT 30 NOT NULL,
    digits smallint DEFAULT 6 NOT NULL,
    algo text DEFAULT 'SHA1'::text NOT NULL
);


ALTER TABLE public.user_mfa_totp OWNER TO taf;

--
-- Name: user_mfa_webauthn; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_mfa_webauthn (
    factor_id uuid NOT NULL,
    credential_id text NOT NULL,
    public_key text NOT NULL,
    sign_count bigint DEFAULT 0 NOT NULL,
    transports jsonb,
    last_counter bigint,
    aaguid uuid
);


ALTER TABLE public.user_mfa_webauthn OWNER TO taf;

--
-- Name: user_module_permissions; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_module_permissions (
    user_module_permission_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    module_id uuid NOT NULL,
    action text DEFAULT 'deny'::text NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_module_permissions OWNER TO taf;

--
-- Name: user_org_memberships; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_org_memberships (
    membership_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    org_id uuid NOT NULL,
    role text,
    options jsonb,
    joined_at timestamp with time zone DEFAULT now() NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_org_memberships OWNER TO taf;

--
-- Name: user_passkeys; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_passkeys (
    id integer NOT NULL,
    user_id integer NOT NULL,
    credential_id character varying(255) DEFAULT NULL::character varying,
    public_key text,
    created_at timestamp without time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_passkeys OWNER TO taf;

--
-- Name: user_passkeys_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.user_passkeys_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_passkeys_id_seq OWNER TO taf;

--
-- Name: user_passkeys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.user_passkeys_id_seq OWNED BY public.user_passkeys.id;


--
-- Name: user_passwords; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_passwords (
    user_id uuid NOT NULL,
    password_hash text NOT NULL,
    algo text NOT NULL,
    expires timestamp with time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL,
    must_rotate boolean DEFAULT false NOT NULL
);


ALTER TABLE public.user_passwords OWNER TO taf;

--
-- Name: user_phones; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_phones (
    phone_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    phone_number text NOT NULL,
    is_primary boolean DEFAULT false NOT NULL,
    verified_at timestamp with time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_phones OWNER TO taf;

--
-- Name: user_recovery_codes; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_recovery_codes (
    user_id uuid NOT NULL,
    code_hash text NOT NULL,
    used_at timestamp with time zone
);


ALTER TABLE public.user_recovery_codes OWNER TO taf;

--
-- Name: user_settings; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_settings (
    id integer NOT NULL,
    user_id integer NOT NULL,
    name character varying(100) NOT NULL,
    value text NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_settings OWNER TO taf;

--
-- Name: user_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.user_settings_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_settings_id_seq OWNER TO taf;

--
-- Name: user_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.user_settings_id_seq OWNED BY public.user_settings.id;


--
-- Name: user_table_permissions; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_table_permissions (
    user_table_permission_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    table_name text NOT NULL,
    access_mode text NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL,
    CONSTRAINT user_table_permissions_access_mode_check CHECK ((access_mode = ANY (ARRAY['hidden'::text, 'readonly'::text, 'readwrite'::text])))
);


ALTER TABLE public.user_table_permissions OWNER TO taf;

--
-- Name: user_tokens; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.user_tokens (
    id integer NOT NULL,
    user_id integer NOT NULL,
    refresh_token character varying(255) NOT NULL,
    expires_at timestamp without time zone NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.user_tokens OWNER TO taf;

--
-- Name: user_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.user_tokens_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_tokens_id_seq OWNER TO taf;

--
-- Name: user_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.user_tokens_id_seq OWNED BY public.user_tokens.id;


--
-- Name: users; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.users (
    user_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    full_name text,
    status text DEFAULT 'active'::text NOT NULL,
    is_superadmin boolean DEFAULT false NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.users OWNER TO taf;

--
-- Name: users_profiles; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.users_profiles (
    user_profile_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    user_id uuid NOT NULL,
    title text,
    address text,
    phone_number text,
    email text,
    date_of_birth date,
    profile_pic text,
    notes text,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.users_profiles OWNER TO taf;

--
-- Name: vehicle_makes; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vehicle_makes (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vehicle_makes OWNER TO taf;

--
-- Name: vehicle_makes_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.vehicle_makes_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.vehicle_makes_id_seq OWNER TO taf;

--
-- Name: vehicle_makes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.vehicle_makes_id_seq OWNED BY public.vehicle_makes.id;


--
-- Name: vehicle_models; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vehicle_models (
    id integer NOT NULL,
    make_id integer,
    name character varying(100) NOT NULL,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vehicle_models OWNER TO taf;

--
-- Name: vehicle_models_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.vehicle_models_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.vehicle_models_id_seq OWNER TO taf;

--
-- Name: vehicle_models_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.vehicle_models_id_seq OWNED BY public.vehicle_models.id;


--
-- Name: vehicle_report_comments; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vehicle_report_comments (
    id integer NOT NULL,
    report_id integer NOT NULL,
    user_id integer NOT NULL,
    comment text NOT NULL,
    tenant_id integer,
    branch_id integer,
    created_at timestamp without time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vehicle_report_comments OWNER TO taf;

--
-- Name: vehicle_report_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.vehicle_report_comments_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.vehicle_report_comments_id_seq OWNER TO taf;

--
-- Name: vehicle_report_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.vehicle_report_comments_id_seq OWNED BY public.vehicle_report_comments.id;


--
-- Name: vehicle_report_parts; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vehicle_report_parts (
    id integer NOT NULL,
    report_id integer NOT NULL,
    part_name character varying(255) NOT NULL,
    quantity integer,
    repair_cost numeric(10,2) DEFAULT NULL::numeric,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vehicle_report_parts OWNER TO taf;

--
-- Name: vehicle_report_parts_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.vehicle_report_parts_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.vehicle_report_parts_id_seq OWNER TO taf;

--
-- Name: vehicle_report_parts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.vehicle_report_parts_id_seq OWNED BY public.vehicle_report_parts.id;


--
-- Name: vehicle_reports; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vehicle_reports (
    id integer NOT NULL,
    vehicle_id integer NOT NULL,
    driver_id integer,
    report_type character varying(100) DEFAULT NULL::character varying,
    description text,
    status character varying(50) DEFAULT NULL::character varying,
    assigned_to integer,
    tenant_id integer,
    branch_id integer,
    created_at timestamp without time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vehicle_reports OWNER TO taf;

--
-- Name: vehicle_reports_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.vehicle_reports_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.vehicle_reports_id_seq OWNER TO taf;

--
-- Name: vehicle_reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.vehicle_reports_id_seq OWNED BY public.vehicle_reports.id;


--
-- Name: vehicle_services; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vehicle_services (
    id integer NOT NULL,
    vehicle_id integer NOT NULL,
    service_type_id integer NOT NULL,
    service_date date,
    odometer integer,
    notes text,
    cost numeric(10,2) DEFAULT NULL::numeric,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vehicle_services OWNER TO taf;

--
-- Name: vehicle_services_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.vehicle_services_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.vehicle_services_id_seq OWNER TO taf;

--
-- Name: vehicle_services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.vehicle_services_id_seq OWNED BY public.vehicle_services.id;


--
-- Name: vehicle_trip_points; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vehicle_trip_points (
    id integer NOT NULL,
    trip_id integer NOT NULL,
    latitude numeric(10,6) NOT NULL,
    longitude numeric(10,6) NOT NULL,
    recorded_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vehicle_trip_points OWNER TO taf;

--
-- Name: vehicle_trip_points_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.vehicle_trip_points_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.vehicle_trip_points_id_seq OWNER TO taf;

--
-- Name: vehicle_trip_points_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.vehicle_trip_points_id_seq OWNED BY public.vehicle_trip_points.id;


--
-- Name: vehicle_trips; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vehicle_trips (
    id integer NOT NULL,
    vehicle_id integer NOT NULL,
    driver_id integer,
    trip_date date,
    start_time timestamp without time zone,
    end_time timestamp without time zone,
    start_location character varying(255) DEFAULT NULL::character varying,
    start_latitude numeric(10,6) DEFAULT NULL::numeric,
    start_longitude numeric(10,6) DEFAULT NULL::numeric,
    end_location character varying(255) DEFAULT NULL::character varying,
    end_latitude numeric(10,6) DEFAULT NULL::numeric,
    end_longitude numeric(10,6) DEFAULT NULL::numeric,
    distance_km integer,
    status character varying(20) DEFAULT 'Draft'::character varying,
    start_mileage integer,
    end_mileage integer,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vehicle_trips OWNER TO taf;

--
-- Name: vehicle_trips_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.vehicle_trips_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.vehicle_trips_id_seq OWNER TO taf;

--
-- Name: vehicle_trips_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.vehicle_trips_id_seq OWNED BY public.vehicle_trips.id;


--
-- Name: vehicle_types; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vehicle_types (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vehicle_types OWNER TO taf;

--
-- Name: vehicle_types_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.vehicle_types_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.vehicle_types_id_seq OWNER TO taf;

--
-- Name: vehicle_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.vehicle_types_id_seq OWNED BY public.vehicle_types.id;


--
-- Name: vehicles; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vehicles (
    id integer NOT NULL,
    make character varying(100) DEFAULT NULL::character varying,
    model character varying(100) DEFAULT NULL::character varying,
    vehicle_number character varying(100) DEFAULT NULL::character varying,
    vin character varying(100) DEFAULT NULL::character varying,
    engine_number character varying(100) DEFAULT NULL::character varying,
    mileage integer,
    year integer,
    type character varying(100) DEFAULT NULL::character varying,
    fitness_expires date,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vehicles OWNER TO taf;

--
-- Name: vehicles_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.vehicles_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.vehicles_id_seq OWNER TO taf;

--
-- Name: vehicles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.vehicles_id_seq OWNED BY public.vehicles.id;


--
-- Name: vendor_addresses; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_addresses (
    vendor_address_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    vendor_id uuid NOT NULL,
    address_type character varying(50) DEFAULT 'office'::character varying NOT NULL,
    line1 text NOT NULL,
    line2 text,
    city character varying(150) DEFAULT NULL::character varying,
    state_region character varying(150) DEFAULT NULL::character varying,
    postal_code character varying(25) DEFAULT NULL::character varying,
    country_code character varying(2) DEFAULT NULL::character varying,
    is_primary boolean DEFAULT false NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vendor_addresses OWNER TO taf;

--
-- Name: vendor_bank_accounts; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_bank_accounts (
    vendor_bank_account_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    vendor_id uuid NOT NULL,
    bank_name character varying(255) NOT NULL,
    account_number character varying(100) NOT NULL,
    account_name character varying(255) DEFAULT NULL::character varying,
    branch_name character varying(255) DEFAULT NULL::character varying,
    swift_code character varying(50) DEFAULT NULL::character varying,
    currency character varying(10) DEFAULT NULL::character varying,
    is_primary boolean DEFAULT false NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vendor_bank_accounts OWNER TO taf;

--
-- Name: vendor_capabilities; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_capabilities (
    vendor_capability_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    vendor_id uuid NOT NULL,
    capability_category text,
    capability_description text,
    experience_years integer,
    certifications text,
    capacity_notes text,
    competency_score numeric(5,2) DEFAULT NULL::numeric,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vendor_capabilities OWNER TO taf;

--
-- Name: vendor_certificates; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_certificates (
    vendor_certificate_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    vendor_id uuid NOT NULL,
    certificate_name text,
    description text,
    expiry_date date,
    issued_at date,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vendor_certificates OWNER TO taf;

--
-- Name: vendor_contacts; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_contacts (
    vendor_contact_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    vendor_id uuid NOT NULL,
    contact_name character varying(255) NOT NULL,
    contact_role character varying(150) DEFAULT NULL::character varying,
    email public.citext,
    phone_number text,
    is_primary boolean DEFAULT false NOT NULL,
    notes text,
    created_at timestamp with time zone DEFAULT now() NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vendor_contacts OWNER TO taf;

--
-- Name: vendor_documents; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_documents (
    vendor_document_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    vendor_id uuid NOT NULL,
    filetype character varying(50) DEFAULT NULL::character varying,
    doc_type character varying(100) DEFAULT NULL::character varying,
    file_url text,
    validity date,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vendor_documents OWNER TO taf;

--
-- Name: vendor_emails; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_emails (
    vendor_email_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    vendor_id uuid NOT NULL,
    email public.citext NOT NULL,
    is_primary boolean DEFAULT false NOT NULL,
    verified_at timestamp with time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vendor_emails OWNER TO taf;

--
-- Name: vendor_invoices; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_invoices (
    vendor_invoice_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    org_id uuid,
    purchase_order_id uuid NOT NULL,
    invoice_number character varying(100) NOT NULL,
    invoice_date date NOT NULL,
    amount numeric(12,2) NOT NULL,
    status character varying(50) DEFAULT 'unpaid'::character varying,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vendor_invoices OWNER TO taf;

--
-- Name: vendor_performance_metrics; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_performance_metrics (
    vendor_performance_metric_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    vendor_id uuid NOT NULL,
    period_start date,
    period_end date,
    kpi_name character varying(150) NOT NULL,
    kpi_value numeric(12,4) DEFAULT NULL::numeric,
    rating numeric(5,2) DEFAULT NULL::numeric,
    reviewer_id uuid,
    comments text,
    created_at timestamp with time zone DEFAULT now() NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vendor_performance_metrics OWNER TO taf;

--
-- Name: vendor_phone_numbers; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_phone_numbers (
    vendor_phone_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    vendor_id uuid NOT NULL,
    phone_number text NOT NULL,
    is_primary boolean DEFAULT false NOT NULL,
    verified_at timestamp with time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vendor_phone_numbers OWNER TO taf;

--
-- Name: vendor_quote_items; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_quote_items (
    quote_item_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    quote_id uuid NOT NULL,
    rfq_item_id bigint,
    is_alternate boolean DEFAULT false NOT NULL,
    alt_label text,
    unit_price numeric(14,4),
    tax numeric(14,4),
    lead_time_days integer,
    notes text
);


ALTER TABLE public.vendor_quote_items OWNER TO taf;

--
-- Name: vendor_quotes; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_quotes (
    quote_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    rfq_id uuid NOT NULL,
    invite_id uuid,
    vendor_id uuid NOT NULL,
    currency text,
    total_amount numeric(14,2),
    tax_total numeric(14,2),
    delivery_days integer,
    valid_thru date,
    notes text,
    attachments jsonb,
    revision_no integer DEFAULT 1 NOT NULL,
    submitted_at timestamp with time zone,
    status text DEFAULT 'draft'::text NOT NULL,
    created_at timestamp with time zone DEFAULT now() NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL,
    CONSTRAINT vendor_quotes_status_check CHECK ((status = ANY (ARRAY['draft'::text, 'submitted'::text, 'revised'::text, 'withdrawn'::text, 'final'::text])))
);


ALTER TABLE public.vendor_quotes OWNER TO taf;

--
-- Name: vendor_supporting_docs; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendor_supporting_docs (
    vendor_supporting_doc_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    vendor_id uuid NOT NULL,
    filetype character varying(50) NOT NULL,
    type character varying(100) NOT NULL,
    file_url text NOT NULL,
    validity date,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.vendor_supporting_docs OWNER TO taf;

--
-- Name: vendors; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.vendors (
    vendor_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    vendorname character varying(255) NOT NULL,
    businessregnumber character varying(255) DEFAULT NULL::character varying,
    tin character varying(255) DEFAULT NULL::character varying,
    num_employees integer,
    company_size character varying(50) DEFAULT NULL::character varying,
    org_id uuid,
    lifecycle_status character varying(50) DEFAULT 'pending'::character varying NOT NULL,
    last_reviewed_at timestamp with time zone,
    avg_rating numeric(5,2) DEFAULT NULL::numeric,
    created_at timestamp with time zone DEFAULT now() NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL,
    CONSTRAINT vendors_lifecycle_status_check CHECK (((lifecycle_status)::text = ANY ((ARRAY['pending'::character varying, 'onboarding'::character varying, 'active'::character varying, 'suspended'::character varying, 'offboarded'::character varying])::text[])))
);


ALTER TABLE public.vendors OWNER TO taf;

--
-- Name: view_filters; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.view_filters (
    id integer NOT NULL,
    view_id integer NOT NULL,
    tenant_id integer,
    branch_id integer,
    field_name character varying(100) NOT NULL,
    operator character varying(10) NOT NULL,
    value character varying(255) DEFAULT NULL::character varying,
    order_index integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.view_filters OWNER TO taf;

--
-- Name: view_filters_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.view_filters_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.view_filters_id_seq OWNER TO taf;

--
-- Name: view_filters_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.view_filters_id_seq OWNED BY public.view_filters.id;


--
-- Name: violation_types; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.violation_types (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    handbook_ref character varying(255) DEFAULT NULL::character varying,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.violation_types OWNER TO taf;

--
-- Name: violation_types_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.violation_types_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.violation_types_id_seq OWNER TO taf;

--
-- Name: violation_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.violation_types_id_seq OWNED BY public.violation_types.id;


--
-- Name: work_types; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.work_types (
    work_type_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    name text,
    org_id uuid,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.work_types OWNER TO taf;

--
-- Name: workcom_inspection_types; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workcom_inspection_types (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    form_id integer,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workcom_inspection_types OWNER TO taf;

--
-- Name: workcom_inspection_types_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workcom_inspection_types_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workcom_inspection_types_id_seq OWNER TO taf;

--
-- Name: workcom_inspection_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workcom_inspection_types_id_seq OWNED BY public.workcom_inspection_types.id;


--
-- Name: workcom_inspections; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workcom_inspections (
    id integer NOT NULL,
    date date NOT NULL,
    location character varying(255) DEFAULT NULL::character varying,
    short_description character varying(255) DEFAULT NULL::character varying,
    inspector_id integer,
    inspection_type_id integer,
    workplace_id integer,
    inspection_request_id integer,
    form_data jsonb,
    tenant_id integer,
    branch_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workcom_inspections OWNER TO taf;

--
-- Name: workcom_inspections_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workcom_inspections_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workcom_inspections_id_seq OWNER TO taf;

--
-- Name: workcom_inspections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workcom_inspections_id_seq OWNED BY public.workcom_inspections.id;


--
-- Name: workflow_approvals; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workflow_approvals (
    id integer NOT NULL,
    workflow_id integer NOT NULL,
    step_order integer NOT NULL,
    approver_role character varying(100) NOT NULL,
    status character varying(50) DEFAULT 'pending'::character varying,
    record_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workflow_approvals OWNER TO taf;

--
-- Name: workflow_approvals_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workflow_approvals_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workflow_approvals_id_seq OWNER TO taf;

--
-- Name: workflow_approvals_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workflow_approvals_id_seq OWNED BY public.workflow_approvals.id;


--
-- Name: workflow_event_triggers; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workflow_event_triggers (
    id integer NOT NULL,
    event_name character varying(100) NOT NULL,
    table_name character varying(100) NOT NULL,
    trigger_type character varying(10) NOT NULL,
    form_id integer,
    operations json,
    field_map json,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workflow_event_triggers OWNER TO taf;

--
-- Name: workflow_event_triggers_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workflow_event_triggers_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workflow_event_triggers_id_seq OWNER TO taf;

--
-- Name: workflow_event_triggers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workflow_event_triggers_id_seq OWNED BY public.workflow_event_triggers.id;


--
-- Name: workflow_instances; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workflow_instances (
    id integer NOT NULL,
    workflow_id integer NOT NULL,
    record_id integer NOT NULL,
    current_state_id integer,
    started_by integer,
    status character varying(50) DEFAULT 'pending'::character varying,
    started_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workflow_instances OWNER TO taf;

--
-- Name: workflow_instances_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workflow_instances_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workflow_instances_id_seq OWNER TO taf;

--
-- Name: workflow_instances_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workflow_instances_id_seq OWNED BY public.workflow_instances.id;


--
-- Name: workflow_states; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workflow_states (
    id integer NOT NULL,
    workflow_id integer NOT NULL,
    name character varying(100) NOT NULL,
    state_order integer NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workflow_states OWNER TO taf;

--
-- Name: workflow_states_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workflow_states_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workflow_states_id_seq OWNER TO taf;

--
-- Name: workflow_states_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workflow_states_id_seq OWNED BY public.workflow_states.id;


--
-- Name: workflow_step_types; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workflow_step_types (
    id integer NOT NULL,
    type character varying(100) NOT NULL,
    description text,
    metadata json,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workflow_step_types OWNER TO taf;

--
-- Name: workflow_step_types_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workflow_step_types_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workflow_step_types_id_seq OWNER TO taf;

--
-- Name: workflow_step_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workflow_step_types_id_seq OWNED BY public.workflow_step_types.id;


--
-- Name: workflow_steps; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workflow_steps (
    id integer NOT NULL,
    workflow_id integer NOT NULL,
    step_order integer NOT NULL,
    step_type character varying(50) NOT NULL,
    config json,
    tenant_id integer,
    department_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workflow_steps OWNER TO taf;

--
-- Name: workflow_steps_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workflow_steps_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workflow_steps_id_seq OWNER TO taf;

--
-- Name: workflow_steps_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workflow_steps_id_seq OWNED BY public.workflow_steps.id;


--
-- Name: workflow_tasks; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workflow_tasks (
    id integer NOT NULL,
    instance_id integer NOT NULL,
    state_id integer NOT NULL,
    assignee_user_id integer,
    assignee_role character varying(100) DEFAULT NULL::character varying,
    status character varying(50) DEFAULT 'pending'::character varying,
    due_at timestamp without time zone,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workflow_tasks OWNER TO taf;

--
-- Name: workflow_tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workflow_tasks_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workflow_tasks_id_seq OWNER TO taf;

--
-- Name: workflow_tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workflow_tasks_id_seq OWNED BY public.workflow_tasks.id;


--
-- Name: workflow_transitions; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workflow_transitions (
    id integer NOT NULL,
    workflow_id integer NOT NULL,
    from_state_id integer NOT NULL,
    to_state_id integer NOT NULL,
    action character varying(100) DEFAULT NULL::character varying,
    conditions json,
    transition_order integer NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workflow_transitions OWNER TO taf;

--
-- Name: workflow_transitions_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workflow_transitions_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workflow_transitions_id_seq OWNER TO taf;

--
-- Name: workflow_transitions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workflow_transitions_id_seq OWNED BY public.workflow_transitions.id;


--
-- Name: workflow_triggers; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workflow_triggers (
    id integer NOT NULL,
    workflow_id integer NOT NULL,
    event_name character varying(100) NOT NULL,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workflow_triggers OWNER TO taf;

--
-- Name: workflow_triggers_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workflow_triggers_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workflow_triggers_id_seq OWNER TO taf;

--
-- Name: workflow_triggers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workflow_triggers_id_seq OWNED BY public.workflow_triggers.id;


--
-- Name: workflows; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workflows (
    id integer NOT NULL,
    tenant_id integer,
    department_id integer,
    name character varying(255) NOT NULL,
    trigger_event character varying(100) NOT NULL,
    definition json NOT NULL,
    is_active boolean DEFAULT true,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workflows OWNER TO taf;

--
-- Name: workflows_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workflows_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workflows_id_seq OWNER TO taf;

--
-- Name: workflows_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workflows_id_seq OWNED BY public.workflows.id;


--
-- Name: workplace_registrations; Type: TABLE; Schema: public; Owner: taf
--

CREATE TABLE public.workplace_registrations (
    id integer NOT NULL,
    company_name character varying(255) DEFAULT NULL::character varying,
    address text,
    name_of_owners_of_business json,
    trading_name character varying(100) DEFAULT NULL::character varying,
    address_of_workplace text,
    postal_address text,
    date_of_business_commenced_operations_at_these_premises date,
    details_of_ownership_of_premises text,
    name_and_address_of_owner_of_the_building text,
    details_of_business_activiy text,
    main_activity_conducted_by_business text,
    principal_articles_to_be_manufactured_repaired_or_sold text,
    sales_type character varying(100) DEFAULT NULL::character varying,
    goods_sold character varying(100) DEFAULT NULL::character varying,
    has_site_previously_been_used_as_a_workplace text,
    name_of_previous_occupier character varying(100) DEFAULT NULL::character varying,
    contact_telephone_number character varying(50) DEFAULT NULL::character varying,
    maximum_number_of_employees character varying(50) DEFAULT NULL::character varying,
    committee_members text,
    training_undergone character varying(100) DEFAULT NULL::character varying,
    district character varying(100) DEFAULT NULL::character varying,
    ohs_policy character varying(100) DEFAULT NULL::character varying,
    minutes character varying(100) DEFAULT NULL::character varying,
    tin character varying(50) DEFAULT NULL::character varying,
    contact_person character varying(255) DEFAULT NULL::character varying,
    contact_email character varying(255) DEFAULT NULL::character varying,
    contact_phone character varying(50) DEFAULT NULL::character varying,
    invoice_id integer,
    status character varying(50) DEFAULT 'pending'::character varying,
    branch_id integer,
    assigned_reviewer_id integer,
    tenant_id integer,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);


ALTER TABLE public.workplace_registrations OWNER TO taf;

--
-- Name: workplace_registrations_id_seq; Type: SEQUENCE; Schema: public; Owner: taf
--

CREATE SEQUENCE public.workplace_registrations_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.workplace_registrations_id_seq OWNER TO taf;

--
-- Name: workplace_registrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: taf
--

ALTER SEQUENCE public.workplace_registrations_id_seq OWNED BY public.workplace_registrations.id;


--
-- Name: account_ai_feedback id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.account_ai_feedback ALTER COLUMN id SET DEFAULT nextval('public.account_ai_feedback_id_seq'::regclass);


--
-- Name: appeals id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.appeals ALTER COLUMN id SET DEFAULT nextval('public.appeals_id_seq'::regclass);


--
-- Name: appraisal_templates id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.appraisal_templates ALTER COLUMN id SET DEFAULT nextval('public.appraisal_templates_id_seq'::regclass);


--
-- Name: attendance id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.attendance ALTER COLUMN id SET DEFAULT nextval('public.attendance_id_seq'::regclass);


--
-- Name: audit_logs id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.audit_logs ALTER COLUMN id SET DEFAULT nextval('public.audit_logs_id_seq'::regclass);


--
-- Name: bank_detail_changes id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.bank_detail_changes ALTER COLUMN id SET DEFAULT nextval('public.bank_detail_changes_id_seq'::regclass);


--
-- Name: calendar_accounts id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.calendar_accounts ALTER COLUMN id SET DEFAULT nextval('public.calendar_accounts_id_seq'::regclass);


--
-- Name: calendar_availability id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.calendar_availability ALTER COLUMN id SET DEFAULT nextval('public.calendar_availability_id_seq'::regclass);


--
-- Name: calendar_categories id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.calendar_categories ALTER COLUMN id SET DEFAULT nextval('public.calendar_categories_id_seq'::regclass);


--
-- Name: calendar_event_documents id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.calendar_event_documents ALTER COLUMN id SET DEFAULT nextval('public.calendar_event_documents_id_seq'::regclass);


--
-- Name: calendar_event_permissions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.calendar_event_permissions ALTER COLUMN id SET DEFAULT nextval('public.calendar_event_permissions_id_seq'::regclass);


--
-- Name: calendar_events id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.calendar_events ALTER COLUMN id SET DEFAULT nextval('public.calendar_events_id_seq'::regclass);


--
-- Name: career_paths id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.career_paths ALTER COLUMN id SET DEFAULT nextval('public.career_paths_id_seq'::regclass);


--
-- Name: career_steps id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.career_steps ALTER COLUMN id SET DEFAULT nextval('public.career_steps_id_seq'::regclass);


--
-- Name: case_evidence id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.case_evidence ALTER COLUMN id SET DEFAULT nextval('public.case_evidence_id_seq'::regclass);


--
-- Name: case_notes id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.case_notes ALTER COLUMN id SET DEFAULT nextval('public.case_notes_id_seq'::regclass);


--
-- Name: case_participants id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.case_participants ALTER COLUMN id SET DEFAULT nextval('public.case_participants_id_seq'::regclass);


--
-- Name: case_tasks id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.case_tasks ALTER COLUMN id SET DEFAULT nextval('public.case_tasks_id_seq'::regclass);


--
-- Name: cash_sessions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.cash_sessions ALTER COLUMN id SET DEFAULT nextval('public.cash_sessions_id_seq'::regclass);


--
-- Name: certificate_templates id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.certificate_templates ALTER COLUMN id SET DEFAULT nextval('public.certificate_templates_id_seq'::regclass);


--
-- Name: check_ins id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.check_ins ALTER COLUMN id SET DEFAULT nextval('public.check_ins_id_seq'::regclass);


--
-- Name: companies id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.companies ALTER COLUMN id SET DEFAULT nextval('public.companies_id_seq'::regclass);


--
-- Name: competencies id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.competencies ALTER COLUMN id SET DEFAULT nextval('public.competencies_id_seq'::regclass);


--
-- Name: competency_assessments id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.competency_assessments ALTER COLUMN id SET DEFAULT nextval('public.competency_assessments_id_seq'::regclass);


--
-- Name: contract_approvals id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.contract_approvals ALTER COLUMN id SET DEFAULT nextval('public.contract_approvals_id_seq'::regclass);


--
-- Name: contract_versions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.contract_versions ALTER COLUMN id SET DEFAULT nextval('public.contract_versions_id_seq'::regclass);


--
-- Name: contracts id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.contracts ALTER COLUMN id SET DEFAULT nextval('public.contracts_id_seq'::regclass);


--
-- Name: corrective_actions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.corrective_actions ALTER COLUMN id SET DEFAULT nextval('public.corrective_actions_id_seq'::regclass);


--
-- Name: countries id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.countries ALTER COLUMN id SET DEFAULT nextval('public.countries_id_seq'::regclass);


--
-- Name: country_holidays id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.country_holidays ALTER COLUMN id SET DEFAULT nextval('public.country_holidays_id_seq'::regclass);


--
-- Name: custom_field_values id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.custom_field_values ALTER COLUMN id SET DEFAULT nextval('public.custom_field_values_id_seq'::regclass);


--
-- Name: custom_fields id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.custom_fields ALTER COLUMN id SET DEFAULT nextval('public.custom_fields_id_seq'::regclass);


--
-- Name: customer_history id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.customer_history ALTER COLUMN id SET DEFAULT nextval('public.customer_history_id_seq'::regclass);


--
-- Name: customer_settings id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.customer_settings ALTER COLUMN id SET DEFAULT nextval('public.customer_settings_id_seq'::regclass);


--
-- Name: dashboard_card_permissions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.dashboard_card_permissions ALTER COLUMN id SET DEFAULT nextval('public.dashboard_card_permissions_id_seq'::regclass);


--
-- Name: demo_graph_data id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.demo_graph_data ALTER COLUMN id SET DEFAULT nextval('public.demo_graph_data_id_seq'::regclass);


--
-- Name: detail_view_elements id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.detail_view_elements ALTER COLUMN id SET DEFAULT nextval('public.detail_view_elements_id_seq'::regclass);


--
-- Name: detail_views id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.detail_views ALTER COLUMN id SET DEFAULT nextval('public.detail_views_id_seq'::regclass);


--
-- Name: disciplinary_actions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.disciplinary_actions ALTER COLUMN id SET DEFAULT nextval('public.disciplinary_actions_id_seq'::regclass);


--
-- Name: disciplinary_cases id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.disciplinary_cases ALTER COLUMN id SET DEFAULT nextval('public.disciplinary_cases_id_seq'::regclass);


--
-- Name: districts id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.districts ALTER COLUMN id SET DEFAULT nextval('public.districts_id_seq'::regclass);


--
-- Name: document_categories id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.document_categories ALTER COLUMN id SET DEFAULT nextval('public.document_categories_id_seq'::regclass);


--
-- Name: document_folders id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.document_folders ALTER COLUMN id SET DEFAULT nextval('public.document_folders_id_seq'::regclass);


--
-- Name: element_options id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.element_options ALTER COLUMN id SET DEFAULT nextval('public.element_options_id_seq'::regclass);


--
-- Name: element_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.element_types ALTER COLUMN id SET DEFAULT nextval('public.element_types_id_seq'::regclass);


--
-- Name: employee_authorized_locations id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employee_authorized_locations ALTER COLUMN id SET DEFAULT nextval('public.employee_authorized_locations_id_seq'::regclass);


--
-- Name: employee_certificates id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employee_certificates ALTER COLUMN id SET DEFAULT nextval('public.employee_certificates_id_seq'::regclass);


--
-- Name: employee_competencies id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employee_competencies ALTER COLUMN id SET DEFAULT nextval('public.employee_competencies_id_seq'::regclass);


--
-- Name: employee_custom_fields id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employee_custom_fields ALTER COLUMN id SET DEFAULT nextval('public.employee_custom_fields_id_seq'::regclass);


--
-- Name: employee_custom_values id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employee_custom_values ALTER COLUMN id SET DEFAULT nextval('public.employee_custom_values_id_seq'::regclass);


--
-- Name: employee_documents id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employee_documents ALTER COLUMN id SET DEFAULT nextval('public.employee_documents_id_seq'::regclass);


--
-- Name: employee_exits id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employee_exits ALTER COLUMN id SET DEFAULT nextval('public.employee_exits_id_seq'::regclass);


--
-- Name: employee_items id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employee_items ALTER COLUMN id SET DEFAULT nextval('public.employee_items_id_seq'::regclass);


--
-- Name: employee_location_changes id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employee_location_changes ALTER COLUMN id SET DEFAULT nextval('public.employee_location_changes_id_seq'::regclass);


--
-- Name: employee_shifts id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employee_shifts ALTER COLUMN id SET DEFAULT nextval('public.employee_shifts_id_seq'::regclass);


--
-- Name: employee_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employee_types ALTER COLUMN id SET DEFAULT nextval('public.employee_types_id_seq'::regclass);


--
-- Name: employees2locations id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employees2locations ALTER COLUMN id SET DEFAULT nextval('public.employees2locations_id_seq'::regclass);


--
-- Name: employees2users id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.employees2users ALTER COLUMN id SET DEFAULT nextval('public.employees2users_id_seq'::regclass);


--
-- Name: event_categories id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.event_categories ALTER COLUMN id SET DEFAULT nextval('public.event_categories_id_seq'::regclass);


--
-- Name: exit_approvals id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.exit_approvals ALTER COLUMN id SET DEFAULT nextval('public.exit_approvals_id_seq'::regclass);


--
-- Name: exit_clearances id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.exit_clearances ALTER COLUMN id SET DEFAULT nextval('public.exit_clearances_id_seq'::regclass);


--
-- Name: exit_feedback id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.exit_feedback ALTER COLUMN id SET DEFAULT nextval('public.exit_feedback_id_seq'::regclass);


--
-- Name: exit_interviews id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.exit_interviews ALTER COLUMN id SET DEFAULT nextval('public.exit_interviews_id_seq'::regclass);


--
-- Name: expense_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.expense_types ALTER COLUMN id SET DEFAULT nextval('public.expense_types_id_seq'::regclass);


--
-- Name: feedback_notes id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.feedback_notes ALTER COLUMN id SET DEFAULT nextval('public.feedback_notes_id_seq'::regclass);


--
-- Name: feedback_requests id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.feedback_requests ALTER COLUMN id SET DEFAULT nextval('public.feedback_requests_id_seq'::regclass);


--
-- Name: field_definitions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.field_definitions ALTER COLUMN id SET DEFAULT nextval('public.field_definitions_id_seq'::regclass);


--
-- Name: final_settlements id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.final_settlements ALTER COLUMN id SET DEFAULT nextval('public.final_settlements_id_seq'::regclass);


--
-- Name: fishbone_diagrams id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.fishbone_diagrams ALTER COLUMN id SET DEFAULT nextval('public.fishbone_diagrams_id_seq'::regclass);


--
-- Name: form_buttons id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.form_buttons ALTER COLUMN id SET DEFAULT nextval('public.form_buttons_id_seq'::regclass);


--
-- Name: form_categories id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.form_categories ALTER COLUMN id SET DEFAULT nextval('public.form_categories_id_seq'::regclass);


--
-- Name: form_certificates id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.form_certificates ALTER COLUMN id SET DEFAULT nextval('public.form_certificates_id_seq'::regclass);


--
-- Name: form_definitions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.form_definitions ALTER COLUMN id SET DEFAULT nextval('public.form_definitions_id_seq'::regclass);


--
-- Name: form_submission_reviews id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.form_submission_reviews ALTER COLUMN id SET DEFAULT nextval('public.form_submission_reviews_id_seq'::regclass);


--
-- Name: form_submission_values id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.form_submission_values ALTER COLUMN id SET DEFAULT nextval('public.form_submission_values_id_seq'::regclass);


--
-- Name: form_submissions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.form_submissions ALTER COLUMN id SET DEFAULT nextval('public.form_submissions_id_seq'::regclass);


--
-- Name: form_wizard_steps id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.form_wizard_steps ALTER COLUMN id SET DEFAULT nextval('public.form_wizard_steps_id_seq'::regclass);


--
-- Name: form_wizards id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.form_wizards ALTER COLUMN id SET DEFAULT nextval('public.form_wizards_id_seq'::regclass);


--
-- Name: forms id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.forms ALTER COLUMN id SET DEFAULT nextval('public.forms_id_seq'::regclass);


--
-- Name: goal_alignment id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.goal_alignment ALTER COLUMN id SET DEFAULT nextval('public.goal_alignment_id_seq'::regclass);


--
-- Name: goal_documents id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.goal_documents ALTER COLUMN id SET DEFAULT nextval('public.goal_documents_id_seq'::regclass);


--
-- Name: goal_milestones id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.goal_milestones ALTER COLUMN id SET DEFAULT nextval('public.goal_milestones_id_seq'::regclass);


--
-- Name: goal_score_labels id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.goal_score_labels ALTER COLUMN id SET DEFAULT nextval('public.goal_score_labels_id_seq'::regclass);


--
-- Name: goal_templates id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.goal_templates ALTER COLUMN id SET DEFAULT nextval('public.goal_templates_id_seq'::regclass);


--
-- Name: graphs id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.graphs ALTER COLUMN id SET DEFAULT nextval('public.graphs_id_seq'::regclass);


--
-- Name: incident_alert_rules id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.incident_alert_rules ALTER COLUMN id SET DEFAULT nextval('public.incident_alert_rules_id_seq'::regclass);


--
-- Name: inspection_assignment_rules id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.inspection_assignment_rules ALTER COLUMN id SET DEFAULT nextval('public.inspection_assignment_rules_id_seq'::regclass);


--
-- Name: inspection_requests id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.inspection_requests ALTER COLUMN id SET DEFAULT nextval('public.inspection_requests_id_seq'::regclass);


--
-- Name: interview_logs id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.interview_logs ALTER COLUMN id SET DEFAULT nextval('public.interview_logs_id_seq'::regclass);


--
-- Name: invoice_payments id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.invoice_payments ALTER COLUMN id SET DEFAULT nextval('public.invoice_payments_id_seq'::regclass);


--
-- Name: invoice_settings id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.invoice_settings ALTER COLUMN id SET DEFAULT nextval('public.invoice_settings_id_seq'::regclass);


--
-- Name: job_opening_templates id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.job_opening_templates ALTER COLUMN id SET DEFAULT nextval('public.job_opening_templates_id_seq'::regclass);


--
-- Name: kanban_boards id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.kanban_boards ALTER COLUMN id SET DEFAULT nextval('public.kanban_boards_id_seq'::regclass);


--
-- Name: kanban_columns id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.kanban_columns ALTER COLUMN id SET DEFAULT nextval('public.kanban_columns_id_seq'::regclass);


--
-- Name: kanban_comments id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.kanban_comments ALTER COLUMN id SET DEFAULT nextval('public.kanban_comments_id_seq'::regclass);


--
-- Name: kanban_tasks id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.kanban_tasks ALTER COLUMN id SET DEFAULT nextval('public.kanban_tasks_id_seq'::regclass);


--
-- Name: legacy_resources id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.legacy_resources ALTER COLUMN id SET DEFAULT nextval('public.legacy_resources_id_seq'::regclass);


--
-- Name: line_items id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.line_items ALTER COLUMN id SET DEFAULT nextval('public.line_items_id_seq'::regclass);


--
-- Name: locations id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.locations ALTER COLUMN id SET DEFAULT nextval('public.locations_id_seq'::regclass);


--
-- Name: meeting_links id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.meeting_links ALTER COLUMN id SET DEFAULT nextval('public.meeting_links_id_seq'::regclass);


--
-- Name: notification_log id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.notification_log ALTER COLUMN id SET DEFAULT nextval('public.notification_log_id_seq'::regclass);


--
-- Name: ohs_action_signoffs id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_action_signoffs ALTER COLUMN id SET DEFAULT nextval('public.ohs_action_signoffs_id_seq'::regclass);


--
-- Name: ohs_actions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_actions ALTER COLUMN id SET DEFAULT nextval('public.ohs_actions_id_seq'::regclass);


--
-- Name: ohs_assignment_rules id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_assignment_rules ALTER COLUMN id SET DEFAULT nextval('public.ohs_assignment_rules_id_seq'::regclass);


--
-- Name: ohs_compliance_logs id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_compliance_logs ALTER COLUMN id SET DEFAULT nextval('public.ohs_compliance_logs_id_seq'::regclass);


--
-- Name: ohs_compliance_tasks id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_compliance_tasks ALTER COLUMN id SET DEFAULT nextval('public.ohs_compliance_tasks_id_seq'::regclass);


--
-- Name: ohs_emergency_contacts id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_emergency_contacts ALTER COLUMN id SET DEFAULT nextval('public.ohs_emergency_contacts_id_seq'::regclass);


--
-- Name: ohs_emergency_drills id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_emergency_drills ALTER COLUMN id SET DEFAULT nextval('public.ohs_emergency_drills_id_seq'::regclass);


--
-- Name: ohs_fault_trees id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_fault_trees ALTER COLUMN id SET DEFAULT nextval('public.ohs_fault_trees_id_seq'::regclass);


--
-- Name: ohs_field_incidents id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_field_incidents ALTER COLUMN id SET DEFAULT nextval('public.ohs_field_incidents_id_seq'::regclass);


--
-- Name: ohs_five_whys id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_five_whys ALTER COLUMN id SET DEFAULT nextval('public.ohs_five_whys_id_seq'::regclass);


--
-- Name: ohs_hazard_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_hazard_types ALTER COLUMN id SET DEFAULT nextval('public.ohs_hazard_types_id_seq'::regclass);


--
-- Name: ohs_hazards id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_hazards ALTER COLUMN id SET DEFAULT nextval('public.ohs_hazards_id_seq'::regclass);


--
-- Name: ohs_health_checks id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_health_checks ALTER COLUMN id SET DEFAULT nextval('public.ohs_health_checks_id_seq'::regclass);


--
-- Name: ohs_incident_custom_fields id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_incident_custom_fields ALTER COLUMN id SET DEFAULT nextval('public.ohs_incident_custom_fields_id_seq'::regclass);


--
-- Name: ohs_incident_files id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_incident_files ALTER COLUMN id SET DEFAULT nextval('public.ohs_incident_files_id_seq'::regclass);


--
-- Name: ohs_incident_logs id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_incident_logs ALTER COLUMN id SET DEFAULT nextval('public.ohs_incident_logs_id_seq'::regclass);


--
-- Name: ohs_incident_signoffs id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_incident_signoffs ALTER COLUMN id SET DEFAULT nextval('public.ohs_incident_signoffs_id_seq'::regclass);


--
-- Name: ohs_incident_statuses id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_incident_statuses ALTER COLUMN id SET DEFAULT nextval('public.ohs_incident_statuses_id_seq'::regclass);


--
-- Name: ohs_incident_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_incident_types ALTER COLUMN id SET DEFAULT nextval('public.ohs_incident_types_id_seq'::regclass);


--
-- Name: ohs_incidents id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_incidents ALTER COLUMN id SET DEFAULT nextval('public.ohs_incidents_id_seq'::regclass);


--
-- Name: ohs_inspection_audits id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_inspection_audits ALTER COLUMN id SET DEFAULT nextval('public.ohs_inspection_audits_id_seq'::regclass);


--
-- Name: ohs_inspection_items id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_inspection_items ALTER COLUMN id SET DEFAULT nextval('public.ohs_inspection_items_id_seq'::regclass);


--
-- Name: ohs_inspection_templates id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_inspection_templates ALTER COLUMN id SET DEFAULT nextval('public.ohs_inspection_templates_id_seq'::regclass);


--
-- Name: ohs_inspection_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_inspection_types ALTER COLUMN id SET DEFAULT nextval('public.ohs_inspection_types_id_seq'::regclass);


--
-- Name: ohs_inspections id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_inspections ALTER COLUMN id SET DEFAULT nextval('public.ohs_inspections_id_seq'::regclass);


--
-- Name: ohs_issues id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_issues ALTER COLUMN id SET DEFAULT nextval('public.ohs_issues_id_seq'::regclass);


--
-- Name: ohs_jsa_reviewers id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_jsa_reviewers ALTER COLUMN id SET DEFAULT nextval('public.ohs_jsa_reviewers_id_seq'::regclass);


--
-- Name: ohs_jsa_signoffs id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_jsa_signoffs ALTER COLUMN id SET DEFAULT nextval('public.ohs_jsa_signoffs_id_seq'::regclass);


--
-- Name: ohs_jsa_step_files id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_jsa_step_files ALTER COLUMN id SET DEFAULT nextval('public.ohs_jsa_step_files_id_seq'::regclass);


--
-- Name: ohs_jsa_steps id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_jsa_steps ALTER COLUMN id SET DEFAULT nextval('public.ohs_jsa_steps_id_seq'::regclass);


--
-- Name: ohs_jsa_training id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_jsa_training ALTER COLUMN id SET DEFAULT nextval('public.ohs_jsa_training_id_seq'::regclass);


--
-- Name: ohs_jsa_versions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_jsa_versions ALTER COLUMN id SET DEFAULT nextval('public.ohs_jsa_versions_id_seq'::regclass);


--
-- Name: ohs_jsas id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_jsas ALTER COLUMN id SET DEFAULT nextval('public.ohs_jsas_id_seq'::regclass);


--
-- Name: ohs_medicals id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_medicals ALTER COLUMN id SET DEFAULT nextval('public.ohs_medicals_id_seq'::regclass);


--
-- Name: ohs_needs_expectations id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_needs_expectations ALTER COLUMN id SET DEFAULT nextval('public.ohs_needs_expectations_id_seq'::regclass);


--
-- Name: ohs_regulations id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_regulations ALTER COLUMN id SET DEFAULT nextval('public.ohs_regulations_id_seq'::regclass);


--
-- Name: ohs_risk_matrices id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_risk_matrices ALTER COLUMN id SET DEFAULT nextval('public.ohs_risk_matrices_id_seq'::regclass);


--
-- Name: ohs_risk_reviews id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_risk_reviews ALTER COLUMN id SET DEFAULT nextval('public.ohs_risk_reviews_id_seq'::regclass);


--
-- Name: ohs_root_causes id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_root_causes ALTER COLUMN id SET DEFAULT nextval('public.ohs_root_causes_id_seq'::regclass);


--
-- Name: ohs_severities id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_severities ALTER COLUMN id SET DEFAULT nextval('public.ohs_severities_id_seq'::regclass);


--
-- Name: ohs_stakeholders id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_stakeholders ALTER COLUMN id SET DEFAULT nextval('public.ohs_stakeholders_id_seq'::regclass);


--
-- Name: ohs_training_requirements id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ohs_training_requirements ALTER COLUMN id SET DEFAULT nextval('public.ohs_training_requirements_id_seq'::regclass);


--
-- Name: overtime_rules id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.overtime_rules ALTER COLUMN id SET DEFAULT nextval('public.overtime_rules_id_seq'::regclass);


--
-- Name: payment_request id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.payment_request ALTER COLUMN id SET DEFAULT nextval('public.payment_request_id_seq'::regclass);


--
-- Name: payment_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.payment_types ALTER COLUMN id SET DEFAULT nextval('public.payment_types_id_seq'::regclass);


--
-- Name: payroll_anomalies id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.payroll_anomalies ALTER COLUMN id SET DEFAULT nextval('public.payroll_anomalies_id_seq'::regclass);


--
-- Name: performance_goals id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.performance_goals ALTER COLUMN id SET DEFAULT nextval('public.performance_goals_id_seq'::regclass);


--
-- Name: performance_reviews id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.performance_reviews ALTER COLUMN id SET DEFAULT nextval('public.performance_reviews_id_seq'::regclass);


--
-- Name: permissions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.permissions ALTER COLUMN id SET DEFAULT nextval('public.permissions_id_seq'::regclass);


--
-- Name: permit_applications id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.permit_applications ALTER COLUMN id SET DEFAULT nextval('public.permit_applications_id_seq'::regclass);


--
-- Name: permit_documents id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.permit_documents ALTER COLUMN id SET DEFAULT nextval('public.permit_documents_id_seq'::regclass);


--
-- Name: permit_inspections id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.permit_inspections ALTER COLUMN id SET DEFAULT nextval('public.permit_inspections_id_seq'::regclass);


--
-- Name: permit_signatures id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.permit_signatures ALTER COLUMN id SET DEFAULT nextval('public.permit_signatures_id_seq'::regclass);


--
-- Name: permit_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.permit_types ALTER COLUMN id SET DEFAULT nextval('public.permit_types_id_seq'::regclass);


--
-- Name: policy_acknowledgments id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.policy_acknowledgments ALTER COLUMN id SET DEFAULT nextval('public.policy_acknowledgments_id_seq'::regclass);


--
-- Name: policy_approvals id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.policy_approvals ALTER COLUMN id SET DEFAULT nextval('public.policy_approvals_id_seq'::regclass);


--
-- Name: policy_targets id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.policy_targets ALTER COLUMN id SET DEFAULT nextval('public.policy_targets_id_seq'::regclass);


--
-- Name: policy_templates id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.policy_templates ALTER COLUMN id SET DEFAULT nextval('public.policy_templates_id_seq'::regclass);


--
-- Name: projects id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.projects ALTER COLUMN id SET DEFAULT nextval('public.projects_id_seq'::regclass);


--
-- Name: properties id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.properties ALTER COLUMN id SET DEFAULT nextval('public.properties_id_seq'::regclass);


--
-- Name: property_rates id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.property_rates ALTER COLUMN id SET DEFAULT nextval('public.property_rates_id_seq'::regclass);


--
-- Name: push_subscriptions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.push_subscriptions ALTER COLUMN id SET DEFAULT nextval('public.push_subscriptions_id_seq'::regclass);


--
-- Name: rate_invoices id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.rate_invoices ALTER COLUMN id SET DEFAULT nextval('public.rate_invoices_id_seq'::regclass);


--
-- Name: rate_payments id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.rate_payments ALTER COLUMN id SET DEFAULT nextval('public.rate_payments_id_seq'::regclass);


--
-- Name: ratepayers id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.ratepayers ALTER COLUMN id SET DEFAULT nextval('public.ratepayers_id_seq'::regclass);


--
-- Name: receipts id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.receipts ALTER COLUMN id SET DEFAULT nextval('public.receipts_id_seq'::regclass);


--
-- Name: reimbursement_claims id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.reimbursement_claims ALTER COLUMN id SET DEFAULT nextval('public.reimbursement_claims_id_seq'::regclass);


--
-- Name: resource_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.resource_types ALTER COLUMN id SET DEFAULT nextval('public.resource_types_id_seq'::regclass);


--
-- Name: resources id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.resources ALTER COLUMN id SET DEFAULT nextval('public.resources_id_seq'::regclass);


--
-- Name: review_calibrations id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.review_calibrations ALTER COLUMN id SET DEFAULT nextval('public.review_calibrations_id_seq'::regclass);


--
-- Name: review_cycles id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.review_cycles ALTER COLUMN id SET DEFAULT nextval('public.review_cycles_id_seq'::regclass);


--
-- Name: review_documents id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.review_documents ALTER COLUMN id SET DEFAULT nextval('public.review_documents_id_seq'::regclass);


--
-- Name: review_schedules id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.review_schedules ALTER COLUMN id SET DEFAULT nextval('public.review_schedules_id_seq'::regclass);


--
-- Name: rfq_items id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.rfq_items ALTER COLUMN id SET DEFAULT nextval('public.rfq_items_id_seq'::regclass);


--
-- Name: risk_assessment_files id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.risk_assessment_files ALTER COLUMN id SET DEFAULT nextval('public.risk_assessment_files_id_seq'::regclass);


--
-- Name: risk_assessment_hazards id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.risk_assessment_hazards ALTER COLUMN id SET DEFAULT nextval('public.risk_assessment_hazards_id_seq'::regclass);


--
-- Name: risk_assessment_ppe id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.risk_assessment_ppe ALTER COLUMN id SET DEFAULT nextval('public.risk_assessment_ppe_id_seq'::regclass);


--
-- Name: risk_assessment_signoffs id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.risk_assessment_signoffs ALTER COLUMN id SET DEFAULT nextval('public.risk_assessment_signoffs_id_seq'::regclass);


--
-- Name: risk_assessment_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.risk_assessment_types ALTER COLUMN id SET DEFAULT nextval('public.risk_assessment_types_id_seq'::regclass);


--
-- Name: risk_assessments id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.risk_assessments ALTER COLUMN id SET DEFAULT nextval('public.risk_assessments_id_seq'::regclass);


--
-- Name: risk_categories id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.risk_categories ALTER COLUMN id SET DEFAULT nextval('public.risk_categories_id_seq'::regclass);


--
-- Name: risk_identifications id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.risk_identifications ALTER COLUMN id SET DEFAULT nextval('public.risk_identifications_id_seq'::regclass);


--
-- Name: role_competencies id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.role_competencies ALTER COLUMN id SET DEFAULT nextval('public.role_competencies_id_seq'::regclass);


--
-- Name: safety_alert_files id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.safety_alert_files ALTER COLUMN id SET DEFAULT nextval('public.safety_alert_files_id_seq'::regclass);


--
-- Name: safety_alert_logs id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.safety_alert_logs ALTER COLUMN id SET DEFAULT nextval('public.safety_alert_logs_id_seq'::regclass);


--
-- Name: safety_alerts id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.safety_alerts ALTER COLUMN id SET DEFAULT nextval('public.safety_alerts_id_seq'::regclass);


--
-- Name: safety_document_versions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.safety_document_versions ALTER COLUMN id SET DEFAULT nextval('public.safety_document_versions_id_seq'::regclass);


--
-- Name: safety_documents id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.safety_documents ALTER COLUMN id SET DEFAULT nextval('public.safety_documents_id_seq'::regclass);


--
-- Name: safety_field_incidents id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.safety_field_incidents ALTER COLUMN id SET DEFAULT nextval('public.safety_field_incidents_id_seq'::regclass);


--
-- Name: safety_incident_files id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.safety_incident_files ALTER COLUMN id SET DEFAULT nextval('public.safety_incident_files_id_seq'::regclass);


--
-- Name: safety_incident_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.safety_incident_types ALTER COLUMN id SET DEFAULT nextval('public.safety_incident_types_id_seq'::regclass);


--
-- Name: safety_incidents id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.safety_incidents ALTER COLUMN id SET DEFAULT nextval('public.safety_incidents_id_seq'::regclass);


--
-- Name: scheduled_reports id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.scheduled_reports ALTER COLUMN id SET DEFAULT nextval('public.scheduled_reports_id_seq'::regclass);


--
-- Name: service_connections id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.service_connections ALTER COLUMN id SET DEFAULT nextval('public.service_connections_id_seq'::regclass);


--
-- Name: service_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.service_types ALTER COLUMN id SET DEFAULT nextval('public.service_types_id_seq'::regclass);


--
-- Name: settings id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.settings ALTER COLUMN id SET DEFAULT nextval('public.settings_id_seq'::regclass);


--
-- Name: shift_swaps id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.shift_swaps ALTER COLUMN id SET DEFAULT nextval('public.shift_swaps_id_seq'::regclass);


--
-- Name: shifts id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.shifts ALTER COLUMN id SET DEFAULT nextval('public.shifts_id_seq'::regclass);


--
-- Name: supervisor_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.supervisor_types ALTER COLUMN id SET DEFAULT nextval('public.supervisor_types_id_seq'::regclass);


--
-- Name: table_column_settings id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.table_column_settings ALTER COLUMN id SET DEFAULT nextval('public.table_column_settings_id_seq'::regclass);


--
-- Name: table_views id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.table_views ALTER COLUMN id SET DEFAULT nextval('public.table_views_id_seq'::regclass);


--
-- Name: tasks id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.tasks ALTER COLUMN id SET DEFAULT nextval('public.tasks_id_seq'::regclass);


--
-- Name: tax_core_request id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.tax_core_request ALTER COLUMN id SET DEFAULT nextval('public.tax_core_request_id_seq'::regclass);


--
-- Name: tax_core_response id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.tax_core_response ALTER COLUMN id SET DEFAULT nextval('public.tax_core_response_id_seq'::regclass);


--
-- Name: tax_ledger id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.tax_ledger ALTER COLUMN id SET DEFAULT nextval('public.tax_ledger_id_seq'::regclass);


--
-- Name: tenant_admins id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.tenant_admins ALTER COLUMN id SET DEFAULT nextval('public.tenant_admins_id_seq'::regclass);


--
-- Name: tenant_module_settings id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.tenant_module_settings ALTER COLUMN id SET DEFAULT nextval('public.tenant_module_settings_id_seq'::regclass);


--
-- Name: tenant_modules id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.tenant_modules ALTER COLUMN id SET DEFAULT nextval('public.tenant_modules_id_seq'::regclass);


--
-- Name: tenant_tables id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.tenant_tables ALTER COLUMN id SET DEFAULT nextval('public.tenant_tables_id_seq'::regclass);


--
-- Name: tenants id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.tenants ALTER COLUMN id SET DEFAULT nextval('public.tenants_id_seq'::regclass);


--
-- Name: timesheets id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.timesheets ALTER COLUMN id SET DEFAULT nextval('public.timesheets_id_seq'::regclass);


--
-- Name: training_answers id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_answers ALTER COLUMN id SET DEFAULT nextval('public.training_answers_id_seq'::regclass);


--
-- Name: training_badges id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_badges ALTER COLUMN id SET DEFAULT nextval('public.training_badges_id_seq'::regclass);


--
-- Name: training_bookmarks id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_bookmarks ALTER COLUMN id SET DEFAULT nextval('public.training_bookmarks_id_seq'::regclass);


--
-- Name: training_categories id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_categories ALTER COLUMN id SET DEFAULT nextval('public.training_categories_id_seq'::regclass);


--
-- Name: training_certificates id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_certificates ALTER COLUMN id SET DEFAULT nextval('public.training_certificates_id_seq'::regclass);


--
-- Name: training_contents id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_contents ALTER COLUMN id SET DEFAULT nextval('public.training_contents_id_seq'::regclass);


--
-- Name: training_courses id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_courses ALTER COLUMN id SET DEFAULT nextval('public.training_courses_id_seq'::regclass);


--
-- Name: training_enrollments id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_enrollments ALTER COLUMN id SET DEFAULT nextval('public.training_enrollments_id_seq'::regclass);


--
-- Name: training_feedback id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_feedback ALTER COLUMN id SET DEFAULT nextval('public.training_feedback_id_seq'::regclass);


--
-- Name: training_path_courses id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_path_courses ALTER COLUMN id SET DEFAULT nextval('public.training_path_courses_id_seq'::regclass);


--
-- Name: training_paths id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_paths ALTER COLUMN id SET DEFAULT nextval('public.training_paths_id_seq'::regclass);


--
-- Name: training_questions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_questions ALTER COLUMN id SET DEFAULT nextval('public.training_questions_id_seq'::regclass);


--
-- Name: training_quizzes id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_quizzes ALTER COLUMN id SET DEFAULT nextval('public.training_quizzes_id_seq'::regclass);


--
-- Name: training_results id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_results ALTER COLUMN id SET DEFAULT nextval('public.training_results_id_seq'::regclass);


--
-- Name: training_sessions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.training_sessions ALTER COLUMN id SET DEFAULT nextval('public.training_sessions_id_seq'::regclass);


--
-- Name: user_2fa id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.user_2fa ALTER COLUMN id SET DEFAULT nextval('public.user_2fa_id_seq'::regclass);


--
-- Name: user_board_settings id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.user_board_settings ALTER COLUMN id SET DEFAULT nextval('public.user_board_settings_id_seq'::regclass);


--
-- Name: user_passkeys id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.user_passkeys ALTER COLUMN id SET DEFAULT nextval('public.user_passkeys_id_seq'::regclass);


--
-- Name: user_settings id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.user_settings ALTER COLUMN id SET DEFAULT nextval('public.user_settings_id_seq'::regclass);


--
-- Name: user_tokens id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.user_tokens ALTER COLUMN id SET DEFAULT nextval('public.user_tokens_id_seq'::regclass);


--
-- Name: vehicle_makes id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.vehicle_makes ALTER COLUMN id SET DEFAULT nextval('public.vehicle_makes_id_seq'::regclass);


--
-- Name: vehicle_models id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.vehicle_models ALTER COLUMN id SET DEFAULT nextval('public.vehicle_models_id_seq'::regclass);


--
-- Name: vehicle_report_comments id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.vehicle_report_comments ALTER COLUMN id SET DEFAULT nextval('public.vehicle_report_comments_id_seq'::regclass);


--
-- Name: vehicle_report_parts id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.vehicle_report_parts ALTER COLUMN id SET DEFAULT nextval('public.vehicle_report_parts_id_seq'::regclass);


--
-- Name: vehicle_reports id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.vehicle_reports ALTER COLUMN id SET DEFAULT nextval('public.vehicle_reports_id_seq'::regclass);


--
-- Name: vehicle_services id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.vehicle_services ALTER COLUMN id SET DEFAULT nextval('public.vehicle_services_id_seq'::regclass);


--
-- Name: vehicle_trip_points id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.vehicle_trip_points ALTER COLUMN id SET DEFAULT nextval('public.vehicle_trip_points_id_seq'::regclass);


--
-- Name: vehicle_trips id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.vehicle_trips ALTER COLUMN id SET DEFAULT nextval('public.vehicle_trips_id_seq'::regclass);


--
-- Name: vehicle_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.vehicle_types ALTER COLUMN id SET DEFAULT nextval('public.vehicle_types_id_seq'::regclass);


--
-- Name: vehicles id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.vehicles ALTER COLUMN id SET DEFAULT nextval('public.vehicles_id_seq'::regclass);


--
-- Name: view_filters id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.view_filters ALTER COLUMN id SET DEFAULT nextval('public.view_filters_id_seq'::regclass);


--
-- Name: violation_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.violation_types ALTER COLUMN id SET DEFAULT nextval('public.violation_types_id_seq'::regclass);


--
-- Name: workcom_inspection_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workcom_inspection_types ALTER COLUMN id SET DEFAULT nextval('public.workcom_inspection_types_id_seq'::regclass);


--
-- Name: workcom_inspections id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workcom_inspections ALTER COLUMN id SET DEFAULT nextval('public.workcom_inspections_id_seq'::regclass);


--
-- Name: workflow_approvals id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workflow_approvals ALTER COLUMN id SET DEFAULT nextval('public.workflow_approvals_id_seq'::regclass);


--
-- Name: workflow_event_triggers id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workflow_event_triggers ALTER COLUMN id SET DEFAULT nextval('public.workflow_event_triggers_id_seq'::regclass);


--
-- Name: workflow_instances id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workflow_instances ALTER COLUMN id SET DEFAULT nextval('public.workflow_instances_id_seq'::regclass);


--
-- Name: workflow_states id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workflow_states ALTER COLUMN id SET DEFAULT nextval('public.workflow_states_id_seq'::regclass);


--
-- Name: workflow_step_types id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workflow_step_types ALTER COLUMN id SET DEFAULT nextval('public.workflow_step_types_id_seq'::regclass);


--
-- Name: workflow_steps id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workflow_steps ALTER COLUMN id SET DEFAULT nextval('public.workflow_steps_id_seq'::regclass);


--
-- Name: workflow_tasks id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workflow_tasks ALTER COLUMN id SET DEFAULT nextval('public.workflow_tasks_id_seq'::regclass);


--
-- Name: workflow_transitions id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workflow_transitions ALTER COLUMN id SET DEFAULT nextval('public.workflow_transitions_id_seq'::regclass);


--
-- Name: workflow_triggers id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workflow_triggers ALTER COLUMN id SET DEFAULT nextval('public.workflow_triggers_id_seq'::regclass);


--
-- Name: workflows id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workflows ALTER COLUMN id SET DEFAULT nextval('public.workflows_id_seq'::regclass);


--
-- Name: workplace_registrations id; Type: DEFAULT; Schema: public; Owner: taf
--

ALTER TABLE ONLY public.workplace_registrations ALTER COLUMN id SET DEFAULT nextval('public.workplace_registrations_id_seq'::regclass);


--
-- Data for Name: account_ai_feedback; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.account_ai_feedback (id, transaction_id, suggested_code, chosen_code, rationale, accepted, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: appeals; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.appeals (id, case_id, employee_id, reason, status, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: applications; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.applications (application_id, org_id, branch_id, open_position_id, first_name, last_name, email, phone, address, date_of_birth, application_date, status, notes, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: appraisal_templates; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.appraisal_templates (id, tenant_id, role_id, language_code, template_json, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: attendance; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.attendance (id, employee, date, restricted_start, restricted_end, hours_worked, overtime, injury_flag, restricted_duty, pay_code, approval_status, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: audit_logs; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.audit_logs (id, user_id, tenant_id, branch_id, action, entity, description, created_at, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: auth_events; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.auth_events (event_id, user_id, event_type, provider, ip, user_agent, metadata, created_at) FROM stdin;
\.


--
-- Data for Name: auto_orders; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.auto_orders (auto_order_id, product_id, minimum_stock_qty, order_qty, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: bank_detail_changes; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.bank_detail_changes (id, employee_id, bankname, accountname, accountnumber, status, approved_at, approved_by, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: branches; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.branches (branch_id, org_id, name, latitude, longitude, settings, isdeleted, updatedat) FROM stdin;
0199c6c4-8f64-7958-806f-3d360b5b1d30	0199b208-8943-7ca3-ba31-781efbe25058	Suva Headquarters	-18.13979600	178.42656300	{"radius_m": 10, "legacy_id": 1, "migrated_from": "taf_legacy.locations", "legacy_company_id": 1}	f	2025-10-09 02:19:54.594929+00
0199c6c4-8f65-70cc-9954-db9cd3cc2271	0199b208-8943-7ca3-ba31-781efbe25058	Sigatoka Office	-18.14580000	177.50650000	{"radius_m": 50, "legacy_id": 2, "migrated_from": "taf_legacy.locations", "legacy_company_id": 1}	f	2025-10-09 02:19:54.594929+00
0199c6c4-8f65-79cd-9ec8-f426e1011199	0199b208-8943-7ca3-ba31-781efbe25058	Suva Export	-18.12920000	178.42650000	{"radius_m": 50, "legacy_id": 3, "migrated_from": "taf_legacy.locations", "legacy_company_id": 1}	f	2025-10-09 02:19:54.594929+00
0199c6c4-8f65-7390-b137-133c6bd26f9f	0199b208-8943-7ca3-ba31-781efbe25058	Nadi Office	-17.75330000	177.44350000	{"radius_m": 50, "legacy_id": 4, "migrated_from": "taf_legacy.locations", "legacy_company_id": 1}	f	2025-10-09 02:19:54.594929+00
0199c6c4-8f65-7399-a42d-e8096e5ff1cd	0199b208-8943-7ca3-ba31-781efbe25058	Lautoka Office	-17.61670000	177.46670000	{"radius_m": 50, "legacy_id": 5, "migrated_from": "taf_legacy.locations", "legacy_company_id": 1}	f	2025-10-09 02:19:54.594929+00
0199c6c4-8f65-7807-80b6-e6e397d2f58d	0199b208-8943-7ca3-ba31-781efbe25058	Ba Office	-17.53410000	177.68380000	{"radius_m": 50, "legacy_id": 6, "migrated_from": "taf_legacy.locations", "legacy_company_id": 1}	f	2025-10-09 02:19:54.594929+00
0199c6c4-8f65-7e28-bcaa-6645c71290b2	0199b208-8943-7ca3-ba31-781efbe25058	Nausori Office	-18.02440000	178.54510000	{"radius_m": 50, "legacy_id": 7, "migrated_from": "taf_legacy.locations", "legacy_company_id": 1}	f	2025-10-09 02:19:54.594929+00
0199c6c4-8f65-735a-90f2-2f531d2b75bf	0199b208-8943-7ca3-ba31-781efbe25058	Labasa Office	-16.43020000	179.38220000	{"radius_m": 50, "legacy_id": 8, "migrated_from": "taf_legacy.locations", "legacy_company_id": 1}	f	2025-10-09 02:19:54.594929+00
0199c6c4-8f65-73df-b02b-debe65cd647f	0199b208-8943-7ca3-ba31-781efbe25058	Nausori Station	-18.02440000	178.54510000	{"radius_m": 50, "legacy_id": 9, "migrated_from": "taf_legacy.locations", "legacy_company_id": 1}	f	2025-10-09 02:19:54.594929+00
0199c6c4-8f65-78d2-899d-7e36b70a43ea	0199b208-8943-7ca3-ba31-781efbe25058	Savusavu	-16.77940000	179.33140000	{"radius_m": 50, "legacy_id": 10, "migrated_from": "taf_legacy.locations", "legacy_company_id": 1}	f	2025-10-09 02:19:54.594929+00
\.


--
-- Data for Name: budgets; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.budgets (budget_id, org_id, department, project, costcenter, accountcode, timeperiod, budgettype, category, budgetedamount, actualamount, isdeleted, updatedat) FROM stdin;
0199b318-c969-737f-97b0-7e30a775c000	\N	IT	Infrastructure Upgrade	CC-001	ACC-IT-001	Quarterly	Initial	Hardware	50000.00	36000.00	f	2025-10-05 06:39:30.153038+00
0199b318-c96b-74fe-b569-e210c5979138	\N	IT	Software Licensing	CC-001	ACC-IT-002	Annual	Initial	Software	25000.00	18300.00	f	2025-10-05 06:39:30.153038+00
0199b318-c96b-7bf2-af7b-b5966ee96438	\N	Operations	Facility Maintenance	CC-002	ACC-OPS-001	Monthly	Initial	Maintenance	8000.00	6850.00	f	2025-10-05 06:39:30.153038+00
0199b318-c96b-7c25-a748-e646b187d79e	\N	HR	Training and Development	CC-003	ACC-HR-001	Quarterly	Initial	Training	15000.00	9500.00	f	2025-10-05 06:39:30.153038+00
0199b318-c96b-7621-ac22-b32ef5ac7452	\N	Finance	Professional Services	CC-004	ACC-FIN-001	Quarterly	Initial	Consulting	12000.00	5000.00	f	2025-10-05 06:39:30.153038+00
0199b318-c96b-7606-b6ac-ef01d6c2069a	\N	Operations	Office Supplies	CC-002	ACC-OPS-002	Monthly	Initial	Supplies	3000.00	2850.00	f	2025-10-05 06:39:30.153038+00
0199b318-c96b-7908-854a-6a34f26f184e	\N	IT	Cloud Services	CC-001	ACC-IT-003	Monthly	Revised	Services	4000.00	3500.00	f	2025-10-05 06:39:30.153038+00
0199b318-c96b-7d18-a1b3-4c7882993ee5	\N	Marketing	Promotional Materials	CC-005	ACC-MKT-001	Quarterly	Initial	Marketing	6000.00	4200.00	f	2025-10-05 06:39:30.153038+00
0199b318-c96b-7e5e-9486-92babac2c3aa	\N	Operations	Vehicle Maintenance	CC-002	ACC-OPS-003	Quarterly	Initial	Fleet	18000.00	12350.00	f	2025-10-05 06:39:30.153038+00
0199b318-c96b-7e9e-a648-17bcb165ce69	\N	IT	Data Center Operations	CC-001	ACC-IT-004	Annual	Initial	Infrastructure	60000.00	34500.00	f	2025-10-05 06:39:30.153038+00
\.


--
-- Data for Name: calendar_accounts; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.calendar_accounts (id, user_id, provider, access_token, refresh_token, token_expires, created_at, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: calendar_availability; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.calendar_availability (id, user_id, start_time, end_time, type, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: calendar_categories; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.calendar_categories (id, name, description, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
1	WorkCOM Inspections	\N	\N	\N	f	2025-10-05 06:39:28.657175+00
2	OHS Inspections	\N	\N	\N	f	2025-10-05 06:39:28.657175+00
3	OHS Incidents	\N	\N	\N	f	2025-10-05 06:39:28.657175+00
4	Safety Incidents	\N	\N	\N	f	2025-10-05 06:39:28.657175+00
\.


--
-- Data for Name: calendar_event_documents; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.calendar_event_documents (id, event_id, document_id, uploaded_by, org_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: calendar_event_permissions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.calendar_event_permissions (id, event_id, user_id, role, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: calendar_events; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.calendar_events (id, title, description, provider, start_time, end_time, location, recurrence_rule, recurrence_end, parent_event_id, kanban_task_id, created_at, tenant_id, branch_id, category_id, isdeleted, updatedat) FROM stdin;
1	Schedule initial inspection	\N	\N	2025-07-01 00:00:00	\N	\N	\N	\N	\N	1	\N	\N	\N	1	f	2025-10-05 06:39:28.690307+00
2	Conduct site inspection	\N	\N	2025-07-10 00:00:00	\N	\N	\N	\N	\N	2	\N	\N	\N	1	f	2025-10-05 06:39:28.690307+00
3	Submit inspection report	\N	\N	2025-07-15 00:00:00	\N	\N	\N	\N	\N	3	\N	\N	\N	1	f	2025-10-05 06:39:28.690307+00
\.


--
-- Data for Name: career_paths; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.career_paths (id, tenant_id, role_id, name, description, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: career_steps; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.career_steps (id, path_id, step_number, title, role_id, requirements, tenant_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: case_evidence; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.case_evidence (id, case_id, file_path, description, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: case_instructions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.case_instructions (case_instruction_id, case_id, instruction_date, instruction, document_ids, created_by, created_at, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: case_notes; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.case_notes (id, matter_id, note, created_by, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: case_participants; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.case_participants (id, matter_id, person_id, role, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: case_tasks; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.case_tasks (id, matter_id, subject, due_date, assigned_to, status, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: cases; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.cases (case_id, client_id, case_number, title, status, opened_at, closed_at, lead_rep_id, description, initial_instructions, org_id, user_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: cash_sessions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.cash_sessions (id, cashier_id, opened_at, closed_at, opening_balance, closing_balance, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: certificate_templates; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.certificate_templates (id, name, file_path, tenant_id, isdeleted, updatedat) FROM stdin;
1	Basic Certificate	templates/certificates/basic.php	\N	f	2025-10-05 06:39:28.80261+00
\.


--
-- Data for Name: check_ins; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.check_ins (id, employee_id, manager_id, scheduled_at, completed_at, notes, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: clients; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.clients (client_id, user_id, name, phone, email, address, city, country, description, comments, org_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: companies; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.companies (id, country_id, name, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: competencies; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.competencies (id, name, description, updatedat, isdeleted) FROM stdin;
\.


--
-- Data for Name: competency_assessments; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.competency_assessments (id, employee_id, competency_id, assessor_id, rating, notes, assessment_date, updatedat, isdeleted) FROM stdin;
\.


--
-- Data for Name: contract_approvals; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.contract_approvals (id, document_id, step_order, approver_role, status, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: contract_versions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.contract_versions (id, contract_id, storage_key, version_number, version_hash, created_at, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: contracts; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.contracts (id, employee_id, contract_type, start_date, end_date, expiry_date, renewal_status, status, file_path, created_by, updated_by, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: corrective_actions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.corrective_actions (id, incident_id, name, description, steps, responsible_user_id, status, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: countries; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.countries (id, name, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: country_holidays; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.country_holidays (id, country_id, holiday_name, holiday_date, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: custom_field_values; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.custom_field_values (id, field_id, record_id, field_value, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: custom_fields; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.custom_fields (id, tenant_id, branch_id, model, field_name, field_type, is_required, options, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: customer_history; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.customer_history (id, customerid, action, description, performedby, performedat, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: customer_settings; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.customer_settings (id, customer_id, name, value, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: customers; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.customers (customer_id, customer_type, name, email, phone_number, address, tin, risk_rating, compliance_status, balance, org_id, user_id, isdeleted, updatedat) FROM stdin;
0199b318-bc48-7c5e-996a-80dcb7015105	Individual	John Doe	john.doe@example.com	+1234567890	123 Main St	TIN123	Low	Compliant	0.00	\N	\N	f	2025-10-05 06:39:26.791584+00
0199b318-bc48-7190-8403-b96e3b338c1f	Business	ABC Corp	contact@abc.com	+0987654321	456 Business Ave	TIN456	Medium	Compliant	0.00	\N	\N	f	2025-10-05 06:39:26.791584+00
0199b318-bc48-7ca9-954d-68a40b4720df	Individual	Jane Smith	jane.smith@example.com	+1122334455	789 Elm St	TIN789	Low	Compliant	0.00	\N	\N	f	2025-10-05 06:39:26.791584+00
0199b318-c8f8-727f-bbcd-045d676cb249	individual	John Smith	john.smith@email.com	+679 123 4567	123 Main Street, Suva, Fiji	123456789	low	compliant	0.00	0194a8b2-1234-7123-8123-123456789abc	\N	f	2025-10-05 06:39:30.04002+00
0199b318-c8f9-7681-97fa-277e4485e8bb	individual	Mary Johnson	mary.johnson@email.com	+679 234 5678	456 Queen Street, Suva, Fiji	234567890	low	compliant	0.00	0194a8b2-1234-7123-8123-123456789abc	\N	f	2025-10-05 06:39:30.04002+00
0199b318-c8f9-7717-a75a-07cee611e5f2	corporate	Pacific Traders Ltd	info@pacifictraders.com.fj	+679 345 6789	789 Kings Road, Suva, Fiji	345678901	medium	compliant	0.00	0194a8b2-1234-7123-8123-123456789abc	\N	f	2025-10-05 06:39:30.04002+00
0199b318-c8f9-7e98-8a53-8e16444f189d	corporate	Fiji Imports Ltd	sales@fijiimports.com.fj	+679 456 7890	321 Victoria Parade, Suva, Fiji	456789012	medium	compliant	0.00	0194a8b2-1234-7123-8123-123456789abc	\N	f	2025-10-05 06:39:30.04002+00
0199b318-c8f9-737f-a99b-927f9da91e07	individual	Raj Kumar	raj.kumar@email.com	+679 567 8901	654 Princes Road, Suva, Fiji	567890123	low	compliant	0.00	0194a8b2-1234-7123-8123-123456789abc	\N	f	2025-10-05 06:39:30.04002+00
0199b318-c8f9-7555-b471-35bb6e71fc8c	government	Ministry of Health	procurement@health.gov.fj	+679 678 9012	Government Buildings, Suva, Fiji	678901234	low	compliant	0.00	0194a8b2-1234-7123-8123-123456789abc	\N	f	2025-10-05 06:39:30.04002+00
0199b318-c8f9-70cc-abc1-5e55eb60ca69	corporate	Suva Supermarket Ltd	manager@suvamarket.com.fj	+679 789 0123	987 Waimanu Road, Suva, Fiji	789012345	medium	compliant	0.00	0194a8b2-1234-7123-8123-123456789abc	\N	f	2025-10-05 06:39:30.04002+00
0199b318-c8f9-768a-8f06-e5ae23871b27	individual	Lisa Wong	lisa.wong@email.com	+679 890 1234	147 Gordon Street, Suva, Fiji	890123456	low	compliant	0.00	0194a8b2-1234-7123-8123-123456789abc	\N	f	2025-10-05 06:39:30.04002+00
0199b318-c8f9-798b-a057-49f3e5595548	corporate	Island Hardware Ltd	orders@islandhardware.com.fj	+679 901 2345	258 Thomson Street, Suva, Fiji	901234567	medium	pending	0.00	0194a8b2-1234-7123-8123-123456789abc	\N	f	2025-10-05 06:39:30.04002+00
0199b318-c8f9-7f99-b962-a06846374de4	individual	David Prasad	david.prasad@email.com	+679 012 3456	369 Loftus Street, Suva, Fiji	012345678	low	compliant	0.00	0194a8b2-1234-7123-8123-123456789abc	\N	f	2025-10-05 06:39:30.04002+00
\.


--
-- Data for Name: dashboard_card_permissions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.dashboard_card_permissions (id, card_slug, group_id, user_id, tenant_id, branch_id, can_view, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: deduction_rates; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.deduction_rates (deduction_rate_id, deduction_type_id, start_salary, end_salary, rate, isdeleted, updatedat) FROM stdin;
0199b318-c951-773f-abfe-a112ca02dffc	0199b318-c94e-7793-aac2-b0e9ffdf5208	0.00	30000.00	0.0000	f	2025-10-05 06:39:30.129185+00
0199b318-c953-7aa9-a4ad-b5164fba3877	0199b318-c94e-7793-aac2-b0e9ffdf5208	30000.01	50000.00	0.1800	f	2025-10-05 06:39:30.129185+00
0199b318-c953-7f35-9cef-19727ded4688	0199b318-c94e-7793-aac2-b0e9ffdf5208	50000.01	270000.00	0.2000	f	2025-10-05 06:39:30.129185+00
0199b318-c953-7ebf-9998-7a0acc5dedc7	0199b318-c94e-7793-aac2-b0e9ffdf5208	270000.01	300000.00	0.2000	f	2025-10-05 06:39:30.129185+00
0199b318-c953-71ea-bb3b-f13ce75410bb	0199b318-c94e-7793-aac2-b0e9ffdf5208	300000.01	350000.00	0.2000	f	2025-10-05 06:39:30.129185+00
0199b318-c953-752f-aaee-ec13940483fb	0199b318-c94e-7793-aac2-b0e9ffdf5208	350000.01	400000.00	0.2000	f	2025-10-05 06:39:30.129185+00
0199b318-c953-7cd2-9aa0-01c1d0b53cb4	0199b318-c94e-7793-aac2-b0e9ffdf5208	400000.01	450000.00	0.2000	f	2025-10-05 06:39:30.129185+00
0199b318-c953-7bea-b758-eb3670195659	0199b318-c94e-7793-aac2-b0e9ffdf5208	450000.01	500000.00	0.2000	f	2025-10-05 06:39:30.129185+00
0199b318-c953-7e7b-9fd4-291d528c5dd3	0199b318-c94e-7793-aac2-b0e9ffdf5208	500000.01	1000000.00	0.2000	f	2025-10-05 06:39:30.129185+00
0199b318-c953-7bba-8ab3-956ec5df39a5	0199b318-c94e-7793-aac2-b0e9ffdf5208	1000000.01	99999999.99	0.2000	f	2025-10-05 06:39:30.129185+00
0199b318-c953-71ef-9047-8f5c26c48177	0199b318-c94f-74ab-bb82-4c81d175755a	0.00	99999999.99	0.0800	f	2025-10-05 06:39:30.129185+00
\.


--
-- Data for Name: deduction_types; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.deduction_types (deduction_type_id, name, org_id, isdeleted, updatedat) FROM stdin;
0199b318-c94e-7793-aac2-b0e9ffdf5208	Tax	0194a8b2-1234-7123-8123-123456789abc	f	2025-10-05 06:39:30.126444+00
0199b318-c94f-74ab-bb82-4c81d175755a	FNPF	0194a8b2-1234-7123-8123-123456789abc	f	2025-10-05 06:39:30.126444+00
\.


--
-- Data for Name: demo_graph_data; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.demo_graph_data (id, tenant_id, x_value, y_value, z_value, updatedat, isdeleted) FROM stdin;
\.


--
-- Data for Name: departments; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.departments (department_id, branch_id, name, description, isdeleted, updatedat) FROM stdin;
0199b318-c5a2-70b3-bce6-db54f5d41813	\N	Human Resources	\N	f	2025-10-05 06:39:29.184351+00
0199b318-c5a2-7ec6-8e4a-5ac5ddeebde0	\N	Finance	\N	f	2025-10-05 06:39:29.184351+00
0199b318-c5a2-7849-87cb-4508bfc74ada	\N	IT	\N	f	2025-10-05 06:39:29.184351+00
0199b318-c5a2-744e-a65d-dc1df39fa6ae	\N	Operations	\N	f	2025-10-05 06:39:29.184351+00
0199b318-c5a2-7b58-9008-5a6160e9a945	\N	Sales	\N	f	2025-10-05 06:39:29.184351+00
0199b318-c5a2-7399-94cb-59d12186fb82	\N	Marketing	\N	f	2025-10-05 06:39:29.184351+00
\.


--
-- Data for Name: detail_view_elements; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.detail_view_elements (id, detail_view_id, config, tenant_id, branch_id, order_index, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: detail_views; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.detail_views (id, name, config, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
2	Case Details	{"name": "Case Details", "rows": [{"classes": "card bg-base-100 shadow card-body grid grid-cols-4 gap-4", "columns": [{"classes": "card bg-base-100 shadow p-4 space-y-1", "elements": [{"tag": "h2", "text": "Client Information", "type": "heading", "classes": "card-title"}, {"type": "paragraph", "label": "Name", "classes": "grid grid-cols-2 gap-2", "data_column": "client.name", "label_classes": "font-semibold"}, {"type": "paragraph", "label": "Phone", "classes": "grid grid-cols-2 gap-2", "data_column": "client.phone", "label_classes": "font-semibold"}, {"type": "paragraph", "label": "Email", "classes": "grid grid-cols-2 gap-2", "data_column": "client.email", "label_classes": "font-semibold"}, {"type": "paragraph", "label": "Address", "classes": "grid grid-cols-2 gap-2", "data_column": "client.address", "label_classes": "font-semibold"}, {"type": "paragraph", "label": "City", "classes": "grid grid-cols-2 gap-2", "data_column": "client.city", "label_classes": "font-semibold"}, {"type": "paragraph", "label": "Country", "classes": "grid grid-cols-2 gap-2", "data_column": "client.country", "label_classes": "font-semibold"}, {"type": "paragraph", "label": "Description", "classes": "grid grid-cols-2 gap-2", "data_column": "client.description", "label_classes": "font-semibold"}]}, {"classes": "card bg-base-100 shadow p-4 space-y-1", "elements": [{"tag": "h2", "text": "Case Information", "type": "heading", "classes": "card-title"}, {"type": "paragraph", "label": "Title", "classes": "grid grid-cols-2 gap-2", "data_column": "title", "label_classes": "font-semibold"}, {"type": "paragraph", "label": "Case Number", "classes": "grid grid-cols-2 gap-2", "data_column": "case_number", "label_classes": "font-semibold"}, {"type": "paragraph", "label": "Status", "classes": "grid grid-cols-2 gap-2", "data_column": "status", "label_classes": "font-semibold"}, {"type": "paragraph", "label": "Lead Rep", "classes": "grid grid-cols-2 gap-2", "data_column": "lead_rep_name", "label_classes": "font-semibold"}, {"type": "paragraph", "label": "Opened", "classes": "grid grid-cols-2 gap-2", "data_column": "opened_at", "label_classes": "font-semibold"}, {"type": "paragraph", "label": "Closed", "classes": "grid grid-cols-2 gap-2", "data_column": "closed_at", "label_classes": "font-semibold"}]}, {"classes": "stats", "elements": [{"type": "div", "classes": "stat", "elements": [{"text": "Hours", "type": "div", "classes": "stat-title"}, {"type": "aggregate", "table": "time_entries", "column": "hours", "classes": "stat-value", "function": "sum", "filterField": "time_entry_id"}]}, {"type": "div", "classes": "stat", "elements": [{"text": "Expenses", "type": "div", "classes": "stat-title"}, {"type": "aggregate", "table": "expenses", "column": "amount", "classes": "stat-value", "function": "sum", "filterField": "case_id"}]}, {"type": "div", "classes": "stat", "elements": [{"text": "Total Hours", "type": "div", "classes": "stat-title"}, {"type": "aggregate", "table": "time_entries", "column": "hours", "classes": "stat-value", "function": "sum", "filterField": "time_entry_id"}]}, {"type": "div", "classes": "stat", "elements": [{"text": "Value", "type": "div", "classes": "stat-title"}, {"type": "aggregate", "table": "time_entries", "column": "total", "classes": "stat-value", "function": "sum", "filterField": "time_entry_id"}]}, {"type": "div", "classes": "stat", "elements": [{"text": "Billed Hours", "type": "div", "classes": "stat-title"}, {"type": "aggregate", "table": "time_entries", "column": "hours", "classes": "stat-value", "filters": {"billed_to_client": 1}, "function": "sum", "filterField": "time_entry_id"}]}, {"type": "div", "classes": "stat", "elements": [{"text": "Billed Amount", "type": "div", "classes": "stat-title"}, {"type": "aggregate", "table": "time_entries", "column": "total", "classes": "stat-value", "filters": {"billed_to_client": 1}, "function": "sum", "filterField": "time_entry_id"}]}]}, {"classes": "card bg-base-100 shadow p-4 space-y-1", "elements": [{"type": "paragraph", "label": "Initial Instructions", "data_column": "initial_instructions"}]}]}], "sources": [{"alias": "client", "table": "clients", "foreignKey": "client_id"}, {"table": "time_entries", "foreignKey": "time_entry_id"}]}	\N	\N	f	2025-10-05 06:39:28.795022+00
\.


--
-- Data for Name: disciplinary_actions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.disciplinary_actions (id, case_id, action, effective_date, approved_by, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: disciplinary_cases; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.disciplinary_cases (id, employee_id, violation_id, severity, summary, status, assigned_to, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: districts; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.districts (id, name, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
1	Central	\N	\N	f	2025-10-05 06:39:28.645892+00
2	Eastern	\N	\N	f	2025-10-05 06:39:28.645892+00
3	Northern	\N	\N	f	2025-10-05 06:39:28.645892+00
4	Western	\N	\N	f	2025-10-05 06:39:28.645892+00
\.


--
-- Data for Name: document_categories; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.document_categories (id, name, description, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
1	Training	\N	\N	\N	f	2025-10-05 06:39:28.736256+00
2	Compliance	\N	\N	\N	f	2025-10-05 06:39:28.736256+00
\.


--
-- Data for Name: document_comments; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.document_comments (document_comment_id, document_id, user_id, comment, updatedat) FROM stdin;
\.


--
-- Data for Name: document_folders; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.document_folders (id, parent_id, name, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
1	\N	Training	\N	\N	f	2025-10-05 06:39:28.722458+00
2	\N	Compliance	\N	\N	f	2025-10-05 06:39:28.722458+00
\.


--
-- Data for Name: document_metadata; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.document_metadata (document_metadata_id, document_version_id, document_id, metadata_key, metadata_value, value_type, searchable, indexed, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: document_permissions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.document_permissions (document_permission_id, document_id, user_id, can_view, can_edit, can_comment, org_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: document_tags; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.document_tags (document_tag_id, document_id, tag, parent_tag_id, tag_type, color, icon, sort_order, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: document_versions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.document_versions (document_version_id, file_path, document_id, storage_key, isarchived, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: documents; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.documents (document_id, parent_document_id, folder_id, category_id, org_id, title, description, language_code, owner_id, connector_id, type, expiry_date, isarchived, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: element_options; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.element_options (id, element_id, tenant_id, branch_id, display_text, value, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: element_types; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.element_types (id, tenant_id, branch_id, name, html_type, display_class, sql_type, isdeleted, updatedat) FROM stdin;
1	\N	\N	text	text	\N	VARCHAR(255)	f	2025-10-05 06:39:28.696654+00
2	\N	\N	number	number	\N	INT	f	2025-10-05 06:39:28.696654+00
3	\N	\N	date	date	\N	DATE	f	2025-10-05 06:39:28.696654+00
4	\N	\N	dropdown	select	\N	VARCHAR(255)	f	2025-10-05 06:39:28.696654+00
5	\N	\N	checkbox	checkbox	\N	BOOLEAN	f	2025-10-05 06:39:28.696654+00
6	\N	\N	checkbox-table	checkbox-table	\N	\N	f	2025-10-05 06:39:28.696654+00
7	\N	\N	input-table	input-table	\N	\N	f	2025-10-05 06:39:28.696654+00
8	\N	\N	textarea	textarea	\N	TEXT	f	2025-10-05 06:39:28.696654+00
9	\N	\N	file	file	\N	VARCHAR(255)	f	2025-10-05 06:39:28.696654+00
10	\N	\N	datetime	datetime-local	\N	TIMESTAMP	f	2025-10-05 06:39:28.696654+00
11	\N	\N	group	group	\N	\N	f	2025-10-05 06:39:28.696654+00
12	\N	\N	section	section	\N	\N	f	2025-10-05 06:39:28.696654+00
13	\N	\N	select-addable	select	\N	VARCHAR(255)	f	2025-10-05 06:39:28.696654+00
14	\N	\N	multiselect-search	multiselect	\N	VARCHAR(255)	f	2025-10-05 06:39:28.696654+00
15	\N	\N	email	email	\N	VARCHAR(255)	f	2025-10-05 06:39:28.696654+00
16	\N	\N	text-multiple	text-multiple	\N	VARCHAR(255)	f	2025-10-05 06:39:28.696654+00
17	\N	\N	hidden	hidden	\N	INT	f	2025-10-05 06:39:28.696654+00
18	\N	\N	rating	rating	\N	INT	f	2025-10-05 06:39:28.696654+00
19	\N	\N	button	button	\N	\N	f	2025-10-05 06:39:28.696654+00
20	\N	\N	gps	gps	\N	VARCHAR(255)	f	2025-10-05 06:39:28.696654+00
21	\N	\N	camera	camera	\N	VARCHAR(255)	f	2025-10-05 06:39:28.696654+00
22	\N	\N	dynamic-table	dynamic-table	\N	\N	f	2025-10-05 06:39:28.696654+00
23	\N	\N	select-search	select-search	\N	VARCHAR(255)	f	2025-10-05 06:39:28.696654+00
\.


--
-- Data for Name: employee_authorized_locations; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employee_authorized_locations (id, employee_id, location_id, start_date, end_date, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: employee_certificates; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employee_certificates (id, employee_id, cert_name, file_path, issued_date, expiry_date, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: employee_competencies; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employee_competencies (id, employee_id, competency_id, self_rating, manager_rating, updatedat, isdeleted) FROM stdin;
\.


--
-- Data for Name: employee_custom_fields; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employee_custom_fields (id, tenant_id, branch_id, field_name, field_type, is_required, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: employee_custom_values; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employee_custom_values (id, employee_id, field_id, field_value, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: employee_documents; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employee_documents (id, employee_id, doc_type, file_name, file_path, signed_at, uploaded_by, uploaded_at, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: employee_exits; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employee_exits (id, tenant_id, branch_id, employee_id, resignation_date, status, final_pay, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: employee_items; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employee_items (id, employee_id, item_name, is_ppe, expiry_date, assignee_user_id, assignee_group_id, assigned_at, due_date, completed_at, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: employee_location_changes; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employee_location_changes (id, employee_id, stations, action, effective_date, processed_at) FROM stdin;
\.


--
-- Data for Name: employee_shifts; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employee_shifts (id, employee_id, shift_id, shift_date, start_time, end_time, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: employee_types; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employee_types (id, type, default_items, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: employees2locations; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employees2locations (id, employee_id, location_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: employees2users; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.employees2users (id, employee_id, user_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: event_categories; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.event_categories (id, name, description, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: exit_approvals; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.exit_approvals (id, tenant_id, branch_id, exit_id, approver_id, level, status, approved_at, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: exit_clearances; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.exit_clearances (id, tenant_id, branch_id, exit_id, item, returned, access_revoked, notes, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: exit_feedback; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.exit_feedback (id, tenant_id, branch_id, exit_interview_id, question, response, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: exit_interviews; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.exit_interviews (id, tenant_id, branch_id, exit_id, interviewer_id, scheduled_at, completed_at, notes, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: expense_types; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.expense_types (id, name, description, tenant_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: expenses; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.expenses (expense_id, reference_table, reference_id, date, vendor_id, invoice_number, amount, description, status, comments, approved, billed_to_client, added_to_cost_schedule, billable, user_id, document_ids, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: feedback_notes; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.feedback_notes (id, from_user_id, to_user_id, request_id, note, sentiment_score, is_private, moderated, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: feedback_requests; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.feedback_requests (id, requestor_id, target_id, type, anonymous, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: field_definitions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.field_definitions (id, form_id, tenant_id, branch_id, label, field_name, field_type, options, is_required, order_index, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: final_settlements; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.final_settlements (id, tenant_id, branch_id, exit_id, outstanding_salary, unused_leave, deductions, net_amount, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: fishbone_diagrams; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.fishbone_diagrams (id, tenant_id, branch_id, problem, categories, diagram_data, isdeleted, updatedat) FROM stdin;
1	\N	\N	Low Water Pressure in Urban Areas	[{"name": "Infrastructure", "causes": ["Aging pipes", "Undersized mains", "Leaks in distribution lines"]}, {"name": "Demand Surge", "causes": ["Population growth", "Unauthorized connections"]}, {"name": "Maintenance", "causes": ["Infrequent valve flushing", "Inadequate pressure zoning"]}, {"name": "Energy Supply", "causes": ["Pump outages", "Fluctuating voltage"]}]	{"problem": "Low Water Pressure in Urban Areas", "categories": [{"name": "Infrastructure", "color": "#3366cc", "causes": [{"text": "Aging pipes", "color": "#333", "comment": "Over 30 years old"}, {"text": "Undersized mains", "color": "#333", "comment": "Can't handle peak flow"}, {"text": "Leaks in distribution lines", "color": "#333", "comment": "Common in zones 4, 6"}], "comment": "Focus on pipe upgrades"}, {"name": "Demand Surge", "color": "#ff9900", "causes": [{"text": "Population growth", "color": "#333"}, {"text": "Unauthorized connections", "color": "#cc0000", "comment": "Found in squatter areas"}], "comment": "Urban population growth outpacing planning"}, {"name": "Maintenance", "color": "#109618", "causes": [{"text": "Infrequent valve flushing", "color": "#333"}, {"text": "Inadequate pressure zoning", "color": "#333"}]}, {"name": "Energy Supply", "color": "#990099", "causes": [{"text": "Pump outages", "color": "#333"}, {"text": "Fluctuating voltage", "color": "#333"}]}]}	f	2025-10-05 06:39:28.875686+00
2	\N	\N	High Water Loss (Non-Revenue Water)	[{"name": "Metering", "causes": ["Inaccurate customer meters", "Missing bulk meters"]}, {"name": "Illegal Use", "causes": ["Bypassed meters", "Unauthorized hydrants"]}, {"name": "Pipeline Integrity", "causes": ["Undetected leaks", "Old pipe materials"]}, {"name": "Monitoring", "causes": ["Poor SCADA integration", "Infrequent audits"]}]	{"problem": "High Water Loss (Non-Revenue Water)", "categories": [{"name": "Metering", "color": "#1f77b4", "causes": [{"text": "Inaccurate customer meters", "comment": "Affects billing accuracy"}, {"text": "Missing bulk meters"}]}, {"name": "Illegal Use", "color": "#d62728", "causes": [{"text": "Bypassed meters"}, {"text": "Unauthorized hydrants"}]}, {"name": "Pipeline Integrity", "color": "#2ca02c", "causes": [{"text": "Undetected leaks", "comment": "Leak detection overdue"}, {"text": "Old pipe materials"}]}, {"name": "Monitoring", "color": "#ff7f0e", "causes": [{"text": "Poor SCADA integration"}, {"text": "Infrequent audits"}]}]}	f	2025-10-05 06:39:28.875686+00
3	\N	\N	Delayed Response to Water Complaints	[{"name": "Customer Service", "causes": ["Long call wait times", "Poor ticket routing"]}, {"name": "Field Operations", "causes": ["Limited repair crews", "Incomplete work logs"]}, {"name": "Communication", "causes": ["No SMS alerts", "Delayed internal escalation"]}, {"name": "Technology", "causes": ["Outdated ticketing system", "No real-time dashboard"]}]	{"problem": "Delayed Response to Water Complaints", "categories": [{"name": "Customer Service", "color": "#8c564b", "causes": [{"text": "Long call wait times"}, {"text": "Poor ticket routing"}]}, {"name": "Field Operations", "color": "#e377c2", "causes": [{"text": "Limited repair crews"}, {"text": "Incomplete work logs"}]}, {"name": "Communication", "color": "#7f7f7f", "causes": [{"text": "No SMS alerts"}, {"text": "Delayed internal escalation"}]}, {"name": "Technology", "color": "#bcbd22", "causes": [{"text": "Outdated ticketing system"}, {"text": "No real-time dashboard"}]}]}	f	2025-10-05 06:39:28.875686+00
\.


--
-- Data for Name: form_buttons; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.form_buttons (id, form_id, label, action_type, action_payload, order_index, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
1	96	Open Form	open-form	{"lookupTable":"ohs_inspection_types","lookupField":"inspection_type_id","valueColumn":"id","formColumn":"form_id","prefillFields":["inspection_type_id","location"]}	1	\N	\N	f	2025-10-05 06:39:28.732894+00
2	51	Approve	workflow	\N	1	\N	\N	f	2025-10-05 06:39:28.740695+00
3	51	Reject	workflow	\N	2	\N	\N	f	2025-10-05 06:39:28.740695+00
4	59	Open Form	open-form	{"lookupTable":"ohs_incident_types","lookupField":"classification","valueColumn":"name","formColumn":"form_id","prefillFields":["classification","location","severity"]}	1	\N	\N	f	2025-10-05 06:39:28.742687+00
5	107	Open Form	open-form	{"lookupTable":"safety_incident_types","lookupField":"incident_type","valueColumn":"id","formColumn":"form_id","prefillFields":["incident_type","location"]}	1	\N	\N	f	2025-10-05 06:39:29.031856+00
6	75	Open Form	open-form	{"lookupTable":"risk_assessment_types","lookupField":"risk_assessment_type_id","valueColumn":"id","formColumn":"form_id","prefillFields":["risk_assessment_type_id","location"]}	1	\N	\N	f	2025-10-05 06:39:29.043263+00
7	103	Open Form	open-form	{"lookupTable":"workcom_inspection_types","lookupField":"workcom_inspection_type_id","valueColumn":"id","formColumn":"form_id","prefillFields":["workcom_inspection_type_id","workplace_id","inspection_request_id"]}	1	\N	\N	f	2025-10-05 06:39:29.095932+00
\.


--
-- Data for Name: form_categories; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.form_categories (id, name, description, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
1	OHS Incident Forms	Incident reporting forms	\N	\N	f	2025-10-05 06:39:28.910374+00
\.


--
-- Data for Name: form_certificates; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.form_certificates (id, form_id, submission_id, template_id, status, issued_at, expiry_date, file_path, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: form_definitions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.form_definitions (id, tenant_id, branch_id, base_form_id, name, description, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: form_submission_reviews; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.form_submission_reviews (id, submission_id, reviewer_id, review_date, status, notes, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: form_submission_values; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.form_submission_values (id, submission_id, element_id, tenant_id, branch_id, value, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: form_submissions; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.form_submissions (id, form_id, tenant_id, branch_id, submitted_by, submitted_at, isdeleted, updatedat) FROM stdin;
\.


--
-- Data for Name: form_wizard_steps; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.form_wizard_steps (id, wizard_id, step_number, form_id, condition_field, condition_value, isdeleted, updatedat) FROM stdin;
1	1	1	59	\N	\N	f	2025-10-05 06:39:28.866076+00
2	1	2	13	classification	Property Damage	f	2025-10-05 06:39:28.866076+00
3	1	3	14	classification	Environmental	f	2025-10-05 06:39:28.866076+00
4	1	4	15	classification	Near Miss	f	2025-10-05 06:39:28.866076+00
5	1	5	16	classification	First Aid	f	2025-10-05 06:39:28.866076+00
6	1	6	17	classification	Medical Treatment	f	2025-10-05 06:39:28.866076+00
7	1	7	18	classification	LTI	f	2025-10-05 06:39:28.866076+00
8	1	8	19	classification	Fatality	f	2025-10-05 06:39:28.866076+00
9	1	9	105	classification	Field Incident	f	2025-10-05 06:39:28.866076+00
10	6	1	107	\N	\N	f	2025-10-05 06:39:28.870984+00
11	3	1	96	\N	\N	f	2025-10-05 06:39:28.890408+00
12	5	1	103	\N	\N	f	2025-10-05 06:39:28.892315+00
13	4	1	75	\N	\N	f	2025-10-05 06:39:29.052429+00
14	7	1	110	\N	\N	f	2025-10-05 06:39:29.318325+00
15	7	2	610	\N	\N	f	2025-10-05 06:39:29.318325+00
16	7	3	611	\N	\N	f	2025-10-05 06:39:29.318325+00
17	7	4	613	\N	\N	f	2025-10-05 06:39:29.318325+00
18	7	5	614	\N	\N	f	2025-10-05 06:39:29.318325+00
\.


--
-- Data for Name: form_wizards; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.form_wizards (id, name, description, tenant_id, branch_id, isdeleted, updatedat) FROM stdin;
1	OHS Incident Wizard	Guided incident reporting	\N	\N	f	2025-10-05 06:39:28.856752+00
3	OHS Inspection Wizard	Guided inspection entry	\N	\N	f	2025-10-05 06:39:28.861222+00
5	WorkCOM Inspection Wizard	Guided WorkCOM inspection entry	\N	\N	f	2025-10-05 06:39:28.862955+00
6	Safety Incident Wizard	Guided safety incident entry	\N	\N	f	2025-10-05 06:39:28.864503+00
4	Risk Assessment Wizard	Guided risk assessment entry	\N	\N	f	2025-10-05 06:39:29.050722+00
7	Vendor Onboarding Wizard	Public vendor onboarding wizard sequencing vendor, contact, address and documents	\N	\N	f	2025-10-05 06:39:29.318325+00
\.


--
-- Data for Name: forms; Type: TABLE DATA; Schema: public; Owner: taf
--

COPY public.forms (id, tenant_id, branch_id, category_id, name, description, mapped_table, on_submit_workflow_id, columns, layout_type, elements, share_scope, share_slug, share_enabled, share_published_at, isdeleted, updatedat) FROM stdin;
100	\N	\N	\N	Workplace Safety Inspection Checklist	Checklist for routine workplace safety inspections	ohs_inspections	\N	1	grid	[{"label": "workplace_id", "type_id": 4, "field_name": "workplace_id", "data_column": "workplace_id", "order_index": 1, "options_table": "workplace_registrations", "options_label_column": "company_name", "options_value_column": "id"}, {"label": "inspection_id", "type_id": 16, "field_name": "inspection_id", "data_column": "inspection_id", "order_index": 2}, {"label": "Emergency Exits Clear", "type_id": 5, "field_name": "emergency_exits", "json_column": "form_data", "order_index": 3}, {"label": "Fire Extinguishers Serviced", "type_id": 5, "field_name": "fire_extinguishers", "json_column": "form_data", "order_index": 4}, {"label": "Walkways Clear", "type_id": 5, "field_name": "walkways_clear", "json_column": "form_data", "order_index": 5}]	none	\N	f	\N	f	2025-10-05 06:39:28.306264+00
108	\N	\N	\N	Occupational Health Services Audit Form	Audit of occupational health services and programs	ohs_inspections	\N	1	grid	[{"label": "workplace_id", "type_id": 4, "field_name": "workplace_id", "data_column": "workplace_id", "order_index": 1, "options_table": "workplace_registrations", "options_label_column": "company_name", "options_value_column": "id"}, {"label": "inspection_id", "type_id": 16, "field_name": "inspection_id", "data_column": "inspection_id", "order_index": 2}, {"label": "Wellness Programs Available", "type_id": 5, "field_name": "wellness_programs", "json_column": "form_data", "order_index": 3}, {"label": "First Aid Kits Stocked", "type_id": 5, "field_name": "first_aid_kits", "json_column": "form_data", "order_index": 4}, {"label": "PPE Provided", "type_id": 5, "field_name": "ppe_provided", "json_column": "form_data", "order_index": 5}, {"label": "Training Records Up To Date", "type_id": 5, "field_name": "training_records", "json_column": "form_data", "order_index": 6}]	none	\N	f	\N	f	2025-10-05 06:39:28.306264+00
102	\N	\N	\N	Compliance Certificate Verification Checklist	Verification of workplace compliance certificates	ohs_inspections	\N	1	grid	[{"label": "workplace_id", "type_id": 4, "field_name": "workplace_id", "data_column": "workplace_id", "order_index": 1, "options_table": "workplace_registrations", "options_label_column": "company_name", "options_value_column": "id"}, {"label": "inspection_id", "type_id": 16, "field_name": "inspection_id", "data_column": "inspection_id", "order_index": 2}, {"label": "Certificate Valid", "type_id": 5, "field_name": "certificate_valid", "json_column": "form_data", "order_index": 3}, {"label": "Permit Displayed", "type_id": 5, "field_name": "permit_displayed", "json_column": "form_data", "order_index": 4}, {"label": "Insurance Current", "type_id": 5, "field_name": "insurance_current", "json_column": "form_data", "order_index": 5}]	none	\N	f	\N	f	2025-10-05 06:39:28.306264+00
1	\N	\N	\N	Leave Application	Form to apply for leave	leave_requests	\N	1	grid	[{"label": "Leave Type", "options": [{"label": "Annual Leave", "value": "Annual"}, {"label": "Sick Leave", "value": "Sick"}, {"label": "Personal Leave", "value": "Personal"}], "type_id": 4, "required": true, "field_name": "leavetype", "default_value": "Annual"}, {"label": "Start Date", "type_id": 3, "required": true, "field_name": "startdate"}, {"label": "End Date", "type_id": 3, "required": true, "field_name": "enddate"}, {"label": "Reason", "type_id": 8, "required": true, "field_name": "reason"}]	none	\N	f	\N	f	2025-10-05 06:39:28.701686+00
91	\N	\N	\N	General OHS Site Inspection	Routine safety inspection of work areas, signage, and emergency readiness	ohs_inspections	\N	1	grid	[{"type_id": 1, "field_name": "inspection_type_id", "data_column": "inspection_type_id", "order_index": 0}, {"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Inspection Date", "type_id": 3, "field_name": "inspection_date", "data_column": "date", "order_index": 1}, {"label": "Site Name", "type_id": 1, "field_name": "site_name", "data_column": "location", "order_index": 2}, {"label": "Inspector Comments", "type_id": 7, "field_name": "comments", "json_column": "form_data", "order_index": 3}, {"label": "Emergency Exits Clear", "type_id": 5, "field_name": "emergency_exits", "json_column": "form_data", "order_index": 4}, {"label": "Safety Signage Present", "type_id": 5, "field_name": "signage", "json_column": "form_data", "order_index": 5}, {"label": "General Comments", "type_id": 7, "field_name": "general_comments", "json_column": "form_data", "order_index": 6}]	none	\N	f	\N	f	2025-10-05 06:39:28.724497+00
92	\N	\N	\N	Plant & Equipment OHS Inspection	Inspection of machinery, maintenance records, guards, and operating safety	ohs_inspections	\N	1	grid	[{"type_id": 1, "field_name": "inspection_type_id", "data_column": "inspection_type_id", "order_index": 0}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 1}, {"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Equipment Name", "type_id": 1, "field_name": "equipment", "json_column": "form_data", "order_index": 1}, {"label": "Inspection Date", "type_id": 3, "field_name": "inspection_date", "data_column": "date", "order_index": 2}, {"label": "Last Maintenance Date", "type_id": 3, "field_name": "maintenance_date", "data_column": "date", "order_index": 3}, {"label": "Guards in Place", "type_id": 5, "field_name": "guards", "json_column": "form_data", "order_index": 4}, {"label": "Emergency Stop Working", "type_id": 5, "field_name": "emergency_stop", "json_column": "form_data", "order_index": 5}, {"label": "Operator Safety Training Verified", "type_id": 5, "field_name": "training", "json_column": "form_data", "order_index": 6}, {"label": "Remarks", "type_id": 7, "field_name": "remarks", "json_column": "form_data", "order_index": 7}]	none	\N	f	\N	f	2025-10-05 06:39:28.725647+00
15	\N	\N	1	OHS Incident – Near Miss	Report near-miss incidents	ohs_incidents	\N	1	grid	[{"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Date", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 1}, {"label": "Time", "type_id": 1, "field_name": "time", "data_column": "time", "order_index": 2}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Description of Near Miss", "type_id": 1, "field_name": "description", "json_column": "form_data", "order_index": 4}, {"label": "Hazard Identified", "type_id": 1, "field_name": "hazard_identified", "json_column": "form_data", "order_index": 5}, {"label": "Potential Consequence", "type_id": 1, "field_name": "potential_consequence", "json_column": "form_data", "order_index": 6}, {"label": "Immediate Action", "type_id": 1, "field_name": "immediate_action", "json_column": "form_data", "order_index": 7}, {"label": "Status", "type_id": 4, "field_name": "status", "json_column": "form_data", "order_index": 8, "options_table": "ohs_incident_statuses", "options_label_column": "name", "options_value_column": "id"}, {"label": "Investigator", "type_id": 4, "field_name": "investigator_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Investigators\\"]}}", "data_column": "investigator_id", "order_index": 9, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Reviewer", "type_id": 4, "field_name": "reviewer_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Reviewers\\"]}}", "data_column": "reviewer_id", "order_index": 10, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Classification", "type_id": 16, "field_name": "classification", "data_column": "classification", "order_index": 11}]	none	\N	f	\N	f	2025-10-05 06:39:28.917755+00
93	\N	\N	\N	Confined Space Entry Inspection	Inspection checklist before confined space entry at tanks or manholes	ohs_inspections	\N	1	grid	[{"type_id": 1, "field_name": "inspection_type_id", "data_column": "inspection_type_id", "order_index": 0}, {"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Inspection Date", "type_id": 3, "field_name": "inspection_date", "data_column": "date", "order_index": 1}, {"label": "Gas Test Conducted", "type_id": 5, "field_name": "gas_test", "json_column": "form_data", "order_index": 2}, {"label": "Ventilation Set Up", "type_id": 5, "field_name": "ventilation", "json_column": "form_data", "order_index": 3}, {"label": "Permit to Work Issued", "type_id": 5, "field_name": "ptw", "json_column": "form_data", "order_index": 4}, {"label": "Rescue Equipment Available", "type_id": 5, "field_name": "rescue", "json_column": "form_data", "order_index": 5}, {"label": "Remarks", "type_id": 7, "field_name": "remarks", "json_column": "form_data", "order_index": 6}]	none	\N	f	\N	f	2025-10-05 06:39:28.726846+00
94	\N	\N	\N	Field Work Safety Inspection	On-site inspection checklist for pipe repair, excavation, or rural works	ohs_inspections	\N	1	grid	[{"type_id": 1, "field_name": "inspection_type_id", "data_column": "inspection_type_id", "order_index": 0}, {"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Inspection Date", "type_id": 3, "field_name": "inspection_date", "data_column": "date", "order_index": 1}, {"label": "Traffic Management In Place", "type_id": 5, "field_name": "traffic_control", "json_column": "form_data", "order_index": 2}, {"label": "Tools in Good Condition", "type_id": 5, "field_name": "tools", "json_column": "form_data", "order_index": 3}, {"label": "First Aid Kit Available", "type_id": 5, "field_name": "first_aid", "json_column": "form_data", "order_index": 4}, {"label": "Team Briefing Conducted", "type_id": 5, "field_name": "briefing", "json_column": "form_data", "order_index": 5}, {"label": "Inspector Notes", "type_id": 7, "field_name": "notes", "json_column": "form_data", "order_index": 6}]	none	\N	f	\N	f	2025-10-05 06:39:28.728618+00
95	\N	\N	\N	OHS Vehicle Inspection	Safety checklist for operational and pool vehicles used by staff	ohs_inspections	\N	1	grid	[{"type_id": 1, "field_name": "inspection_type_id", "data_column": "inspection_type_id", "order_index": 0}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 1}, {"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Inspection Date", "type_id": 3, "field_name": "inspection_date", "data_column": "date", "order_index": 1}, {"label": "Vehicle Number", "type_id": 1, "field_name": "vehicle_no", "json_column": "form_data", "order_index": 2}, {"label": "Brakes Functional", "type_id": 5, "field_name": "brakes", "json_column": "form_data", "order_index": 3}, {"label": "Headlights & Signals", "type_id": 5, "field_name": "lights", "json_column": "form_data", "order_index": 4}, {"label": "Seat Belts Working", "type_id": 5, "field_name": "seat_belts", "json_column": "form_data", "order_index": 5}, {"label": "Fire Extinguisher Present", "type_id": 5, "field_name": "extinguisher", "json_column": "form_data", "order_index": 6}, {"label": "Inspector Comments", "type_id": 7, "field_name": "comments", "json_column": "form_data", "order_index": 7}]	none	\N	f	\N	f	2025-10-05 06:39:28.729998+00
96	\N	\N	\N	OHS Inspection Start	Choose inspection type and location	ohs_inspections	\N	1	grid	[{"label": "Inspection Type", "type_id": 4, "field_name": "inspection_type_id", "data_column": "inspection_type_id", "order_index": 1, "options_table": "ohs_inspection_types", "options_label_column": "name", "options_value_column": "id"}, {"label": "Location", "type_id": 4, "field_name": "location", "data_column": "location", "order_index": 2, "options_table": "locations", "options_label_column": "name", "options_value_column": "name"}]	none	\N	f	\N	f	2025-10-05 06:39:28.731205+00
4	\N	\N	\N	OHS Incident	Default incident report form	ohs_incidents	\N	1	grid	[{"label": "Date", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 1}, {"label": "Time", "type_id": 1, "field_name": "time", "data_column": "time", "order_index": 2}, {"label": "Classification", "type_id": 4, "field_name": "classification", "data_column": "classification", "order_index": 3}, {"label": "Nature", "type_id": 1, "field_name": "nature", "data_column": "nature", "order_index": 4}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 5}, {"label": "Status", "type_id": 4, "field_name": "status", "data_column": "status_id", "order_index": 6, "options_table": "ohs_incident_statuses", "options_label_column": "name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:28.894124+00
6	\N	\N	\N	Job Safety Analysis	Record JSA details	ohs_jsas	\N	1	grid	[{"label": "Title", "type_id": 1, "field_name": "title", "data_column": "title", "order_index": 1}, {"label": "Description", "type_id": 1, "field_name": "description", "data_column": "description", "order_index": 2}, {"label": "Doc Path", "type_id": 7, "field_name": "doc_path", "data_column": "doc_path", "order_index": 3}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 4}, {"label": "Department Id", "type_id": 2, "field_name": "department_id", "data_column": "department_id", "order_index": 5}, {"label": "Analysis Date", "type_id": 3, "field_name": "analysis_date", "data_column": "analysis_date", "order_index": 6}, {"label": "Prepared By", "type_id": 2, "field_name": "prepared_by", "data_column": "prepared_by", "order_index": 7}, {"label": "Team Member Ids", "type_id": 7, "field_name": "team_member_ids", "data_column": "team_member_ids", "order_index": 8}, {"label": "Ppe Required", "type_id": 7, "field_name": "ppe_required", "data_column": "ppe_required", "order_index": 9}, {"label": "Permit Requirements", "type_id": 7, "field_name": "permit_requirements", "data_column": "permit_requirements", "order_index": 10}, {"label": "Review Date", "type_id": 3, "field_name": "review_date", "data_column": "review_date", "order_index": 11}]	none	\N	f	\N	f	2025-10-05 06:39:28.89627+00
56	\N	\N	\N	Hazard Type	Manage hazard classifications	ohs_hazard_types	\N	1	grid	[]	none	\N	f	\N	f	2025-10-05 06:39:28.99686+00
7	\N	\N	\N	OHS Hazard	Default hazard report form	ohs_hazards	\N	1	grid	[{"label": "Description", "type_id": 1, "field_name": "description", "data_column": "description", "order_index": 1}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 2}, {"label": "Probability", "options": [{"value": "1", "display_text": "1"}, {"value": "2", "display_text": "2"}, {"value": "3", "display_text": "3"}, {"value": "4", "display_text": "4"}, {"value": "5", "display_text": "5"}], "type_id": 4, "field_name": "probability", "data_column": "probability", "order_index": 4}, {"label": "Severity", "options": [{"value": "1", "display_text": "1"}, {"value": "2", "display_text": "2"}, {"value": "3", "display_text": "3"}, {"value": "4", "display_text": "4"}, {"value": "5", "display_text": "5"}], "type_id": 4, "field_name": "severity", "data_column": "severity", "order_index": 5}, {"label": "Risk Level", "type_id": 2, "field_name": "risk_level", "data_column": "risk_level", "order_index": 6}, {"label": "Latitude", "type_id": 2, "field_name": "latitude", "data_column": "latitude", "order_index": 7}, {"label": "Longitude", "type_id": 2, "field_name": "longitude", "data_column": "longitude", "order_index": 8}, {"label": "Hazard Type", "type_id": 4, "field_name": "hazard_type_id", "data_column": "hazard_type_id", "order_index": 3, "options_table": "ohs_hazard_types", "options_label_column": "name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:28.898452+00
8	\N	\N	\N	SCORM Package	Upload SCORM content	 NULL	\N	1	grid	[{"label": "Course Id", "type_id": 2, "field_name": "course_id", "data_column": "course_id", "order_index": 1}, {"label": "Title", "type_id": 1, "field_name": "title", "data_column": "title", "order_index": 2}, {"label": "Scorm Zip", "type_id": 7, "field_name": "scorm_zip", "data_column": "scorm_zip", "order_index": 3}, {"label": "Is Scorm", "type_id": 5, "field_name": "is_scorm", "data_column": "is_scorm", "order_index": 4}, {"label": "Caption", "type_id": 7, "field_name": "caption", "data_column": "caption", "order_index": 5}, {"label": "Language Code", "type_id": 1, "field_name": "language_code", "data_column": "language_code", "order_index": 6}]	none	\N	f	\N	f	2025-10-05 06:39:28.900591+00
9	\N	\N	\N	Training Path	Create a learning path	 NULL	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Description", "type_id": 1, "field_name": "description", "data_column": "description", "order_index": 2}, {"label": "Department Id", "type_id": 2, "field_name": "department_id", "data_column": "department_id", "order_index": 3}, {"label": "Role Id", "type_id": 2, "field_name": "role_id", "data_column": "role_id", "order_index": 4}]	none	\N	f	\N	f	2025-10-05 06:39:28.902622+00
10	\N	\N	\N	Safety Induction	Record employee safety inductions	 NULL	\N	1	grid	[{"label": "Employee Id", "type_id": 2, "field_name": "employee_id", "data_column": "employee_id", "order_index": 1}, {"label": "Induction Date", "type_id": 3, "field_name": "induction_date", "data_column": "induction_date", "order_index": 2}, {"label": "Document Id", "type_id": 7, "field_name": "document_id", "data_column": "document_id", "order_index": 3}]	none	\N	f	\N	f	2025-10-05 06:39:28.904508+00
11	\N	\N	\N	Employee License	Track employee licenses	 NULL	\N	1	grid	[{"label": "Employee Id", "type_id": 2, "field_name": "employee_id", "data_column": "employee_id", "order_index": 1}, {"label": "License Type", "type_id": 1, "field_name": "license_type", "data_column": "license_type", "order_index": 2}, {"label": "License Number", "type_id": 1, "field_name": "license_number", "data_column": "license_number", "order_index": 3}, {"label": "Expiry Date", "type_id": 3, "field_name": "expiry_date", "data_column": "expiry_date", "order_index": 4}, {"label": "Document Id", "type_id": 7, "field_name": "document_id", "data_column": "document_id", "order_index": 5}]	none	\N	f	\N	f	2025-10-05 06:39:28.906411+00
12	\N	\N	\N	Training Requirement	Assign mandatory courses per project	 NULL	\N	1	grid	[{"label": "Project Id", "type_id": 2, "field_name": "project_id", "data_column": "project_id", "order_index": 1}, {"label": "Role Id", "type_id": 2, "field_name": "role_id", "data_column": "role_id", "order_index": 2}, {"label": "Location Id", "type_id": 2, "field_name": "location_id", "data_column": "location_id", "order_index": 3}, {"label": "Course Id", "type_id": 2, "field_name": "course_id", "data_column": "course_id", "order_index": 4}]	none	\N	f	\N	f	2025-10-05 06:39:28.908393+00
13	\N	\N	1	OHS Incident – Property Damage	Report property damage incidents	ohs_incidents	\N	1	grid	[{"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Date of Damage", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 1}, {"label": "Time of Damage", "type_id": 1, "field_name": "time", "data_column": "time", "order_index": 2}, {"label": "Location", "type_id": 17, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Asset Affected", "type_id": 1, "field_name": "asset_affected", "json_column": "form_data", "order_index": 4}, {"label": "Damage Description", "type_id": 1, "field_name": "damage_description", "json_column": "form_data", "order_index": 5}, {"label": "Estimated Cost", "type_id": 2, "field_name": "estimated_cost", "json_column": "form_data", "order_index": 6}, {"label": "Immediate Action", "type_id": 1, "field_name": "immediate_action", "json_column": "form_data", "order_index": 7}, {"label": "Severity", "type_id": 17, "field_name": "severity", "data_column": "severity", "order_index": 12}, {"label": "Responsible Person", "type_id": 1, "field_name": "responsible_person", "json_column": "form_data", "order_index": 8}, {"label": "Status", "type_id": 4, "field_name": "status", "json_column": "form_data", "order_index": 9, "options_table": "ohs_incident_statuses", "options_label_column": "name", "options_value_column": "id"}, {"label": "Investigator", "type_id": 17, "field_name": "investigator_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Investigators\\"]}}", "data_column": "investigator_id", "order_index": 10, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Reviewer", "type_id": 17, "field_name": "reviewer_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Reviewers\\"]}}", "data_column": "reviewer_id", "order_index": 11, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Classification", "type_id": 17, "field_name": "classification", "data_column": "classification", "order_index": 12}]	none	\N	f	\N	f	2025-10-05 06:39:28.91312+00
14	\N	\N	1	OHS Incident – Environmental	Report environmental incidents (spills, emissions, etc.)	ohs_incidents	\N	1	grid	[{"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Date", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 1}, {"label": "Time", "type_id": 1, "field_name": "time", "data_column": "time", "order_index": 2}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Type of Incident", "type_id": 1, "field_name": "env_incident_type", "data_column": "env_incident_type", "order_index": 4}, {"label": "Impact Description", "type_id": 1, "field_name": "impact_description", "data_column": "impact_description", "order_index": 5}, {"label": "Area Affected", "type_id": 1, "field_name": "area_affected", "data_column": "area_affected", "order_index": 6}, {"label": "Volume/Quantity", "type_id": 2, "field_name": "volume", "data_column": "volume", "order_index": 7}, {"label": "Remediation Action", "type_id": 1, "field_name": "remediation_action", "data_column": "remediation_action", "order_index": 8}, {"label": "Status", "type_id": 4, "field_name": "status_id", "data_column": "status_id", "order_index": 9, "options_table": "ohs_incident_statuses", "options_label_column": "name", "options_value_column": "id"}, {"label": "Investigator", "type_id": 4, "field_name": "investigator_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Investigators\\"]}}", "data_column": "investigator_id", "order_index": 10, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Reviewer", "type_id": 4, "field_name": "reviewer_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Reviewers\\"]}}", "data_column": "reviewer_id", "order_index": 11, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Classification", "type_id": 16, "field_name": "classification", "data_column": "classification", "order_index": 12}]	none	\N	f	\N	f	2025-10-05 06:39:28.915518+00
57	\N	\N	\N	Incident Type	Manage incident categories	ohs_incident_types	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Form Id", "type_id": 4, "field_name": "form_id", "data_column": "form_id", "order_index": 2, "options_table": "forms", "options_label_column": "name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:28.999357+00
84	\N	\N	\N	Inspection Assignment Rule	Inspector assignment rule	inspection_assignment_rules	\N	1	grid	[]	none	\N	f	\N	f	2025-10-05 06:39:29.002413+00
16	\N	\N	1	OHS Incident – First Aid	Report incidents requiring first aid	ohs_incidents	\N	1	grid	[{"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Date", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 1}, {"label": "Time", "type_id": 1, "field_name": "time", "data_column": "time", "order_index": 2}, {"label": "Location", "type_id": 17, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Person Treated", "type_id": 1, "field_name": "person_treated", "json_column": "form_data", "order_index": 4}, {"label": "Injury Description", "type_id": 1, "field_name": "injury_description", "json_column": "form_data", "order_index": 5}, {"label": "First Aid Given", "type_id": 1, "field_name": "first_aid_given", "json_column": "form_data", "order_index": 6}, {"label": "Treated By", "type_id": 1, "field_name": "treated_by", "json_column": "form_data", "order_index": 7}, {"label": "Follow-Up Required?", "options": [{"value": "yes", "display_text": "Yes"}, {"value": "no", "display_text": "No"}], "type_id": 4, "field_name": "follow_up_required", "json_column": "form_data", "order_index": 8}, {"label": "Classification", "type_id": 17, "field_name": "classification", "data_column": "classification", "order_index": 12}, {"label": "Severity", "type_id": 17, "field_name": "severity", "data_column": "severity", "order_index": 13}, {"label": "Status", "type_id": 4, "field_name": "status", "json_column": "form_data", "order_index": 9, "options_table": "ohs_incident_statuses", "options_label_column": "name", "options_value_column": "id"}, {"label": "Investigator", "type_id": 4, "field_name": "investigator_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Investigators\\"]}}", "data_column": "investigator_id", "order_index": 10, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Reviewer", "type_id": 4, "field_name": "reviewer_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Reviewers\\"]}}", "data_column": "reviewer_id", "order_index": 11, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:28.920065+00
17	\N	\N	1	OHS Incident – Medical Treatment	Report incidents requiring medical treatment	ohs_incidents	\N	1	grid	[{"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Date", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 1}, {"label": "Time", "type_id": 1, "field_name": "time", "data_column": "time", "order_index": 2}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Person Treated", "type_id": 1, "field_name": "person_treated", "json_column": "form_data", "order_index": 4}, {"label": "Injury Description", "type_id": 1, "field_name": "injury_description", "json_column": "form_data", "order_index": 5}, {"label": "Medical Details", "type_id": 1, "field_name": "medical_details", "json_column": "form_data", "order_index": 6}, {"label": "Provider", "type_id": 1, "field_name": "medical_provider", "json_column": "form_data", "order_index": 7}, {"label": "Follow-Up Required?", "options": [{"value": "yes", "display_text": "Yes"}, {"value": "no", "display_text": "No"}], "type_id": 4, "field_name": "follow_up_required", "json_column": "form_data", "order_index": 8}, {"label": "Classification", "type_id": 16, "field_name": "classification", "data_column": "classification", "order_index": 12}, {"label": "Severity", "type_id": 16, "field_name": "severity", "data_column": "severity", "order_index": 13}, {"label": "Status", "type_id": 4, "field_name": "status", "json_column": "form_data", "order_index": 9, "options_table": "ohs_incident_statuses", "options_label_column": "name", "options_value_column": "id"}, {"label": "Investigator", "type_id": 4, "field_name": "investigator_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Investigators\\"]}}", "data_column": "investigator_id", "order_index": 10, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Reviewer", "type_id": 4, "field_name": "reviewer_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Reviewers\\"]}}", "data_column": "reviewer_id", "order_index": 11, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:28.922432+00
18	\N	\N	1	OHS Incident – LTI	Report lost-time injuries	ohs_incidents	\N	1	grid	[{"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Date", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 1}, {"label": "Time", "type_id": 1, "field_name": "time", "data_column": "time", "order_index": 2}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Person Injured", "type_id": 1, "field_name": "person_injured", "json_column": "form_data", "order_index": 4}, {"label": "Injury Description", "type_id": 1, "field_name": "injury_description", "json_column": "form_data", "order_index": 5}, {"label": "Days Lost", "type_id": 2, "field_name": "days_lost", "json_column": "form_data", "order_index": 6}, {"label": "Classification", "type_id": 16, "field_name": "classification", "data_column": "classification", "order_index": 12}, {"label": "Severity", "type_id": 16, "field_name": "severity", "data_column": "severity", "order_index": 13}, {"label": "Return-to-Work Date", "type_id": 3, "field_name": "rtw_date", "json_column": "form_data", "order_index": 7}, {"label": "Corrective Action", "type_id": 1, "field_name": "corrective_action", "json_column": "form_data", "order_index": 8}, {"label": "Status", "type_id": 4, "field_name": "status", "json_column": "form_data", "order_index": 9, "options_table": "ohs_incident_statuses", "options_label_column": "name", "options_value_column": "id"}, {"label": "Investigator", "type_id": 4, "field_name": "investigator_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Investigators\\"]}}", "data_column": "investigator_id", "order_index": 10, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Reviewer", "type_id": 4, "field_name": "reviewer_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Reviewers\\"]}}", "data_column": "reviewer_id", "order_index": 11, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:28.924696+00
19	\N	\N	1	OHS Incident – Fatality	Report fatalities	ohs_incidents	\N	1	grid	[{"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Date", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 1}, {"label": "Time", "type_id": 1, "field_name": "time", "data_column": "time", "order_index": 2}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Deceased Name", "type_id": 1, "field_name": "deceased_name", "json_column": "form_data", "order_index": 4}, {"label": "Cause of Death", "type_id": 1, "field_name": "cause_of_death", "json_column": "form_data", "order_index": 5}, {"label": "Reported to Authorities", "type_id": 3, "field_name": "reported_authorities", "json_column": "form_data", "order_index": 6}, {"label": "Coroner Details", "type_id": 1, "field_name": "coroner_details", "json_column": "form_data", "order_index": 7}, {"label": "Corrective Action", "type_id": 1, "field_name": "corrective_action", "json_column": "form_data", "order_index": 8}, {"label": "Classification", "type_id": 16, "field_name": "classification", "data_column": "classification", "order_index": 12}, {"label": "Severity", "type_id": 16, "field_name": "severity", "data_column": "severity", "order_index": 13}, {"label": "Status", "type_id": 4, "field_name": "status", "json_column": "form_data", "order_index": 9, "options_table": "ohs_incident_statuses", "options_label_column": "name", "options_value_column": "id"}, {"label": "Investigator", "type_id": 4, "field_name": "investigator_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Investigators\\"]}}", "data_column": "investigator_id", "order_index": 10, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Reviewer", "type_id": 4, "field_name": "reviewer_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Reviewers\\"]}}", "data_column": "reviewer_id", "order_index": 11, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:28.927191+00
20	\N	\N	1	OHS Incident	Default incident report form	ohs_incidents	\N	1	grid	[{"label": "Short Description", "type_id": 1, "field_name": "short_description", "data_column": "short_description", "order_index": 0}, {"label": "Date", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 1}, {"label": "Time", "type_id": 1, "field_name": "time", "data_column": "time", "order_index": 2}, {"label": "Classification", "options": [{"value": "injury", "display_text": "Injury"}, {"value": "property_damage", "display_text": "Property Damage"}, {"value": "environmental", "display_text": "Environmental"}, {"value": "near_miss", "display_text": "Near Miss"}, {"value": "first_aid", "display_text": "First Aid"}, {"value": "medical_treatment", "display_text": "Medical Treatment"}, {"value": "lti", "display_text": "LTI"}, {"value": "fatality", "display_text": "Fatality"}], "type_id": 4, "field_name": "classification", "data_column": "classification", "order_index": 3}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 4}, {"label": "Nature", "type_id": 1, "field_name": "nature", "json_column": "form_data", "order_index": 5}, {"label": "Workplace Part", "type_id": 1, "field_name": "workplace_part", "json_column": "form_data", "order_index": 6}, {"label": "Activity", "type_id": 1, "field_name": "activity", "json_column": "form_data", "order_index": 7}, {"label": "Unexpected", "type_id": 1, "field_name": "unexpected", "json_column": "form_data", "order_index": 8}, {"label": "How Sustained", "type_id": 1, "field_name": "how_sustained", "json_column": "form_data", "order_index": 9}, {"label": "Completed By", "type_id": 1, "field_name": "completed_by", "json_column": "form_data", "order_index": 10}, {"label": "Position", "type_id": 1, "field_name": "position", "json_column": "form_data", "order_index": 11}, {"label": "Outcome", "type_id": 1, "field_name": "outcome", "json_column": "form_data", "order_index": 12}, {"label": "Preventative Action", "type_id": 1, "field_name": "preventative_action", "json_column": "form_data", "order_index": 13}, {"label": "Investigator Id", "type_id": 4, "field_name": "investigator_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Investigators\\"]}}", "data_column": "investigator_id", "order_index": 14, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Reviewer", "type_id": 4, "field_name": "reviewer_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Reviewers\\"]}}", "data_column": "reviewer_id", "order_index": 15, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Status", "type_id": 4, "field_name": "status", "json_column": "form_data", "order_index": 16, "options_table": "ohs_incident_statuses", "options_label_column": "name", "options_value_column": "id"}, {"label": "Days Lost", "type_id": 2, "field_name": "days_lost", "json_column": "form_data", "order_index": 17}, {"label": "Return-to-Work Date", "type_id": 3, "field_name": "rtw_date", "json_column": "form_data", "order_index": 18}, {"label": "Restricted Duty Notes", "type_id": 1, "field_name": "restricted_duty_notes", "json_column": "form_data", "order_index": 19}, {"label": "Severity", "type_id": 16, "field_name": "severity", "data_column": "severity", "order_index": 20}]	none	\N	f	\N	f	2025-10-05 06:39:28.929619+00
29	\N	\N	\N	Vehicle Registration	Capture fleet vehicle details	vehicles	\N	1	grid	[{"label": "Vehicle Number", "type_id": 1, "field_name": "vehicle_number", "data_column": "vehicle_number", "order_index": 1, "options_table": " NULL", "options_label_column": " NULL", "options_value_column": " NULL"}, {"label": "Vin", "type_id": 1, "field_name": "vin", "data_column": "vin", "order_index": 2, "options_table": " NULL", "options_label_column": " NULL", "options_value_column": " NULL"}, {"label": "Engine Number", "type_id": 1, "field_name": "engine_number", "data_column": "engine_number", "order_index": 3, "options_table": " NULL", "options_label_column": " NULL", "options_value_column": " NULL"}, {"label": "Mileage", "type_id": 2, "field_name": "mileage", "data_column": "mileage", "order_index": 4, "options_table": " NULL", "options_label_column": " NULL", "options_value_column": " NULL"}, {"label": "Make", "type_id": 9, "field_name": "make", "data_column": "make", "order_index": 5, "options_table": "vehicle_makes", "options_label_column": "name", "options_value_column": "id"}, {"label": "Model", "type_id": 9, "field_name": "model", "data_column": "model", "order_index": 6, "options_table": "vehicle_models", "options_label_column": "name", "options_value_column": "id"}, {"label": "Type", "type_id": 9, "field_name": "type", "data_column": "type", "order_index": 7, "options_table": "vehicle_types", "options_label_column": "name", "options_value_column": "id"}, {"label": "Year", "type_id": 2, "field_name": "year", "data_column": "year", "order_index": 8, "options_table": " NULL", "options_label_column": " NULL", "options_value_column": " NULL"}, {"label": "Fitness Expires", "type_id": 3, "field_name": "fitness_expires", "data_column": "fitness_expires", "order_index": 9, "options_table": " NULL", "options_label_column": " NULL", "options_value_column": " NULL"}]	none	\N	f	\N	f	2025-10-05 06:39:28.932063+00
30	\N	\N	\N	Trip Log	Record vehicle trips with mileage	 NULL	\N	1	grid	[{"label": "Vehicle Id", "type_id": 2, "field_name": "vehicle_id", "data_column": "vehicle_id", "order_index": 1}, {"label": "Driver Id", "type_id": 2, "field_name": "driver_id", "data_column": "driver_id", "order_index": 2}, {"label": "Trip Date", "type_id": 3, "field_name": "trip_date", "data_column": "trip_date", "order_index": 3}, {"label": "Start Time", "type_id": 8, "field_name": "start_time", "data_column": "start_time", "order_index": 4}, {"label": "End Time", "type_id": 8, "field_name": "end_time", "data_column": "end_time", "order_index": 5}, {"label": "Start Location", "type_id": 1, "field_name": "start_location", "data_column": "start_location", "order_index": 6}, {"label": "End Location", "type_id": 1, "field_name": "end_location", "data_column": "end_location", "order_index": 7}, {"label": "Start Mileage", "type_id": 2, "field_name": "start_mileage", "data_column": "start_mileage", "order_index": 8}, {"label": "End Mileage", "type_id": 2, "field_name": "end_mileage", "data_column": "end_mileage", "order_index": 9}, {"label": "Distance Km", "type_id": 2, "field_name": "distance_km", "data_column": "distance_km", "order_index": 10}, {"label": "Status", "type_id": 1, "field_name": "status", "data_column": "status_id", "order_index": 11}]	none	\N	f	\N	f	2025-10-05 06:39:28.934336+00
31	\N	\N	\N	Service Type	Define maintenance intervals	service_types	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1, "options_table": " NULL", "options_label_column": " NULL", "options_value_column": " NULL"}, {"label": "Description", "type_id": 7, "field_name": "description", "data_column": "description", "order_index": 2, "options_table": " NULL", "options_label_column": " NULL", "options_value_column": " NULL"}, {"label": "Make", "type_id": 9, "field_name": "make", "data_column": "make", "order_index": 3, "options_table": "vehicle_makes", "options_label_column": "name", "options_value_column": "id"}, {"label": "Model", "type_id": 9, "field_name": "model", "data_column": "model", "order_index": 4, "options_table": "vehicle_models", "options_label_column": "name", "options_value_column": "id"}, {"label": "Vehicle Type", "type_id": 9, "field_name": "type", "data_column": "type", "order_index": 5, "options_table": "vehicle_types", "options_label_column": "name", "options_value_column": "id"}, {"label": "Km Interval", "type_id": 2, "field_name": "km_interval", "data_column": "km_interval", "order_index": 6, "options_table": " NULL", "options_label_column": " NULL", "options_value_column": " NULL"}, {"label": "Month Interval", "type_id": 2, "field_name": "month_interval", "data_column": "month_interval", "order_index": 7, "options_table": " NULL", "options_label_column": " NULL", "options_value_column": " NULL"}]	none	\N	f	\N	f	2025-10-05 06:39:28.936555+00
32	\N	\N	\N	User Group	Manage user groups and permissions	groups	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Description", "type_id": 7, "field_name": "description", "data_column": "description", "order_index": 2}, {"label": "Parent Id", "type_id": 2, "field_name": "parent_id", "data_column": "parent_id", "order_index": 3}]	none	\N	f	\N	f	2025-10-05 06:39:28.93887+00
33	\N	\N	\N	Group Member	Assign users to groups	user_group_memberships	\N	1	grid	[{"label": "User Id", "type_id": 2, "field_name": "user_id", "data_column": "user_id", "order_index": 1}, {"label": "Group Id", "type_id": 2, "field_name": "group_id", "data_column": "group_id", "order_index": 2}, {"label": "Role", "type_id": 1, "field_name": "role", "data_column": "role", "order_index": 3}]	none	\N	f	\N	f	2025-10-05 06:39:28.941197+00
34	\N	\N	\N	Vehicle Issue Report	Report vehicle issues	vehicle_reports	\N	1	grid	[{"label": "Vehicle Id", "type_id": 9, "field_name": "vehicle_id", "data_column": "vehicle_id", "order_index": 1, "options_table": "vehicles", "options_label_column": "vehicle_number", "options_value_column": "id"}, {"label": "Report Type", "options": [{"value": "minor", "display_text": "minor"}, {"value": "major", "display_text": "major"}, {"value": "breakdown", "display_text": "breakdown"}], "type_id": 4, "field_name": "report_type", "data_column": "report_type", "order_index": 2, "options_table": "\\n        NULL", "options_label_column": " NULL", "options_value_column": " NULL"}, {"label": "Description", "type_id": 7, "field_name": "description", "data_column": "description", "order_index": 3, "options_table": "\\n        NULL", "options_label_column": " NULL", "options_value_column": " NULL"}]	none	\N	f	\N	f	2025-10-05 06:39:28.9432+00
35	\N	\N	\N	Client	Client details	clients	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "validation": "{\\"unique\\":{\\"table\\":\\"clients\\",\\"column\\":\\"name\\"}}", "data_column": "name", "order_index": 1}, {"label": "Phone", "type_id": 1, "field_name": "phone", "data_column": "phone", "order_index": 2}, {"label": "Email", "type_id": 1, "field_name": "email", "data_column": "email", "order_index": 3}, {"label": "Address", "type_id": 1, "field_name": "address", "data_column": "address", "order_index": 4}, {"label": "City", "type_id": 1, "field_name": "city", "data_column": "city", "order_index": 5}, {"label": "Country", "type_id": 1, "field_name": "country", "data_column": "country", "order_index": 6}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 7}, {"label": "Comments", "type_id": 8, "field_name": "comments", "data_column": "comments", "order_index": 8}]	none	\N	f	\N	f	2025-10-05 06:39:28.945294+00
36	\N	\N	\N	Case	Case record	cases	\N	1	grid	[{"label": "Client", "type_id": 4, "field_name": "client_id", "data_column": "client_id", "order_index": 1, "options_table": "clients", "options_label_column": "name", "options_value_column": "client_id"}, {"label": "Case Number", "type_id": 1, "field_name": "case_number", "data_column": "case_number", "order_index": 2}, {"label": "Title", "type_id": 1, "field_name": "title", "data_column": "title", "order_index": 3}, {"label": "Status", "options": [{"value": "open", "display_text": "open"}, {"value": "closed", "display_text": "closed"}, {"value": "pending", "display_text": "pending"}], "type_id": 4, "field_name": "status", "data_column": "status_id", "order_index": 4}, {"label": "Assigned Representative", "type_id": 4, "field_name": "lead_rep_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"lawyer\\",\\"lawyers\\"]}}", "data_column": "lead_rep_id", "order_index": 7, "options_table": "users", "options_label_column": "full_name", "options_value_column": "user_id"}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 8}, {"label": "Initial Instructions", "type_id": 8, "field_name": "initial_instructions", "data_column": "initial_instructions", "order_index": 9}]	none	\N	f	\N	f	2025-10-05 06:39:28.947425+00
37	\N	\N	\N	Lawyer	Lawyer user	users	\N	1	grid	[{"label": "Full Name", "type_id": 1, "field_name": "full_name", "data_column": "full_name", "order_index": 1}, {"label": "Emails", "type_id": 16, "field_name": "emails", "data_column": "emails", "order_index": 2}, {"label": "Phones", "type_id": 16, "field_name": "phones", "data_column": "phones", "order_index": 3}, {"label": "Password", "type_id": 0, "field_name": "password", "data_column": "NULL", "order_index": 4}]	none	\N	f	\N	f	2025-10-05 06:39:28.94949+00
90	\N	\N	\N	Community & Stakeholder Risk Assessment	Analyzes public-facing risks and reputational threats from service issues	risk_assessments	\N	1	grid	[{"type_id": 1, "field_name": "risk_assessment_type_id", "data_column": "risk_assessment_type_id", "order_index": 0}, {"label": "Title", "type_id": 1, "field_name": "title", "data_column": "title", "order_index": 1}, {"label": "Assessment Date", "type_id": 3, "field_name": "assessment_date", "data_column": "assessment_date", "order_index": 2}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Assessor Names", "type_id": 1, "field_name": "assessor_names", "json_column": "form_data", "order_index": 4}, {"label": "Review Date", "type_id": 3, "field_name": "review_date", "data_column": "review_date", "order_index": 5}, {"label": "Approver", "type_id": 1, "field_name": "approver_name", "json_column": "form_data", "order_index": 6}, {"label": "Work Description", "type_id": 7, "field_name": "work_description", "json_column": "form_data", "order_index": 7}, {"label": "Permit Requirements", "type_id": 7, "field_name": "permit_requirements", "json_column": "form_data", "order_index": 8}, {"label": "Community Area", "type_id": 1, "field_name": "community", "json_column": "form_data", "order_index": 9}, {"label": "Public Concern", "type_id": 7, "field_name": "concern", "json_column": "form_data", "order_index": 10}, {"label": "Likelihood of Escalation", "type_id": 2, "field_name": "escalation", "json_column": "form_data", "order_index": 11}, {"label": "Communication Strategy", "type_id": 7, "field_name": "communication", "json_column": "form_data", "order_index": 12}, {"label": "Resolution Timeline", "type_id": 1, "field_name": "timeline", "json_column": "form_data", "order_index": 13}]	none	\N	f	\N	f	2025-10-05 06:39:29.08319+00
38	\N	\N	\N	Time Entries	Record hours worked on a case	time_entries	\N	1	grid	[{"label": "Case", "type_id": 4, "field_name": "case_id", "data_column": "reference_id", "order_index": 1, "options_table": "cases", "options_label_column": "title", "options_value_column": "case_id"}, {"label": "Date", "default": "now()", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 2}, {"label": "Hours", "type_id": 2, "field_name": "hours", "data_column": "hours", "order_index": 3}, {"label": "Billable", "type_id": 5, "field_name": "billable", "data_column": "billable", "order_index": 4}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 6}, {"label": "Work Type", "type_id": 13, "field_name": "work_type", "data_column": "work_type_id", "order_index": 7, "options_table": "work_types", "options_label_column": "name", "options_value_column": "work_type_id"}, {"label": "Instructions", "type_id": 8, "field_name": "instructions", "data_column": "instructions", "order_index": 9}, {"label": "Documents", "options": {"linkField": "document_id", "linkTable": "case_hour_documents"}, "type_id": 9, "field_name": "documents", "data_column": "document_ids", "order_index": 10}, {"type_id": 17, "field_name": "reference_table", "data_column": "reference_table", "order_index": 11, "default_value": "cases"}]	none	\N	f	\N	f	2025-10-05 06:39:28.951741+00
39	\N	\N	\N	Tenant	Tenant details	tenants	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Subdomain", "type_id": 1, "field_name": "subdomain", "data_column": "subdomain", "order_index": 2}, {"label": "Custom Domain", "type_id": 1, "field_name": "custom_domain", "data_column": "custom_domain", "order_index": 3}, {"label": "Settings", "type_id": 7, "field_name": "settings", "data_column": "settings", "order_index": 4}, {"label": "Product Name", "type_id": 1, "field_name": "product_name", "data_column": "product_name", "order_index": 5}, {"label": "Dashboard Name", "type_id": 1, "field_name": "dashboard_name", "data_column": "dashboard_name", "order_index": 6}, {"label": "Logo Url", "type_id": 1, "field_name": "logo_url", "data_column": "logo_url", "order_index": 7}]	none	\N	f	\N	f	2025-10-05 06:39:28.95396+00
40	\N	\N	\N	Admin	Admin user	users	\N	1	grid	[{"label": "Full Name", "type_id": 1, "field_name": "full_name", "data_column": "full_name", "order_index": 1}, {"label": "Email", "type_id": 16, "field_name": "emails", "data_column": "emails", "order_index": 2}, {"label": "Phones", "type_id": 16, "field_name": "phones", "data_column": "phones", "order_index": 3}, {"label": "Password", "type_id": 1, "field_name": "password", "data_column": "password", "order_index": 4}, {"label": "Tenant Id", "type_id": 4, "field_name": "tenant_id", "data_column": "tenant_id", "order_index": 5, "options_table": "tenants", "options_label_column": "name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:28.956345+00
41	\N	\N	\N	User	User account details	users	\N	1	grid	[]	none	\N	f	\N	f	2025-10-05 06:39:28.958681+00
42	\N	\N	\N	Vehicle Downtime	Record vehicle downtime periods	vehicle_downtime	\N	1	grid	[]	none	\N	f	\N	f	2025-10-05 06:39:28.963819+00
44	\N	\N	\N	Invoice Settings	Configure invoice defaults	invoice_settings	\N	1	grid	[{"label": "Template Id", "type_id": 0, "field_name": "template_id", "data_column": "template_id", "order_index": 1, "options_table": "invoice_templates", "options_label_column": "name", "options_value_column": "id"}, {"label": "Case Template Id", "type_id": 0, "field_name": "case_template_id", "data_column": "case_template_id", "order_index": 2, "options_table": "invoice_templates", "options_label_column": "name", "options_value_column": "id"}, {"label": "Logo Document Id", "type_id": 0, "field_name": "logo_document_id", "data_column": "logo_document_id", "order_index": 3}, {"label": "Instructions", "type_id": 0, "field_name": "instructions", "data_column": "instructions", "order_index": 4}, {"label": "Disclaimer", "type_id": 0, "field_name": "disclaimer", "data_column": "disclaimer", "order_index": 5}, {"label": "Bank Details", "type_id": 0, "field_name": "bank_details", "data_column": "bank_details", "order_index": 6}, {"label": "Number Format", "type_id": 0, "field_name": "number_format", "data_column": "number_format", "order_index": 7}, {"label": "Starting Number", "type_id": 0, "field_name": "starting_number", "data_column": "starting_number", "order_index": 8}, {"label": "Rollover Date", "type_id": 0, "field_name": "rollover_date", "data_column": "rollover_date", "order_index": 9}]	none	\N	f	\N	f	2025-10-05 06:39:28.969338+00
45	\N	\N	\N	Driver	Driver user	users	\N	1	grid	[{"label": "Full Name", "type_id": 1, "field_name": "full_name", "data_column": "full_name", "order_index": 1}, {"label": "Email", "type_id": 0, "field_name": "email", "data_column": "NULL", "order_index": 2}, {"label": "Phone", "type_id": 1, "field_name": "phone", "data_column": "NULL", "order_index": 3}, {"label": "Password", "type_id": 0, "field_name": "password", "data_column": "NULL", "order_index": 4}]	none	\N	f	\N	f	2025-10-05 06:39:28.971639+00
46	\N	\N	\N	Fleet Engineer	Fleet engineer user	users	\N	1	grid	[{"label": "Full Name", "type_id": 1, "field_name": "full_name", "data_column": "full_name", "order_index": 1}, {"label": "Email", "type_id": 0, "field_name": "email", "data_column": "NULL", "order_index": 2}, {"label": "Phone", "type_id": 1, "field_name": "phone", "data_column": "NULL", "order_index": 3}, {"label": "Password", "type_id": 0, "field_name": "password", "data_column": "NULL", "order_index": 4}]	none	\N	f	\N	f	2025-10-05 06:39:28.973568+00
47	\N	\N	\N	Case Instruction	Matter instruction	case_instructions	\N	1	grid	[{"label": "Case Id", "type_id": 0, "field_name": "case_id", "data_column": "case_id", "order_index": 1}, {"label": "Instruction Date", "type_id": 3, "field_name": "instruction_date", "data_column": "instruction_date", "order_index": 2}, {"label": "Instruction", "type_id": 0, "field_name": "instruction", "data_column": "instruction", "order_index": 3}, {"label": "Documents", "type_id": 9, "field_name": "document_ids", "data_column": "document_ids", "order_index": 4}]	none	\N	f	\N	f	2025-10-05 06:39:28.975575+00
48	\N	\N	\N	Case Expense	Case related expense	expenses	\N	1	grid	[{"label": "Case", "type_id": 4, "field_name": "case_id", "data_column": "reference_id", "order_index": 1, "options_table": "cases", "options_label_column": "title", "options_value_column": "case_id"}, {"label": "Expense Date", "default": "now()", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 2}, {"label": "Vendor", "type_id": 13, "field_name": "vendor", "data_column": "vendor_id", "order_index": 3, "options_table": "vendors", "options_label_column": "vendorname", "options_value_column": "vendor_id"}, {"label": "Invoice Number", "type_id": 1, "field_name": "invoice_number", "data_column": "invoice_number", "order_index": 4}, {"label": "Amount", "type_id": 2, "field_name": "amount", "data_column": "amount", "order_index": 6}, {"label": "Billable", "type_id": 5, "field_name": "billable", "data_column": "billable", "order_index": 7}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 10}, {"label": "Documents", "type_id": 9, "field_name": "document_ids", "data_column": "document_ids", "order_index": 14}, {"type_id": 17, "field_name": "reference_table", "data_column": "reference_table", "order_index": 15, "default_value": "cases"}]	none	\N	f	\N	f	2025-10-05 06:39:28.977698+00
58	\N	\N	\N	One Time Cost	One time service cost for a case	one_time_service_costs	\N	1	grid	[{"label": "Case", "type_id": 4, "field_name": "case_id", "data_column": "reference_id", "order_index": 1, "options_table": "cases", "options_label_column": "title", "options_value_column": "case_id"}, {"label": "Cost Date", "default": "now()", "type_id": 3, "field_name": "date", "data_column": "date", "order_index": 2}, {"label": "Vendor", "type_id": 13, "field_name": "vendor", "data_column": "vendor_id", "order_index": 3, "options_table": "vendors", "options_label_column": "vendorname", "options_value_column": "vendor_id"}, {"label": "Invoice Number", "type_id": 1, "field_name": "invoice_number", "data_column": "invoice_number", "order_index": 4}, {"label": "Amount", "type_id": 2, "field_name": "amount", "data_column": "amount", "order_index": 6}, {"label": "Billable", "type_id": 5, "field_name": "billable", "data_column": "billable", "order_index": 7}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 10}, {"label": "Documents", "type_id": 9, "field_name": "document_ids", "data_column": "document_ids", "order_index": 14}, {"type_id": 17, "field_name": "reference_table", "data_column": "reference_table", "order_index": 15, "default_value": "cases"}]	none	\N	f	\N	f	2025-10-05 06:39:28.980052+00
49	\N	\N	\N	Case Invoice	Invoice for a case	invoices	\N	1	grid	[{"label": "Reference Id", "type_id": 0, "field_name": "invoice_id", "data_column": "invoice_id", "order_index": 1}, {"label": "Invoice Number", "type_id": 0, "field_name": "invoice_number", "data_column": "invoice_number", "order_index": 2}, {"label": "Invoice Date", "type_id": 3, "field_name": "invoice_date", "data_column": "invoice_date", "order_index": 3}, {"label": "Amount", "type_id": 0, "field_name": "amount", "data_column": "amount", "order_index": 4}, {"label": "Status", "type_id": 0, "field_name": "status", "data_column": "status_id", "order_index": 5}, {"label": "Invoice Template Id", "type_id": 0, "field_name": "invoice_template_id", "data_column": "invoice_template_id", "order_index": 6, "options_table": "invoice_templates", "options_label_column": "name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:28.982131+00
50	\N	\N	\N	Case Payment	Payment for a case invoice	payments	\N	1	grid	[{"label": "Client", "type_id": 4, "field_name": "client_id", "data_column": "client_id", "order_index": 1, "options_table": "clients", "options_label_column": "name", "options_value_column": "client_id"}, {"label": "Invoice Id", "type_id": 4, "field_name": "invoice_id", "data_column": "invoice_id", "order_index": 2, "options_table": "invoices", "options_label_column": "invoice_number", "options_value_column": "id"}, {"label": "Payment Date", "type_id": 3, "field_name": "payment_date", "data_column": "payment_date", "order_index": 3}, {"label": "Payment Amount", "type_id": 2, "field_name": "payment_amount", "data_column": "payment_amount", "order_index": 4}, {"label": "Payment Method", "options": [{"value": "credit_card", "display_text": "credit card"}, {"value": "bank_transfer", "display_text": "bank transfer"}, {"value": "cash", "display_text": "cash"}, {"value": "check", "display_text": "check"}], "type_id": 4, "field_name": "payment_method", "data_column": "payment_method", "order_index": 5}, {"label": "Reference Id", "type_id": 1, "field_name": "reference_id", "data_column": "reference_id", "order_index": 6}, {"label": "Reference Table", "type_id": 1, "field_name": "reference_table", "data_column": "reference_table", "order_index": 7, "default_value": "cases"}, {"label": "Notes", "type_id": 8, "field_name": "notes", "data_column": "notes", "order_index": 8}, {"label": "Status", "options": [{"value": "completed", "display_text": "completed"}, {"value": "pending", "display_text": "pending"}, {"value": "failed", "display_text": "failed"}], "type_id": 4, "field_name": "status", "data_column": "status", "order_index": 9}, {"label": "Screenshots", "type_id": 7, "field_name": "screenshot_ids", "data_column": "screenshot_ids", "order_index": 10}, {"label": "Documents", "type_id": 9, "field_name": "document_ids", "data_column": "document_ids", "order_index": 11}]	none	\N	f	\N	f	2025-10-05 06:39:28.984311+00
51	\N	\N	\N	Case Approval	Approve or reject case	\N	\N	1	grid	[{"label": "Case Id", "type_id": 0, "field_name": "case_id", "data_column": "case_id", "order_index": 1}, {"label": "Comments", "type_id": 0, "field_name": "comments", "data_column": "comments", "order_index": 2}]	none	\N	f	\N	f	2025-10-05 06:39:28.986632+00
52	\N	\N	\N	OHS Action	Action taken for an incident	ohs_actions	\N	1	grid	[{"label": "Description", "type_id": 0, "field_name": "description", "data_column": "description", "order_index": 1}, {"label": "Responsible User Id", "type_id": 0, "field_name": "responsible_user_id", "data_column": "responsible_user_id", "order_index": 2}, {"label": "Target Date", "type_id": 0, "field_name": "target_date", "data_column": "target_date", "order_index": 3}, {"label": "Status", "type_id": 0, "field_name": "status", "data_column": "status_id", "order_index": 4}, {"label": "Completed At", "type_id": 0, "field_name": "completed_at", "data_column": "completed_at", "order_index": 5}]	none	\N	f	\N	f	2025-10-05 06:39:28.988536+00
53	\N	\N	\N	OHS Regulation	Record safety regulations	ohs_regulations	\N	1	grid	[{"label": "Title", "type_id": 0, "field_name": "title", "data_column": "title", "order_index": 1}, {"label": "Description", "type_id": 0, "field_name": "description", "data_column": "description", "order_index": 2}, {"label": "Effective Date", "type_id": 0, "field_name": "effective_date", "data_column": "effective_date", "order_index": 3}]	none	\N	f	\N	f	2025-10-05 06:39:28.99053+00
54	\N	\N	\N	OHS Compliance Task	Task to meet a regulation	ohs_compliance_tasks	\N	1	grid	[{"label": "Regulation Id", "type_id": 0, "field_name": "regulation_id", "data_column": "regulation_id", "order_index": 1, "options_table": "ohs_regulations", "options_label_column": "title", "options_value_column": "id"}, {"label": "Title", "type_id": 0, "field_name": "title", "data_column": "title", "order_index": 2}, {"label": "Due Date", "type_id": 0, "field_name": "due_date", "data_column": "due_date", "order_index": 3}, {"label": "Assigned To", "type_id": 0, "field_name": "assigned_to", "data_column": "assigned_to", "order_index": 4}, {"label": "Status", "type_id": 0, "field_name": "status", "data_column": "status_id", "order_index": 5}]	none	\N	f	\N	f	2025-10-05 06:39:28.992495+00
55	\N	\N	\N	Permit Inspection	Record permit inspections	permit_inspections	\N	1	grid	[]	none	\N	f	\N	f	2025-10-05 06:39:28.994678+00
101	\N	\N	\N	WorkCOM Inspection Assignment Rule	Inspector assignment rule	inspection_assignment_rules	\N	1	grid	[{"label": "District", "type_id": 4, "field_name": "district_id", "data_column": "district_id", "order_index": 1, "options_table": "districts", "options_label_column": "name", "options_value_column": "id"}, {"label": "Assign", "type_id": 4, "field_name": "inspector_id", "validation": "{\\"filter_columns\\":{\\"groups.name\\":[\\"Investigators\\"]}}", "data_column": "inspector_id", "order_index": 2, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Email", "type_id": 1, "field_name": "email", "data_column": "email", "order_index": 3}, {"label": "Send Email", "type_id": 5, "field_name": "send_email", "data_column": "send_email", "order_index": 4}, {"label": "Phone", "type_id": 1, "field_name": "phone", "data_column": "phone", "order_index": 5}, {"label": "Send SMS", "type_id": 5, "field_name": "send_sms", "data_column": "send_sms", "order_index": 6}, {"label": "Send Push", "type_id": 5, "field_name": "send_push", "data_column": "send_push", "order_index": 7}]	none	\N	f	\N	f	2025-10-05 06:39:29.004507+00
59	\N	\N	\N	OHS Incident Classification	Select incident type and location	ohs_incidents	\N	1	grid	[{"label": "Classification", "type_id": 4, "field_name": "classification", "data_column": "classification", "order_index": 1, "options_table": "ohs_incident_types", "options_label_column": "name", "options_value_column": "name"}, {"label": "Location", "options": [{"value": "Other", "display_text": "Other"}], "type_id": 4, "field_name": "location", "data_column": "location", "order_index": 2, "options_table": "locations", "options_label_column": "name", "options_value_column": "name"}, {"label": "Address", "type_id": 7, "show_when": {"field": "location", "value": "Other"}, "field_name": "address", "data_column": "address", "order_index": 3}, {"label": "Severity", "type_id": 4, "field_name": "severity", "data_column": "severity", "order_index": 4, "options_table": "ohs_severities", "options_label_column": "name", "options_value_column": "name"}]	none	\N	f	\N	f	2025-10-05 06:39:29.006932+00
66	\N	\N	\N	Issues Log	Record safety issues	ohs_issues	\N	1	grid	[{"label": "Description", "type_id": 0, "field_name": "description", "data_column": "description", "order_index": 1}, {"label": "Type", "type_id": 0, "field_name": "type", "data_column": "type", "order_index": 2}, {"label": "Category", "type_id": 0, "field_name": "category", "data_column": "category", "order_index": 3}, {"label": "Impact", "type_id": 0, "field_name": "impact", "data_column": "impact", "order_index": 4}, {"label": "Risk Or Opportunity", "type_id": 0, "field_name": "risk_or_opportunity", "data_column": "risk_or_opportunity", "order_index": 5}, {"label": "Action Taken", "type_id": 0, "field_name": "action_taken", "data_column": "action_taken", "order_index": 6}, {"label": "Owner", "type_id": 0, "field_name": "owner", "data_column": "owner", "order_index": 7}, {"label": "Review Date", "type_id": 0, "field_name": "review_date", "data_column": "review_date", "order_index": 8}]	none	\N	f	\N	f	2025-10-05 06:39:29.00882+00
67	\N	\N	\N	Needs & Expectations Assessment	Stakeholder needs and expectations	ohs_needs_expectations	\N	1	grid	[{"label": "Interested Party", "type_id": 0, "field_name": "interested_party", "data_column": "interested_party", "order_index": 1}, {"label": "Needs", "type_id": 0, "field_name": "needs", "data_column": "needs", "order_index": 2}, {"label": "Expectations", "type_id": 0, "field_name": "expectations", "data_column": "expectations", "order_index": 3}, {"label": "Compliance Required", "type_id": 0, "field_name": "compliance_required", "data_column": "compliance_required", "order_index": 4}, {"label": "Source", "type_id": 0, "field_name": "source", "data_column": "source", "order_index": 5}, {"label": "Status", "type_id": 0, "field_name": "status_id", "data_column": "status_id", "order_index": 6}, {"label": "Notes", "type_id": 0, "field_name": "notes", "data_column": "notes", "order_index": 7}, {"label": "Review Date", "type_id": 0, "field_name": "review_date", "data_column": "review_date", "order_index": 8}, {"label": "Review By", "type_id": 0, "field_name": "review_by", "data_column": "review_by", "order_index": 9}]	none	\N	f	\N	f	2025-10-05 06:39:29.011186+00
68	\N	\N	\N	Inspection Type	Manage inspection categories	ohs_inspection_types	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Form Id", "type_id": 4, "field_name": "form_id", "data_column": "form_id", "order_index": 2, "options_table": "forms", "options_label_column": "name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:29.013094+00
104	\N	\N	\N	WorkCOM Inspection Type	Manage WorkCOM inspection categories	workcom_inspection_types	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Form Id", "type_id": 4, "field_name": "form_id", "data_column": "form_id", "order_index": 2, "options_table": "forms", "options_label_column": "name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:29.015269+00
105	\N	\N	\N	OHS Field Incident	Report field incidents	ohs_incidents	\N	1	grid	[{"label": "Incident Type", "type_id": 1, "field_name": "incident_type", "json_column": "form_data", "order_index": 1}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 2}, {"label": "Description", "type_id": 8, "field_name": "description", "json_column": "form_data", "order_index": 3}, {"label": "Documents", "type_id": 9, "field_name": "document_ids", "json_column": "form_data", "order_index": 4}, {"label": "GPS", "type_id": 20, "field_name": "gps", "json_column": "form_data", "order_index": 5}]	none	\N	f	\N	f	2025-10-05 06:39:29.017392+00
71	\N	\N	\N	Form Category	Manage form categories	form_categories	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Description", "type_id": 7, "field_name": "description", "data_column": "description", "order_index": 2}]	none	\N	f	\N	f	2025-10-05 06:39:29.019824+00
99	\N	\N	\N	Inspection Request	Submit request for workplace inspection	inspection_requests	\N	1	grid	[{"label": "Workplace", "type_id": 4, "field_name": "workplace_id", "data_column": "workplace_id", "order_index": 1, "options_table": "workplace_registrations", "options_label_column": "company_name", "options_value_column": "id"}, {"label": "Description", "type_id": 7, "field_name": "description", "data_column": "description", "order_index": 2}, {"label": "Preferred Date", "type_id": 3, "field_name": "preferred_date", "data_column": "preferred_date", "order_index": 3}]	none	\N	f	\N	f	2025-10-05 06:39:29.090948+00
72	\N	\N	\N	Training Certificate	Employee training record	training_certificates	\N	1	grid	[{"label": "Certificate Name", "type_id": 1, "field_name": "certificate_name", "data_column": "certificate_name", "order_index": 1, "options_table": "training_courses", "options_label_column": "name", "options_value_column": "id"}, {"label": "Category", "type_id": 1, "field_name": "category", "data_column": "category", "order_index": 2, "options_table": "training_categories", "options_label_column": "name", "options_value_column": "id"}, {"label": "Employee Id", "type_id": 4, "field_name": "employee_id", "data_column": "certificate_user_id", "order_index": 3, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Issued At", "type_id": 3, "field_name": "issued_at", "data_column": "issued_at", "order_index": 4}, {"label": "Expiry Date", "type_id": 3, "field_name": "expiry_date", "data_column": "expiry_date", "order_index": 5}]	none	\N	f	\N	f	2025-10-05 06:39:29.021813+00
73	\N	\N	\N	Investigator	Investigator user	users	\N	1	grid	[{"label": "Full Name", "type_id": 1, "field_name": "full_name", "data_column": "full_name", "order_index": 1}, {"label": "Emails", "type_id": 15, "field_name": "emails", "data_column": "emails", "order_index": 2}, {"label": "Phones", "type_id": 15, "field_name": "phones", "data_column": "phones", "order_index": 3}, {"label": "Password", "type_id": 0, "field_name": "password", "data_column": null, "order_index": 4}]	none	\N	f	\N	f	2025-10-05 06:39:29.024221+00
74	\N	\N	\N	Inspection Template	Define reusable inspection templates	ohs_inspection_templates	\N	1	grid	[{"label": "Template Name", "type_id": 1, "field_name": "template_name", "data_column": "template_name", "order_index": 1}, {"label": "Form Id", "type_id": 4, "field_name": "form_id", "data_column": "form_id", "order_index": 2, "options_table": "forms", "options_label_column": "name", "options_value_column": "id"}, {"label": "Description", "type_id": 7, "field_name": "description", "data_column": "description", "order_index": 3}]	none	\N	f	\N	f	2025-10-05 06:39:29.026122+00
97	\N	\N	\N	Safety Incident	Record safety incidents	safety_incidents	\N	1	grid	[{"label": "Incident Type", "type_id": 4, "field_name": "incident_type", "data_column": "incident_type", "order_index": 1, "options_table": "safety_incident_types", "options_label_column": "name", "options_value_column": "id"}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 2}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 3}, {"label": "Documents", "type_id": 9, "field_name": "document_ids", "data_column": "document_ids", "order_index": 4}, {"label": "GPS", "type_id": 20, "field_name": "gps", "data_column": "gps", "order_index": 5}]	none	\N	f	\N	f	2025-10-05 06:39:29.028107+00
107	\N	\N	\N	Safety Incident Classification	Select incident type and location	safety_incidents	\N	1	grid	[{"label": "Incident Type", "type_id": 4, "field_name": "incident_type", "data_column": "incident_type", "order_index": 1, "options_table": "safety_incident_types", "options_label_column": "name", "options_value_column": "id"}, {"label": "Location", "type_id": 4, "field_name": "location", "data_column": "location", "order_index": 2, "options_table": "locations", "options_label_column": "name", "options_value_column": "name"}]	none	\N	f	\N	f	2025-10-05 06:39:29.02998+00
98	\N	\N	\N	Incident Alert Rule	Alert configuration per incident type	incident_alert_rules	\N	1	grid	[{"label": "Incident Type", "type_id": 4, "field_name": "incident_type_id", "data_column": "incident_type_id", "order_index": 1, "options_table": "ohs_incident_types", "options_label_column": "name", "options_value_column": "id"}, {"label": "Severity", "options": [{"value": "Minor", "display_text": "Minor"}, {"value": "Moderate", "display_text": "Moderate"}, {"value": "Major", "display_text": "Major"}, {"value": "Severe", "display_text": "Severe"}, {"value": "Critical", "display_text": "Critical"}], "type_id": 4, "field_name": "severity", "data_column": "severity", "order_index": 2}, {"label": "Location", "options": [{"value": "", "display_text": "All Locations"}], "type_id": 4, "field_name": "location_id", "data_column": "location_id", "order_index": 3, "options_table": "locations", "options_label_column": "name", "options_value_column": "id"}, {"label": "Send Alert To", "type_id": 4, "field_name": "send_alert_to", "data_column": "send_alert_to", "order_index": 4, "options_table": "users", "options_label_column": "full_name", "options_value_column": "id"}, {"label": "Email", "type_id": 1, "field_name": "email", "data_column": "email", "order_index": 5}, {"label": "Send Email", "type_id": 5, "field_name": "send_email", "data_column": "send_email", "order_index": 6}, {"label": "Phone", "type_id": 1, "field_name": "phone", "data_column": "phone", "order_index": 7}, {"label": "Send SMS", "type_id": 5, "field_name": "send_sms", "data_column": "send_sms", "order_index": 8}, {"label": "Send Push", "type_id": 5, "field_name": "send_push", "data_column": "send_push", "order_index": 9}]	none	\N	f	\N	f	2025-10-05 06:39:29.034867+00
75	\N	\N	\N	Risk Assessment	Record assessment administrative info	risk_assessments	\N	1	grid	[{"label": "Type", "type_id": 4, "field_name": "risk_assessment_type_id", "data_column": "risk_assessment_type_id", "order_index": 1, "options_table": "risk_assessment_types", "options_label_column": "name", "options_value_column": "id"}, {"label": "Location", "type_id": 4, "field_name": "location", "data_column": "location", "order_index": 2, "options_table": "locations", "options_label_column": "name", "options_value_column": "name"}]	none	\N	f	\N	f	2025-10-05 06:39:29.04136+00
76	\N	\N	\N	Risk Assessment Hazard	Identify hazards and controls	risk_assessment_hazards	\N	1	grid	[{"label": "Hazard Description", "type_id": 7, "field_name": "hazard_description", "data_column": "hazard_description", "order_index": 1}, {"label": "Who Might Be Harmed", "type_id": 1, "field_name": "who_might_be_harmed", "data_column": "who_might_be_harmed", "order_index": 2}, {"label": "Existing Controls", "type_id": 7, "field_name": "existing_control_measures", "data_column": "existing_control_measures", "order_index": 3}, {"label": "Risk Rating Before", "type_id": 2, "field_name": "risk_rating_before", "data_column": "risk_rating_before", "order_index": 4}, {"label": "Additional Controls", "type_id": 7, "field_name": "additional_controls", "data_column": "additional_controls", "order_index": 5}, {"label": "Residual Risk", "type_id": 2, "field_name": "residual_risk_rating", "data_column": "residual_risk_rating", "order_index": 6}, {"label": "Responsible Person", "type_id": 1, "field_name": "responsible_person", "data_column": "responsible_person", "order_index": 7}]	none	\N	f	\N	f	2025-10-05 06:39:29.045139+00
77	\N	\N	\N	Risk Assessment PPE	Personal protective equipment checklist	risk_assessment_ppe	\N	1	grid	[{"label": "Checklist Item", "type_id": 1, "field_name": "checklist_item", "data_column": "checklist_item", "order_index": 1}]	none	\N	f	\N	f	2025-10-05 06:39:29.047206+00
78	\N	\N	\N	Risk Assessment Sign-off	Record assessment approvals	risk_assessment_signoffs	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Position", "type_id": 1, "field_name": "position", "data_column": "position", "order_index": 2}, {"label": "Signature", "type_id": 7, "field_name": "signature", "data_column": "signature", "order_index": 3}, {"label": "Signed At", "type_id": 3, "field_name": "signed_at", "data_column": "signed_at", "order_index": 4}]	none	\N	f	\N	f	2025-10-05 06:39:29.048945+00
80	\N	\N	\N	Risk Identification	Identify risks	risk_identifications	\N	1	grid	[{"label": "Risk Description", "type_id": 7, "field_name": "risk_description", "data_column": "risk_description", "order_index": 1}, {"label": "Risk category", "type_id": 4, "field_name": "risk_category_id", "data_column": "risk_category_id", "order_index": 2, "options_table": "risk_categories", "options_label_column": "name", "options_value_column": "id"}, {"label": "Root Cause", "type_id": 1, "field_name": "root_cause", "data_column": "root_cause", "order_index": 3}, {"label": "Likelihood", "options": [{"value": "1", "display_text": "1"}, {"value": "2", "display_text": "2"}, {"value": "3", "display_text": "3"}, {"value": "4", "display_text": "4"}, {"value": "5", "display_text": "5"}], "type_id": 4, "field_name": "likelihood", "data_column": "likelihood", "order_index": 4}, {"label": "Impact", "options": [{"value": "1", "display_text": "1"}, {"value": "2", "display_text": "2"}, {"value": "3", "display_text": "3"}, {"value": "4", "display_text": "4"}, {"value": "5", "display_text": "5"}], "type_id": 4, "field_name": "impact", "data_column": "impact", "order_index": 5}, {"label": "Current Controls", "type_id": 7, "field_name": "current_controls", "data_column": "current_controls", "order_index": 6}]	none	\N	f	\N	f	2025-10-05 06:39:29.054386+00
79	\N	\N	\N	Risk Category	Risk classification	risk_categories	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Description", "type_id": 7, "field_name": "description", "data_column": "description", "order_index": 2}]	none	\N	f	\N	f	2025-10-05 06:39:29.060029+00
81	\N	\N	\N	Calendar Category	Manage calendar categories	calendar_categories	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Description", "type_id": 7, "field_name": "description", "data_column": "description", "order_index": 2}]	none	\N	f	\N	f	2025-10-05 06:39:29.062117+00
82	\N	\N	\N	Incident Status	Manage incident status options	ohs_incident_statuses	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Purpose", "type_id": 7, "field_name": "purpose", "data_column": "purpose", "order_index": 2}]	none	\N	f	\N	f	2025-10-05 06:39:29.063913+00
83	\N	\N	\N	Five Whys	Record Five Whys analysis	ohs_five_whys	\N	1	grid	[{"label": "Incident", "type_id": 4, "field_name": "incident_id", "data_column": "incident_id", "order_index": 1, "options_table": "ohs_incidents", "options_label_column": "id", "options_value_column": "id"}, {"label": "Why 1", "type_id": 1, "field_name": "why1", "json_column": "whys", "order_index": 2}, {"label": "Why 2", "type_id": 1, "field_name": "why2", "json_column": "whys", "order_index": 3}, {"label": "Why 3", "type_id": 1, "field_name": "why3", "json_column": "whys", "order_index": 4}, {"label": "Why 4", "type_id": 1, "field_name": "why4", "json_column": "whys", "order_index": 5}, {"label": "Why 5", "type_id": 1, "field_name": "why5", "json_column": "whys", "order_index": 6}]	none	\N	f	\N	f	2025-10-05 06:39:29.06588+00
85	\N	\N	\N	Water Treatment Plant Risk Assessment	Assessment of operational and chemical risks in treatment facilities	risk_assessments	\N	1	grid	[{"type_id": 1, "field_name": "risk_assessment_type_id", "data_column": "risk_assessment_type_id", "order_index": 0}, {"label": "Title", "type_id": 1, "field_name": "title", "data_column": "title", "order_index": 1}, {"label": "Assessment Date", "type_id": 3, "field_name": "assessment_date", "data_column": "assessment_date", "order_index": 2}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Assessor Names", "type_id": 1, "field_name": "assessor_names", "json_column": "form_data", "order_index": 4}, {"label": "Review Date", "type_id": 3, "field_name": "review_date", "data_column": "review_date", "order_index": 5}, {"label": "Approver", "type_id": 1, "field_name": "approver_name", "json_column": "form_data", "order_index": 6}, {"label": "Work Description", "type_id": 7, "field_name": "work_description", "json_column": "form_data", "order_index": 7}, {"label": "Permit Requirements", "type_id": 7, "field_name": "permit_requirements", "json_column": "form_data", "order_index": 8}, {"label": "Chemical Used", "type_id": 1, "field_name": "chemical", "json_column": "form_data", "order_index": 9}, {"label": "Hazard Identified", "type_id": 7, "field_name": "hazard", "json_column": "form_data", "order_index": 10}, {"label": "Risk Rating", "type_id": 2, "field_name": "risk_rating", "json_column": "form_data", "order_index": 11}, {"label": "Control Measures", "type_id": 7, "field_name": "controls", "json_column": "form_data", "order_index": 12}]	none	\N	f	\N	f	2025-10-05 06:39:29.072251+00
86	\N	\N	\N	Pipeline & Infrastructure Risk Assessment	Evaluation of potential failure points across distribution infrastructure	risk_assessments	\N	1	grid	[{"type_id": 1, "field_name": "risk_assessment_type_id", "data_column": "risk_assessment_type_id", "order_index": 0}, {"label": "Title", "type_id": 1, "field_name": "title", "data_column": "title", "order_index": 1}, {"label": "Assessment Date", "type_id": 3, "field_name": "assessment_date", "data_column": "assessment_date", "order_index": 2}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Assessor Names", "type_id": 1, "field_name": "assessor_names", "json_column": "form_data", "order_index": 4}, {"label": "Review Date", "type_id": 3, "field_name": "review_date", "data_column": "review_date", "order_index": 5}, {"label": "Approver", "type_id": 1, "field_name": "approver_name", "json_column": "form_data", "order_index": 6}, {"label": "Work Description", "type_id": 7, "field_name": "work_description", "json_column": "form_data", "order_index": 7}, {"label": "Permit Requirements", "type_id": 7, "field_name": "permit_requirements", "json_column": "form_data", "order_index": 8}, {"label": "Pipe Segment", "type_id": 1, "field_name": "pipe_segment", "json_column": "form_data", "order_index": 9}, {"label": "Material Type", "type_id": 1, "field_name": "material", "json_column": "form_data", "order_index": 10}, {"label": "Identified Risk", "type_id": 7, "field_name": "risk", "json_column": "form_data", "order_index": 11}, {"label": "Failure Likelihood", "type_id": 2, "field_name": "likelihood", "json_column": "form_data", "order_index": 12}, {"label": "Mitigation Action", "type_id": 7, "field_name": "action", "json_column": "form_data", "order_index": 13}]	none	\N	f	\N	f	2025-10-05 06:39:29.074318+00
87	\N	\N	\N	Environmental and Climate Risk Assessment	Assesses environmental vulnerabilities to water supply and treatment	risk_assessments	\N	1	grid	[{"type_id": 1, "field_name": "risk_assessment_type_id", "data_column": "risk_assessment_type_id", "order_index": 0}, {"label": "Title", "type_id": 1, "field_name": "title", "data_column": "title", "order_index": 1}, {"label": "Assessment Date", "type_id": 3, "field_name": "assessment_date", "data_column": "assessment_date", "order_index": 2}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Assessor Names", "type_id": 1, "field_name": "assessor_names", "json_column": "form_data", "order_index": 4}, {"label": "Review Date", "type_id": 3, "field_name": "review_date", "data_column": "review_date", "order_index": 5}, {"label": "Approver", "type_id": 1, "field_name": "approver_name", "json_column": "form_data", "order_index": 6}, {"label": "Work Description", "type_id": 7, "field_name": "work_description", "json_column": "form_data", "order_index": 7}, {"label": "Permit Requirements", "type_id": 7, "field_name": "permit_requirements", "json_column": "form_data", "order_index": 8}, {"label": "Area Assessed", "type_id": 1, "field_name": "area", "json_column": "form_data", "order_index": 9}, {"label": "Environmental Risk", "type_id": 7, "field_name": "env_risk", "json_column": "form_data", "order_index": 10}, {"label": "Climate Trigger", "type_id": 1, "field_name": "trigger", "json_column": "form_data", "order_index": 11}, {"label": "Severity", "type_id": 2, "field_name": "severity", "json_column": "form_data", "order_index": 12}, {"label": "Control Plan", "type_id": 7, "field_name": "plan", "json_column": "form_data", "order_index": 13}]	none	\N	f	\N	f	2025-10-05 06:39:29.076555+00
88	\N	\N	\N	Occupational Health & Safety Risk Assessment	OHS-focused hazard evaluation in operational areas and fieldwork	risk_assessments	\N	1	grid	[{"type_id": 1, "field_name": "risk_assessment_type_id", "data_column": "risk_assessment_type_id", "order_index": 0}, {"label": "Title", "type_id": 1, "field_name": "title", "data_column": "title", "order_index": 1}, {"label": "Assessment Date", "type_id": 3, "field_name": "assessment_date", "data_column": "assessment_date", "order_index": 2}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Assessor Names", "type_id": 1, "field_name": "assessor_names", "json_column": "form_data", "order_index": 4}, {"label": "Review Date", "type_id": 3, "field_name": "review_date", "data_column": "review_date", "order_index": 5}, {"label": "Approver", "type_id": 1, "field_name": "approver_name", "json_column": "form_data", "order_index": 6}, {"label": "Work Description", "type_id": 7, "field_name": "work_description", "json_column": "form_data", "order_index": 7}, {"label": "Permit Requirements", "type_id": 7, "field_name": "permit_requirements", "json_column": "form_data", "order_index": 8}, {"label": "Job Task", "type_id": 1, "field_name": "task", "json_column": "form_data", "order_index": 9}, {"label": "Identified Hazard", "type_id": 7, "field_name": "hazard", "json_column": "form_data", "order_index": 10}, {"label": "Risk Level", "type_id": 2, "field_name": "risk_level", "json_column": "form_data", "order_index": 11}, {"label": "PPE Required", "type_id": 1, "field_name": "ppe", "json_column": "form_data", "order_index": 12}, {"label": "First Aid Measures", "type_id": 7, "field_name": "first_aid", "json_column": "form_data", "order_index": 13}]	none	\N	f	\N	f	2025-10-05 06:39:29.078714+00
89	\N	\N	\N	Cybersecurity & SCADA Risk Assessment	Review of IT security and SCADA operational risk vulnerabilities	risk_assessments	\N	1	grid	[{"type_id": 1, "field_name": "risk_assessment_type_id", "data_column": "risk_assessment_type_id", "order_index": 0}, {"label": "Title", "type_id": 1, "field_name": "title", "data_column": "title", "order_index": 1}, {"label": "Assessment Date", "type_id": 3, "field_name": "assessment_date", "data_column": "assessment_date", "order_index": 2}, {"label": "Location", "type_id": 1, "field_name": "location", "data_column": "location", "order_index": 3}, {"label": "Assessor Names", "type_id": 1, "field_name": "assessor_names", "json_column": "form_data", "order_index": 4}, {"label": "Review Date", "type_id": 3, "field_name": "review_date", "data_column": "review_date", "order_index": 5}, {"label": "Approver", "type_id": 1, "field_name": "approver_name", "json_column": "form_data", "order_index": 6}, {"label": "Work Description", "type_id": 7, "field_name": "work_description", "json_column": "form_data", "order_index": 7}, {"label": "Permit Requirements", "type_id": 7, "field_name": "permit_requirements", "json_column": "form_data", "order_index": 8}, {"label": "System/Module", "type_id": 1, "field_name": "system", "json_column": "form_data", "order_index": 9}, {"label": "Threat Type", "type_id": 1, "field_name": "threat", "json_column": "form_data", "order_index": 10}, {"label": "Vulnerability Description", "type_id": 7, "field_name": "vuln", "json_column": "form_data", "order_index": 11}, {"label": "Impact Rating", "type_id": 2, "field_name": "impact", "json_column": "form_data", "order_index": 12}, {"label": "Mitigation Strategy", "type_id": 7, "field_name": "strategy", "json_column": "form_data", "order_index": 13}]	none	\N	f	\N	f	2025-10-05 06:39:29.080903+00
103	\N	\N	\N	WorkCOM Inspection Start	Select inspection type and workplace	workcom_inspections	\N	1	grid	[{"label": "Workplace", "type_id": 4, "field_name": "workplace_id", "data_column": "workplace_id", "order_index": 1, "options_table": "workplace_registrations", "options_label_column": "company_name", "options_value_column": "id"}, {"label": "Inspection Request", "type_id": 4, "field_name": "inspection_request_id", "data_column": "inspection_request_id", "order_index": 2, "options_table": "inspection_requests", "options_label_column": "id", "options_value_column": "id"}, {"label": "Inspection Type", "type_id": 4, "field_name": "workcom_inspection_type_id", "data_column": "inspection_type_id", "order_index": 3, "options_table": "workcom_inspection_types", "options_label_column": "name", "options_value_column": "id"}]	none	\N	f	\N	f	2025-10-05 06:39:29.094051+00
106	\N	\N	\N	Workplace Registration	Record new workplaces	workplace_registrations	\N	1	grid	[{"label": "Name of owner(s) of business", "type_id": 16, "field_name": "name_of_owners_of_business", "order_index": 0, "placeholder": "Name of owner(s) of business:"}, {"label": "Trading name", "type_id": 1, "field_name": "trading_name", "order_index": 1, "placeholder": "Trading name"}, {"label": "Address of workplace", "type_id": 1, "field_name": "address_of_workplace", "order_index": 2, "placeholder": "Address of workplace"}, {"label": "Postal address", "type_id": 1, "field_name": "postal_address", "order_index": 3, "placeholder": "Postal address"}, {"label": "Date of business commenced operations at these premises", "type_id": 3, "field_name": "date_of_business_commenced_operations_at_these_premises", "order_index": 4, "placeholder": "Date of business commenced operations at these premises"}, {"label": "Details of ownership of premises", "type_id": 8, "field_name": "details_of_ownership_of_premises", "order_index": 5, "placeholder": "Details of ownership of premises"}, {"label": "Name & address of Owner of the Building:", "type_id": 1, "field_name": "name_and_address_of_owner_of_the_building", "order_index": 6, "placeholder": "Name & address of Owner of the Building"}, {"label": "Details of business activity: (Refer to First Schedule)", "type_id": 8, "field_name": "details_of_business_activiy", "order_index": 7, "placeholder": "Details of business activity"}, {"label": "Main Activity Conducted by Business", "type_id": 1, "field_name": "main_activity_conducted_by_business", "order_index": 8, "placeholder": "Main Activity Conducted by Business"}, {"label": "Principal Articles to be manufactured repaired or sold", "type_id": 1, "field_name": "principal_articles_to_be_manufactured_repaired_or_sold", "order_index": 9, "placeholder": "Principal Articles to be manufactured repaired or sold"}, {"label": "Are goods sold at this location:", "type_id": 5, "field_name": "goods_sold", "order_index": 10, "placeholder": ""}, {"label": "Sales Type", "options": [{"value": "wholesale", "display_text": "Wholesale"}, {"value": "retail", "display_text": "Retail"}, {"value": "both", "display_text": "Both"}], "type_id": 4, "field_name": "sales_type", "order_index": 11, "condition_field": "goods_sold", "condition_value": "1"}, {"label": "Has Site Previously been used as a workplace", "type_id": 1, "field_name": "has_site_previously_been_used_as_a_workplace", "order_index": 12, "placeholder": "Has Site Previously been used as a workplace"}, {"label": "Name of previous Occupier", "type_id": 1, "field_name": "name_of_previous_occupier", "order_index": 13, "placeholder": "Name of previous Occupier"}, {"label": "Contact telephone number", "type_id": 2, "field_name": "contact_telephone_number", "order_index": 14, "placeholder": "Contact telephone number"}, {"label": "Maximum Number of Employees", "type_id": 2, "field_name": "maximum_number_of_employees", "order_index": 14, "placeholder": "Maximum Number of Employees"}, {"label": "Committee Members", "type_id": 8, "field_name": "committee_members", "order_index": 14, "placeholder": "Committee Members"}, {"label": "Training Undergone", "type_id": 5, "field_name": "training_undergone", "order_index": 14, "placeholder": "Training Undergone"}, {"label": "Districts", "type_id": 4, "field_name": "districts", "order_index": 14, "placeholder": "Districts", "options_table": "districts", "options_label_column": "name", "options_value_column": "id"}, {"label": "OHS Policy", "type_id": 9, "field_name": "ohs_policy", "order_index": 14, "placeholder": "OHS Policy"}, {"label": "Meeting Minutes", "type_id": 9, "field_name": "minutes", "order_index": 14, "placeholder": "Meeting Minutes"}]	none	\N	f	\N	f	2025-10-05 06:39:29.134177+00
110	\N	\N	\N	Vendor	Manage Vendors	vendors	\N	1	grid	[{"label": "Vendor Name", "type_id": 1, "field_name": "vendorname", "data_column": "vendorname", "order_index": 1}, {"label": "Business Registration Number", "type_id": 1, "field_name": "businessRegNumber", "data_column": "businessRegNumber", "order_index": 2}, {"label": "TIN Number", "type_id": 1, "field_name": "tin", "data_column": "tin", "order_index": 3}, {"label": "Phone Numbers", "type_id": 16, "multiple": true, "field_name": "phone_numbers", "order_index": 4, "options_table": "vendor_phone_numbers", "options_label_column": "phone_number", "options_value_column": "vendor_phone_id"}, {"label": "Emails", "type_id": 16, "multiple": true, "field_name": "emails", "order_index": 5, "options_table": "vendor_emails", "options_label_column": "email", "options_value_column": "vendor_email_id"}]	none	\N	f	\N	f	2025-10-05 06:39:29.152828+00
620	\N	\N	\N	RFQ Template	Define reusable RFQ templates	rfq_templates	\N	1	grid	[{"label": "Template Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Template Code", "type_id": 1, "field_name": "code", "data_column": "code", "order_index": 2, "placeholder": "Optional short code"}, {"label": "Category", "type_id": 1, "field_name": "category", "data_column": "category", "order_index": 3}, {"label": "Default Template", "type_id": 5, "field_name": "is_default", "data_column": "is_default", "order_index": 4}, {"label": "Valid From", "type_id": 3, "field_name": "valid_from", "data_column": "valid_from", "order_index": 5}, {"label": "Valid Until", "type_id": 3, "field_name": "valid_until", "data_column": "valid_until", "order_index": 6}, {"label": "Distribution Channels", "type_id": 8, "field_name": "distribution_channels", "data_column": "distribution_channels", "order_index": 7, "placeholder": "Comma separated, e.g. email,portal"}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 8}]	none	\N	f	\N	f	2025-10-05 06:39:29.159039+00
621	\N	\N	\N	RFQ Template Section	Manage RFQ template sections	rfq_template_sections	\N	1	grid	[{"label": "Template", "type_id": 13, "required": true, "field_name": "rfq_template_id", "data_column": "rfq_template_id", "order_index": 1, "options_table": "rfq_templates", "options_label_column": "name", "options_value_column": "rfq_template_id"}, {"label": "Section Key", "type_id": 1, "field_name": "section_key", "data_column": "section_key", "order_index": 2, "placeholder": "e.g. scope,terms,pricing"}, {"label": "Heading", "type_id": 1, "field_name": "heading", "data_column": "heading", "order_index": 3}, {"label": "Body (Markdown)", "type_id": 8, "field_name": "body_markdown", "data_column": "body_markdown", "order_index": 4}, {"label": "Body (HTML)", "type_id": 8, "field_name": "body_html", "data_column": "body_html", "order_index": 5}, {"label": "Display Order", "type_id": 2, "field_name": "sort_order", "data_column": "sort_order", "order_index": 6}, {"label": "Required", "type_id": 5, "field_name": "is_required", "data_column": "is_required", "order_index": 7}, {"label": "Include In Printed PDF", "type_id": 5, "field_name": "include_in_print", "data_column": "include_in_print", "order_index": 8}, {"label": "Include In Email", "type_id": 5, "field_name": "include_in_email", "data_column": "include_in_email", "order_index": 9}]	none	\N	f	\N	f	2025-10-05 06:39:29.16123+00
622	\N	\N	\N	RFQ Template Attachment	Attach standard files to RFQ templates	rfq_template_attachments	\N	1	grid	[{"label": "Template", "type_id": 13, "required": true, "field_name": "rfq_template_id", "data_column": "rfq_template_id", "order_index": 1, "options_table": "rfq_templates", "options_label_column": "name", "options_value_column": "rfq_template_id"}, {"label": "Label", "type_id": 1, "field_name": "label", "data_column": "label", "order_index": 2}, {"label": "File Type", "type_id": 1, "field_name": "filetype", "data_column": "filetype", "order_index": 3, "placeholder": "e.g. pdf,docx"}, {"label": "File URL", "type_id": 7, "field_name": "file_url", "data_column": "file_url", "order_index": 4}, {"label": "Include When", "options": [{"label": "Always", "value": "always"}, {"label": "Awarded", "value": "awarded"}, {"label": "Pre-Issuance", "value": "pre_issuance"}], "type_id": 4, "field_name": "include_when", "data_column": "include_when", "order_index": 5}, {"label": "Sort Order", "type_id": 2, "field_name": "sort_order", "data_column": "sort_order", "order_index": 6}]	none	\N	f	\N	f	2025-10-05 06:39:29.163147+00
610	\N	\N	\N	Vendor Contact	Capture vendor contact records	vendor_contacts	\N	1	grid	[{"label": "Vendor", "type_id": 17, "field_name": "vendor_id", "data_column": "vendor_id", "order_index": 1, "options_table": "vendors", "options_label_column": "vendorname", "options_value_column": "vendor_id"}, {"label": "Contact Name", "type_id": 1, "field_name": "contact_name", "data_column": "contact_name", "order_index": 2}, {"label": "Role", "type_id": 1, "field_name": "contact_role", "data_column": "contact_role", "order_index": 3}, {"label": "Email", "type_id": 1, "field_name": "email", "data_column": "email", "order_index": 4}, {"label": "Phone Number", "type_id": 1, "field_name": "phone_number", "data_column": "phone_number", "order_index": 5}, {"label": "Primary Contact", "type_id": 5, "field_name": "is_primary", "data_column": "is_primary", "order_index": 6}, {"label": "Notes", "type_id": 8, "field_name": "notes", "data_column": "notes", "order_index": 7}]	none	\N	f	\N	f	2025-10-05 06:39:29.1651+00
611	\N	\N	\N	Vendor Address	Manage vendor address records	vendor_addresses	\N	1	grid	[{"label": "Vendor", "type_id": 17, "field_name": "vendor_id", "data_column": "vendor_id", "order_index": 1, "options_table": "vendors", "options_label_column": "vendorname", "options_value_column": "vendor_id"}, {"label": "Address Type", "options": [{"value": "office", "display_text": "Office"}, {"value": "billing", "display_text": "Billing"}, {"value": "shipping", "display_text": "Shipping"}, {"value": "registered", "display_text": "Registered"}, {"value": "other", "display_text": "Other"}], "type_id": 4, "field_name": "address_type", "data_column": "address_type", "order_index": 2}, {"label": "Address Line 1", "type_id": 1, "field_name": "line1", "data_column": "line1", "order_index": 3}, {"label": "Address Line 2", "type_id": 1, "field_name": "line2", "data_column": "line2", "order_index": 4}, {"label": "City", "type_id": 1, "field_name": "city", "data_column": "city", "order_index": 5}, {"label": "State / Region", "type_id": 1, "field_name": "state_region", "data_column": "state_region", "order_index": 6}, {"label": "Postal Code", "type_id": 1, "field_name": "postal_code", "data_column": "postal_code", "order_index": 7}, {"label": "Country", "type_id": 1, "field_name": "country_code", "data_column": "country_code", "order_index": 8}, {"label": "Primary Address", "type_id": 5, "field_name": "is_primary", "data_column": "is_primary", "order_index": 9}]	none	\N	f	\N	f	2025-10-05 06:39:29.167387+00
612	\N	\N	\N	Vendor Capability	Track vendor capabilities and experience	vendor_capabilities	\N	1	grid	[{"label": "Vendor", "type_id": 4, "field_name": "vendor_id", "data_column": "vendor_id", "order_index": 1, "options_table": "vendors", "options_label_column": "vendorname", "options_value_column": "vendor_id"}, {"label": "Capability Category", "type_id": 1, "field_name": "capability_category", "data_column": "capability_category", "order_index": 2}, {"label": "Capability Description", "type_id": 8, "field_name": "capability_description", "data_column": "capability_description", "order_index": 3}, {"label": "Experience (Years)", "type_id": 2, "field_name": "experience_years", "data_column": "experience_years", "order_index": 4}, {"label": "Certifications", "type_id": 8, "field_name": "certifications", "data_column": "certifications", "order_index": 5}, {"label": "Capacity Notes", "type_id": 8, "field_name": "capacity_notes", "data_column": "capacity_notes", "order_index": 6}, {"label": "Competency Score", "type_id": 2, "field_name": "competency_score", "data_column": "competency_score", "order_index": 7}]	none	\N	f	\N	f	2025-10-05 06:39:29.169404+00
613	\N	\N	\N	Vendor Documents	Collect required compliance documents for vendor onboarding	vendor_documents	\N	1	grid	[{"label": "Vendor", "type_id": 17, "field_name": "vendor_id", "data_column": "vendor_id", "order_index": 1, "options_table": "vendors", "options_label_column": "vendorname", "options_value_column": "vendor_id"}, {"label": "FNPF Compliance Document", "type_id": 9, "doc_type": "fnpf_compliance", "doc_field": "file_url", "field_name": "fnpf_document", "order_index": 2, "widget_options": {"maxFiles": 1}}, {"label": "FNPF Compliance Expiry Date", "type_id": 3, "doc_type": "fnpf_compliance", "doc_field": "validity", "field_name": "fnpf_validity", "order_index": 3}, {"label": "FRCS VAT Clearance Certificate", "type_id": 9, "doc_type": "frcs_vat_clearance", "doc_field": "file_url", "field_name": "frcs_vat_document", "order_index": 4, "widget_options": {"maxFiles": 1}}, {"label": "FRCS VAT Clearance Expiry Date", "type_id": 3, "doc_type": "frcs_vat_clearance", "doc_field": "validity", "field_name": "frcs_vat_validity", "order_index": 5}, {"label": "FRCS Tax Clearance Certificate", "type_id": 9, "doc_type": "frcs_tax_clearance", "doc_field": "file_url", "field_name": "frcs_tax_document", "order_index": 6, "widget_options": {"maxFiles": 1}}, {"label": "FRCS Tax Clearance Expiry Date", "type_id": 3, "doc_type": "frcs_tax_clearance", "doc_field": "validity", "field_name": "frcs_tax_validity", "order_index": 7}, {"label": "FNU Levy Confirmation", "type_id": 9, "doc_type": "fnu_levy", "doc_field": "file_url", "field_name": "fnu_levy_document", "order_index": 8, "widget_options": {"maxFiles": 1}}, {"label": "FNU Levy Expiry Date", "type_id": 3, "doc_type": "fnu_levy", "doc_field": "validity", "field_name": "fnu_levy_validity", "order_index": 9}, {"label": "Business Registration Document", "type_id": 9, "doc_type": "business_registration", "doc_field": "file_url", "field_name": "business_registration_document", "order_index": 10, "widget_options": {"maxFiles": 1}}, {"label": "Business Registration Expiry Date", "type_id": 3, "doc_type": "business_registration", "doc_field": "validity", "field_name": "business_registration_validity", "order_index": 11}]	none	\N	f	\N	f	2025-10-05 06:39:29.171449+00
614	\N	\N	\N	Vendor Supporting Document	Track additional vendor supporting materials	vendor_supporting_docs	\N	1	grid	[{"label": "Vendor", "type_id": 4, "field_name": "vendor_id", "data_column": "vendor_id", "order_index": 1, "options_table": "vendors", "options_label_column": "vendorname", "options_value_column": "vendor_id"}, {"label": "Document Category", "options": [{"value": "questionnaire", "display_text": "Questionnaire"}, {"value": "financial", "display_text": "Financial"}, {"value": "insurance", "display_text": "Insurance"}, {"value": "policy", "display_text": "Policy"}, {"value": "other", "display_text": "Other"}], "type_id": 4, "field_name": "type", "data_column": "type", "order_index": 2}, {"label": "File Type", "type_id": 1, "field_name": "filetype", "data_column": "filetype", "order_index": 3}, {"label": "File URL", "type_id": 9, "field_name": "file_url", "data_column": "file_url", "order_index": 4}, {"label": "Validity", "type_id": 3, "field_name": "validity", "data_column": "validity", "order_index": 5}]	none	\N	f	\N	f	2025-10-05 06:39:29.173707+00
615	\N	\N	\N	Vendor Performance Metric	Log vendor performance reviews	vendor_performance_metrics	\N	1	grid	[{"label": "Vendor", "type_id": 4, "field_name": "vendor_id", "data_column": "vendor_id", "order_index": 1, "options_table": "vendors", "options_label_column": "vendorname", "options_value_column": "vendor_id"}, {"label": "Period Start", "type_id": 3, "field_name": "period_start", "data_column": "period_start", "order_index": 2}, {"label": "Period End", "type_id": 3, "field_name": "period_end", "data_column": "period_end", "order_index": 3}, {"label": "KPI Name", "type_id": 1, "field_name": "kpi_name", "data_column": "kpi_name", "order_index": 4}, {"label": "KPI Value", "type_id": 2, "field_name": "kpi_value", "data_column": "kpi_value", "order_index": 5}, {"label": "Rating", "type_id": 2, "field_name": "rating", "data_column": "rating", "order_index": 6}, {"label": "Reviewer", "type_id": 4, "field_name": "reviewer_id", "data_column": "reviewer_id", "order_index": 7, "options_table": "users", "options_label_column": "full_name", "options_value_column": "user_id"}, {"label": "Comments", "type_id": 8, "field_name": "comments", "data_column": "comments", "order_index": 8}]	none	\N	f	\N	f	2025-10-05 06:39:29.175727+00
616	\N	\N	\N	Vendor Certificate	Maintain vendor certification records	vendor_certificates	\N	1	grid	[{"label": "Vendor", "type_id": 4, "field_name": "vendor_id", "data_column": "vendor_id", "order_index": 1, "options_table": "vendors", "options_label_column": "vendorname", "options_value_column": "vendor_id"}, {"label": "Certificate Name", "type_id": 1, "field_name": "certificate_name", "data_column": "certificate_name", "order_index": 2}, {"label": "Issued At", "type_id": 3, "field_name": "issued_at", "data_column": "issued_at", "order_index": 3}, {"label": "Expiry Date", "type_id": 3, "field_name": "expiry_date", "data_column": "expiry_date", "order_index": 4}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 5}]	none	\N	f	\N	f	2025-10-05 06:39:29.177964+00
109	\N	\N	\N	Customer	Manage customer information	customers	\N	1	grid	[{"label": "Customer Type", "options": [{"value": "individual", "display_text": "Individual"}, {"value": "corporate", "display_text": "Corporate"}, {"value": "government", "display_text": "Government"}], "type_id": 4, "field_name": "customer_type", "data_column": "customer_type", "order_index": 1}, {"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 2}, {"label": "Email", "type_id": 1, "field_name": "email", "data_column": "email", "order_index": 3}, {"label": "Phone Number", "type_id": 1, "field_name": "phone_number", "data_column": "phone_number", "order_index": 4}, {"label": "Address", "type_id": 1, "field_name": "address", "data_column": "address", "order_index": 5}, {"label": "TIN", "type_id": 1, "field_name": "tin", "data_column": "tin", "order_index": 6}, {"label": "Risk Rating", "options": [{"value": "low", "display_text": "Low"}, {"value": "medium", "display_text": "Medium"}, {"value": "high", "display_text": "High"}], "type_id": 4, "field_name": "risk_rating", "data_column": "risk_rating", "order_index": 7}, {"label": "Compliance Status", "options": [{"value": "compliant", "display_text": "Compliant"}, {"value": "non-compliant", "display_text": "Non-Compliant"}, {"value": "pending", "display_text": "Pending"}], "type_id": 4, "field_name": "compliance_status", "data_column": "compliance_status", "order_index": 8}]	none	\N	f	\N	f	2025-10-05 06:39:29.180244+00
121	\N	\N	\N	Department	Manage organizational departments	departments	\N	1	grid	[{"label": "Department", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 2}]	none	\N	f	\N	f	2025-10-05 06:39:29.182378+00
111	\N	\N	\N	Product	Manage Products	products	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 2}, {"label": "Price", "type_id": 1, "field_name": "price", "data_column": "price", "order_index": 3}, {"label": "Barcode (GTIN)", "type_id": 1, "field_name": "barcode", "data_column": "barcode", "order_index": 4}, {"label": "Product Number", "type_id": 1, "field_name": "product_number", "data_column": "product_number", "order_index": 5}, {"label": "Brand", "type_id": 1, "field_name": "brand", "data_column": "brand", "order_index": 6}, {"label": "Category", "type_id": 13, "required": true, "field_name": "category_id", "data_column": "category_id", "order_index": 7, "options_table": "product_categories", "options_label_column": "name", "options_value_column": "category_id"}, {"label": "VAT", "options": [{"value": "G", "display_text": "12.5%"}, {"value": "A", "display_text": "0%"}], "type_id": 4, "field_name": "vat", "json_column": "tax_rates", "order_index": 8}, {"label": "STT", "options": [{"value": "", "display_text": "Not Applicable"}, {"value": "E", "display_text": "6%"}], "type_id": 4, "field_name": "stt", "json_column": "tax_rates", "order_index": 9}, {"label": "Size", "type_id": 1, "field_name": "size", "data_column": "size", "order_index": 10}]	none	\N	f	\N	f	2025-10-05 06:39:29.195063+00
131	\N	\N	\N	Auto Order	Manage Auto Orders for Products	auto_orders	\N	1	grid	[{"label": "Product", "type_id": 13, "field_name": "product_id", "data_column": "product_id", "order_index": 1, "options_table": "products", "options_label_column": "name", "options_value_column": "product_id"}, {"label": "Minimum Stock Qty", "type_id": 2, "field_name": "minimum_stock_qty", "data_column": "minimum_stock_qty", "order_index": 2}, {"label": "Order Qty", "type_id": 2, "field_name": "order_qty", "data_column": "order_qty", "order_index": 3}]	none	\N	f	\N	f	2025-10-05 06:39:29.197199+00
112	\N	\N	\N	Software Info	Software Information	software_info	\N	1	grid	[{"label": "Manufacturer Name", "type_id": 1, "field_name": "manufacturer_name", "data_column": "manufacturer_name", "order_index": 1, "default_value": "Cybex PTE Limited."}, {"label": "Serial Number", "type_id": 1, "field_name": "serial_number", "data_column": "serial_number", "order_index": 2, "default_value": "CYBEXPTE-ERP-2025-001."}, {"label": "Software Version", "type_id": 1, "field_name": "software_version", "data_column": "software_version", "order_index": 3, "default_value": "2025.08"}]	none	\N	f	\N	f	2025-10-05 06:39:29.199131+00
113	\N	\N	\N	POS Settings	Point of Sale Settings	pos_settings	\N	1	grid	[{"label": "Password", "type_id": 1, "field_name": "password", "data_column": "password", "order_index": 1, "default_value": "2CBP6HMW"}, {"label": "PIN", "type_id": 1, "field_name": "pin", "data_column": "pin", "order_index": 2, "default_value": "3840"}, {"label": "SDC Base URL", "type_id": 1, "field_name": "sdc_endpoint", "data_column": "sdc_endpoint", "order_index": 3, "placeholder": "http://devesdc.sandbox.vms.frcs.org.fj:8888/<tenant>/api"}, {"label": "SDC PIN URL", "type_id": 1, "field_name": "sdc_pin_url", "data_column": "sdc_pin_url", "order_index": 4, "placeholder": "http://devesdc.sandbox.vms.frcs.org.fj:8888/<tenant>/api/v3/pin"}]	none	\N	f	\N	f	2025-10-05 06:39:29.204748+00
114	\N	\N	\N	Restaurant Product	Manage Restaurant Products	products	\N	1	grid	[{"label": "Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 2}, {"label": "Quantity", "type_id": 1, "field_name": "quantity", "data_column": "quantity", "order_index": 3}, {"label": "Price", "type_id": 1, "field_name": "price", "data_column": "price", "order_index": 4}, {"label": "Barcode (GTIN)", "type_id": 1, "field_name": "barcode", "data_column": "barcode", "order_index": 5}, {"label": "Product Number", "type_id": 1, "field_name": "product_number", "data_column": "product_number", "order_index": 6}, {"label": "Brand", "type_id": 1, "field_name": "brand", "data_column": "brand", "order_index": 7}, {"label": "Size", "type_id": 1, "field_name": "size", "data_column": "size", "order_index": 8}, {"label": "Category", "type_id": 13, "field_name": "category_id", "data_column": "category_id", "order_index": 9, "options_table": "product_categories", "options_label_column": "name", "options_value_column": "category_id"}, {"label": "VAT", "options": [{"value": "G", "display_text": "12.5%"}, {"value": "A", "display_text": "0%"}], "type_id": 4, "field_name": "vat", "json_column": "tax_rates", "order_index": 11}, {"label": "STT", "options": [{"value": "", "display_text": "Not Applicable"}, {"value": "E", "display_text": "6%"}], "type_id": 4, "field_name": "stt", "json_column": "tax_rates", "order_index": 12}, {"label": "Ingredients", "columns": [{"name": "ingredient_id", "type": "select-search", "label": "Ingredient", "options_table": "ingredients", "options_label_column": "name", "options_value_column": "id"}, {"name": "quantity", "type": "number", "label": "Quantity"}, {"name": "units", "type": "select", "label": "Units", "options": [{"value": "pieces", "display_text": "Pieces"}, {"value": "kg", "display_text": "Kg"}, {"value": "grams", "display_text": "Grams"}, {"value": "liters", "display_text": "Liters"}, {"value": "ml", "display_text": "Ml"}]}], "type_id": 22, "field_name": "ingredients", "link_table": "ingredients_to_products", "order_index": 10, "link_columns": {"units": "unit", "quantity": "quantity", "product_id": "id", "ingredient_id": "ingredient_id"}}]	none	\N	f	\N	f	2025-10-05 06:39:29.206829+00
115	\N	\N	\N	Procurement	Manage procurement and L.P.O records	procurements	\N	1	grid	[{"label": "L.P.O Vendor", "type_id": 4, "field_name": "vendor_id", "data_column": "vendor_id", "order_index": 1, "options_table": "Vendors", "options_label_column": "vendorName", "options_value_column": "id"}, {"label": "Quotation Number", "type_id": 1, "field_name": "quotation_number", "data_column": "quotation_number", "order_index": 3}, {"label": "Invoice Number", "type_id": 1, "field_name": "invoice_number", "data_column": "invoice_number", "order_index": 4}, {"label": "Requested By Date", "type_id": 3, "field_name": "requested_by_date", "data_column": "requested_by_date", "order_index": 5}, {"label": "Product Barcode", "type_id": 1, "field_name": "product_barcode", "data_column": "product_barcode", "order_index": 2, "show_product_below": true}]	none	\N	f	\N	f	2025-10-05 06:39:29.20902+00
120	\N	\N	\N	Vendor Bank Account	Manage vendor bank account details	vendor_bank_accounts	\N	1	grid	[{"label": "Vendor", "type_id": 4, "field_name": "vendor_id", "data_column": "vendor_id", "order_index": 1, "options_table": "Vendors", "options_label_column": "vendorName", "options_value_column": "vendor_id"}, {"label": "Account Name", "type_id": 1, "field_name": "account_name", "data_column": "account_name", "order_index": 2}, {"label": "Account Number", "type_id": 1, "field_name": "account_number", "data_column": "account_number", "order_index": 3}, {"label": "Bank Name", "type_id": 1, "field_name": "bank_name", "data_column": "bank_name", "order_index": 4}, {"label": "IFSC/SWIFT Code", "type_id": 1, "field_name": "ifsc_swift", "data_column": "ifsc_swift", "order_index": 5}, {"label": "Branch", "type_id": 1, "field_name": "branch", "data_column": "branch", "order_index": 6}, {"label": "Account Type", "options": [{"value": "savings", "display_text": "Savings"}, {"value": "current", "display_text": "Current"}, {"value": "other", "display_text": "Other"}], "type_id": 4, "field_name": "account_type", "data_column": "account_type", "order_index": 7}, {"label": "Active", "type_id": 5, "field_name": "is_active", "data_column": "is_active", "order_index": 8}]	none	\N	f	\N	f	2025-10-05 06:39:29.211052+00
116	\N	\N	\N	Ingredients	Manage Ingredients	ingredients	\N	1	grid	[{"label": "Ingredient Name", "type_id": 1, "field_name": "name", "data_column": "name", "order_index": 1}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 2}, {"label": "Units", "options": [{"value": "pieces", "display_text": "Pieces"}, {"value": "kg", "display_text": "Kg"}, {"value": "grams", "display_text": "Grams"}, {"value": "liters", "display_text": "Liters"}, {"value": "ml", "display_text": "Ml"}], "type_id": 4, "field_name": "units", "data_column": "units", "order_index": 4}, {"label": "Quantity", "type_id": 1, "field_name": "quantity", "data_column": "quantity", "order_index": 3}, {"label": "Price", "type_id": 1, "field_name": "price", "data_column": "price", "order_index": 5}]	none	\N	f	\N	f	2025-10-05 06:39:29.213144+00
130	\N	\N	\N	Purchase Order	Form for creating and editing purchase orders	purchase_orders	\N	1	grid	[{"label": "Vendor", "type_id": 4, "field_name": "vendor_id", "data_column": "vendor_id", "order_index": 1, "options_table": "vendors", "options_label_column": "vendorname", "options_value_column": "vendor_id"}, {"label": "Order Date", "type_id": 3, "field_name": "order_date", "data_column": "order_date", "order_index": 2}, {"label": "Order Number", "type_id": 1, "field_name": "order_number", "data_column": "order_number", "order_index": 3}, {"label": "Products", "columns": [{"name": "product_barcode", "type": "select-search", "label": "Product", "options_table": "products", "show_selected_name": true, "options_label_column": "name", "options_value_column": "barcode"}, {"name": "quantity", "type": "number", "label": "Qty"}, {"name": "units", "type": "select", "label": "Units", "options": [{"value": "box", "display_text": "Box"}, {"value": "package", "display_text": "Package"}, {"value": "carton", "display_text": "Carton"}]}], "type_id": 22, "field_name": "products", "order_index": 6}]	none	\N	f	\N	f	2025-10-05 06:39:29.215094+00
132	\N	\N	\N	Product Discount	Manage product discounts with date ranges	product_discounts	\N	1	grid	[{"label": "Product", "default": "", "type_id": 1, "readonly": true, "field_name": "product_name", "order_index": 1}, {"hidden": true, "type_id": 1, "required": true, "field_name": "product_id", "data_column": "product_id", "order_index": 0}, {"label": "Discount Amount", "type_id": 2, "required": true, "field_name": "discount_amount", "data_column": "discount_amount", "order_index": 2, "placeholder": "Enter discount amount"}, {"label": "Start Date", "type_id": 3, "required": true, "field_name": "start_date", "data_column": "start_date", "order_index": 3}, {"label": "End Date", "type_id": 3, "required": true, "field_name": "end_date", "data_column": "end_date", "order_index": 4}]	none	\N	f	\N	f	2025-10-05 06:39:29.217218+00
3	\N	\N	\N	Employee Account	Create a basic employee account with branch assignment and contact details	users	\N	1	grid	[{"label": "Full Name", "type_id": 1, "required": true, "field_name": "full_name", "data_column": "full_name", "order_index": 1}, {"label": "Emails", "type_id": 16, "required": true, "field_name": "emails", "data_column": "emails", "order_index": 2}, {"label": "Phones", "type_id": 16, "field_name": "phones", "data_column": "phones", "order_index": 3}, {"type": "select", "label": "Location", "type_id": 4, "required": true, "help_text": "Select the branch where this employee will work", "field_name": "branch_id", "data_column": "branch_id", "order_index": 4, "options_table": "branches", "options_label_column": "name", "options_value_column": "branch_id"}]	none	\N	f	\N	f	2025-10-08 02:06:38.271822+00
117	\N	\N	\N	Open Position	Form to create and edit open positions	open_positions	\N	1	grid	[{"label": "Title", "type_id": 1, "required": true, "field_name": "title", "data_column": "title", "order_index": 0}, {"label": "Description", "type_id": 8, "field_name": "description", "data_column": "description", "order_index": 1}, {"label": "Branch", "type_id": 1, "field_name": "branch_id", "data_column": "branch_id", "order_index": 2}, {"label": "Position", "type_id": 1, "field_name": "position", "data_column": "position", "order_index": 3}, {"label": "Applicant Type", "options": [{"label": "All", "value": "All"}, {"label": "Internal Only", "value": "Internal Only"}, {"label": "External Only", "value": "External Only"}], "type_id": 4, "field_name": "applicant_type", "data_column": "applicant_type", "order_index": 4}, {"label": "Open Date", "type_id": 3, "field_name": "open_date", "data_column": "open_date", "order_index": 5}, {"label": "Close Date", "type_id": 3, "field_name": "close_date", "data_column": "close_date", "order_index": 6}, {"label": "Department", "type_id": 1, "field_name": "department", "data_column": "department", "order_index": 7}, {"label": "Qualifications", "type_id": 8, "field_name": "qualifications", "data_column": "qualifications", "order_index": 8}, {"label": "Salary", "type_id": 2, "field_name": "salary", "data_column": "salary", "order_index": 9}, {"label": "Status", "options": [{"label": "Open", "value": "Open"}, {"label": "Closed", "value": "Closed"}, {"label": "Pending", "value": "Pending"}], "type_id": 4, "field_name": "status", "data_column": "status", "order_index": 10}]	none	\N	f	\N	f	2025-10-05 06:39:29.220188+00
118	\N	\N	\N	Job Application	Form to submit job applications	applications	\N	1	grid	[{"label": "Position", "type_id": 4, "required": true, "field_name": "open_position_id", "data_column": "open_position_id", "order_index": 0, "options_table": "open_positions", "options_label_column": "title", "options_value_column": "open_position_id"}, {"label": "First Name", "type_id": 1, "required": true, "field_name": "first_name", "data_column": "first_name", "order_index": 1}, {"label": "Last Name", "type_id": 1, "required": true, "field_name": "last_name", "data_column": "last_name", "order_index": 2}, {"label": "Email", "type_id": 15, "required": true, "field_name": "email", "data_column": "email", "order_index": 3}, {"label": "Phone", "type_id": 1, "field_name": "phone", "data_column": "phone", "order_index": 4}, {"label": "Address", "type_id": 8, "field_name": "address", "data_column": "address", "order_index": 5}, {"label": "Date of Birth", "type_id": 3, "field_name": "date_of_birth", "data_column": "date_of_birth", "order_index": 6}, {"label": "Status", "options": [{"label": "New", "value": "New"}, {"label": "Under Review", "value": "Under Review"}, {"label": "ShortListed", "value": "ShortListed"}, {"label": "Interviewing", "value": "Interviewing"}, {"label": "Rejected", "value": "Rejected"}, {"label": "Hired", "value": "Hired"}], "type_id": 4, "required": true, "field_name": "status", "data_column": "status", "order_index": 7}, {"label": "Notes", "type_id": 8, "field_name": "notes", "data_column": "notes", "order_index": 8}]	none	\N	f	\N	f	2025-10-05 06:39:29.222346+00
119	\N	\N	\N	Interview	Form to schedule and manage job interviews	interviews	\N	1	grid	[{"label": "Application", "type_id": 4, "required": true, "field_name": "application_id", "data_column": "application_id", "order_index": 0, "options_table": "applications", "options_label_column": "first_name", "options_value_column": "application_id"}, {"label": "Interview Date", "type_id": 3, "required": true, "field_name": "interview_date", "data_column": "interview_date", "order_index": 1}, {"label": "Interview Number", "type_id": 2, "required": true, "field_name": "interview_number", "data_column": "interview_number", "order_index": 2}, {"label": "Interviewers", "type_id": 14, "field_name": "interviewer_id", "data_column": "interviewer_id", "order_index": 3, "options_table": "users", "options_label_column": "first_name", "options_value_column": "user_id"}, {"label": "Status", "options": [{"label": "Scheduled", "value": "Scheduled"}, {"label": "Completed", "value": "Completed"}, {"label": "Cancelled", "value": "Cancelled"}], "type_id": 4, "field_name": "status", "data_column": "status", "order_index": 4}, {"label": "Notes", "type_id": 8, "field_name": "notes", "data_column": "notes", "order_index": 5}, {"label": "Feedback", "type_id": 8, "field_name": "feedback", "data_column": "feedback", "order_index": 6}, {"label": "Rating", "type_id": 2, "field_name": "rating", "data_column": "rating", "order_index": 7}]	none	\N	f	\N	f	2025-10-05 06:39:29.224496+00
140	\N	\N	\N	New Employee	Form to create and manage new employee profiles	users_profiles	\N	1	grid	[{"label": "Title", "type_id": 1, "field_name": "title", "data_column": "title", "order_index": 1}, {"label": "Address", "type_id": 16, "field_name": "address", "data_column": "address", "order_index": 2}, {"label": "Phone Number", "type_id": 16, "required": true, "field_name": "phone_number", "data_column": "phone_number", "order_index": 3}, {"label": "Email", "type_id": 16, "field_name": "email", "data_column": "email", "order_index": 4}, {"label": "Date of Birth", "type_id": 3, "field_name": "date_of_birth", "data_column": "date_of_birth", "order_index": 5}, {"label": "Profile Picture", "type_id": 1, "field_name": "profile_pic", "data_column": "profile_pic", "order_index": 6}, {"label": "Notes", "type_id": 8, "field_name": "notes", "data_column": "notes", "order_index": 7}]	none	\N	f	\N	f	2025-10-05 06:39:29.226295+00
624	\N	\N	\N	Time Clock Entry	Quick clock in/out entry	time_clocks	\N	1	grid	[{"id": 1, "name": "user_id", "type": 16, "label": "Employee", "order": 1, "hidden": true, "required": true, "data_column": "user_id"}, {"id": 2, "name": "clock_type", "type": 16, "label": "Clock Type", "order": 2, "hidden": true, "required": true, "data_column": "clock_type"}, {"id": 3, "name": "clocked_at", "type": 10, "label": "Date & Time", "order": 3, "required": true, "data_column": "clocked_at"}]	none	\N	f	\N	f	2025-10-11 09:22:14.979952+00
625	\N	\N	\N	Branch	Add or edit branch location	branches	\N	1	vertical	[{"id": 1, "name": "name", "type": 1, "label": "Branch Name", "order": 1, "required": true, "data_column": "name"}, {"id": 2, "name": "latitude", "type": 2, "label": "Latitude", "order": 2, "required": false, "data_column": "latitude"}, {"id": 3, "name": "longitude", "type": 2, "label": "Longitude", "order": 3, "required": false, "data_column": "longitude"}]	none	\N	f	\N	f	2025-10-12 22:35:47.558021+00
\.


--
