--
--


SELECT pg_catalog.set_config('search_path', '', false);



--
-- Name: accessibility_defaultaccessibility; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.accessibility_defaultaccessibility (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    feature character varying(100) NOT NULL,
    filter jsonb NOT NULL,
    exclude_all boolean NOT NULL,
    is_enabled boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.accessibility_defaultaccessibility OWNER TO horilla;

--
-- Name: accessibility_defaultaccessibility_employees; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.accessibility_defaultaccessibility_employees (
    id bigint NOT NULL,
    defaultaccessibility_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.accessibility_defaultaccessibility_employees OWNER TO horilla;

--
-- Name: accessibility_defaultaccessibility_employees_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.accessibility_defaultaccessibility_employees ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.accessibility_defaultaccessibility_employees_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: accessibility_defaultaccessibility_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.accessibility_defaultaccessibility ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.accessibility_defaultaccessibility_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_asset; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_asset (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    asset_name character varying(255) NOT NULL,
    asset_description text,
    asset_tracking_id character varying(30) NOT NULL,
    asset_purchase_date date NOT NULL,
    asset_purchase_cost numeric(10,2) NOT NULL,
    asset_status character varying(40) NOT NULL,
    expiry_date date,
    notify_before integer,
    asset_category_id_id bigint NOT NULL,
    asset_lot_number_id_id bigint,
    created_by_id integer,
    modified_by_id integer,
    owner_id bigint
);


ALTER TABLE public.asset_asset OWNER TO horilla;

--
-- Name: asset_asset_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_asset ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_asset_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_assetassignment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_assetassignment (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    assigned_date date NOT NULL,
    return_date date,
    return_condition text,
    return_status character varying(30),
    return_request boolean NOT NULL,
    asset_id_id bigint NOT NULL,
    assigned_by_employee_id_id bigint NOT NULL,
    assigned_to_employee_id_id bigint NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.asset_assetassignment OWNER TO horilla;

--
-- Name: asset_assetassignment_assign_images; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_assetassignment_assign_images (
    id bigint NOT NULL,
    assetassignment_id bigint NOT NULL,
    returnimages_id bigint NOT NULL
);


ALTER TABLE public.asset_assetassignment_assign_images OWNER TO horilla;

--
-- Name: asset_assetassignment_assign_images_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_assetassignment_assign_images ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_assetassignment_assign_images_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_assetassignment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_assetassignment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_assetassignment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_assetassignment_return_images; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_assetassignment_return_images (
    id bigint NOT NULL,
    assetassignment_id bigint NOT NULL,
    returnimages_id bigint NOT NULL
);


ALTER TABLE public.asset_assetassignment_return_images OWNER TO horilla;

--
-- Name: asset_assetassignment_return_images_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_assetassignment_return_images ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_assetassignment_return_images_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_assetcategory; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_assetcategory (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    asset_category_name character varying(255) NOT NULL,
    asset_category_description text NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.asset_assetcategory OWNER TO horilla;

--
-- Name: asset_assetcategory_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_assetcategory_company_id (
    id bigint NOT NULL,
    assetcategory_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.asset_assetcategory_company_id OWNER TO horilla;

--
-- Name: asset_assetcategory_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_assetcategory_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_assetcategory_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_assetcategory_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_assetcategory ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_assetcategory_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_assetdocuments; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_assetdocuments (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    file character varying(100),
    asset_report_id bigint NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.asset_assetdocuments OWNER TO horilla;

--
-- Name: asset_assetdocuments_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_assetdocuments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_assetdocuments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_assetlot; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_assetlot (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    lot_number character varying(30) NOT NULL,
    lot_description text,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.asset_assetlot OWNER TO horilla;

--
-- Name: asset_assetlot_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_assetlot_company_id (
    id bigint NOT NULL,
    assetlot_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.asset_assetlot_company_id OWNER TO horilla;

--
-- Name: asset_assetlot_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_assetlot_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_assetlot_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_assetlot_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_assetlot ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_assetlot_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_assetreport; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_assetreport (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(255),
    asset_id_id bigint NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.asset_assetreport OWNER TO horilla;

--
-- Name: asset_assetreport_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_assetreport ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_assetreport_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_assetrequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_assetrequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    asset_request_date date NOT NULL,
    description text,
    asset_request_status character varying(30),
    asset_category_id_id bigint NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    requested_employee_id_id bigint NOT NULL
);


ALTER TABLE public.asset_assetrequest OWNER TO horilla;

--
-- Name: asset_assetrequest_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_assetrequest ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_assetrequest_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: asset_returnimages; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.asset_returnimages (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    image character varying(100),
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.asset_returnimages OWNER TO horilla;

--
-- Name: asset_returnimages_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.asset_returnimages ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.asset_returnimages_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_attendance; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_attendance (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    attendance_date date NOT NULL,
    attendance_clock_in_date date,
    attendance_clock_in time without time zone,
    attendance_clock_out_date date,
    attendance_clock_out time without time zone,
    attendance_worked_hour character varying(10),
    minimum_hour character varying(10) NOT NULL,
    attendance_overtime character varying(10) NOT NULL,
    attendance_overtime_approve boolean NOT NULL,
    attendance_validated boolean NOT NULL,
    at_work_second integer,
    overtime_second integer,
    approved_overtime_second integer NOT NULL,
    is_validate_request boolean NOT NULL,
    is_bulk_request boolean NOT NULL,
    is_validate_request_approved boolean NOT NULL,
    request_description text,
    request_type character varying(18),
    is_holiday boolean NOT NULL,
    requested_data jsonb,
    attendance_day_id bigint,
    batch_attendance_id_id bigint,
    created_by_id integer,
    employee_id_id bigint,
    modified_by_id integer,
    shift_id_id bigint,
    work_type_id_id bigint
);


ALTER TABLE public.attendance_attendance OWNER TO horilla;

--
-- Name: attendance_attendance_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_attendance ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_attendance_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_attendanceactivity; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_attendanceactivity (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    attendance_date date,
    in_datetime timestamp with time zone,
    clock_in_date date,
    clock_in time without time zone NOT NULL,
    clock_out_date date,
    out_datetime timestamp with time zone,
    clock_out time without time zone,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    shift_day_id bigint
);


ALTER TABLE public.attendance_attendanceactivity OWNER TO horilla;

--
-- Name: attendance_attendanceactivity_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_attendanceactivity ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_attendanceactivity_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_attendancegeneralsetting; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_attendancegeneralsetting (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    time_runner boolean NOT NULL,
    enable_check_in boolean NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.attendance_attendancegeneralsetting OWNER TO horilla;

--
-- Name: attendance_attendancegeneralsetting_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_attendancegeneralsetting ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_attendancegeneralsetting_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_attendancelatecomeearlyout; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_attendancelatecomeearlyout (
    id bigint NOT NULL,
    is_active boolean NOT NULL,
    type character varying(20) NOT NULL,
    created_at timestamp with time zone,
    attendance_id_id bigint NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.attendance_attendancelatecomeearlyout OWNER TO horilla;

--
-- Name: attendance_attendancelatecomeearlyout_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_attendancelatecomeearlyout ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_attendancelatecomeearlyout_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_attendanceovertime; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_attendanceovertime (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    month character varying(10) NOT NULL,
    month_sequence smallint NOT NULL,
    year character varying(10),
    worked_hours character varying(10),
    pending_hours character varying(10),
    overtime character varying(20) NOT NULL,
    hour_account_second integer,
    hour_pending_second integer,
    overtime_second integer,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    CONSTRAINT attendance_attendanceovertime_month_sequence_check CHECK ((month_sequence >= 0))
);


ALTER TABLE public.attendance_attendanceovertime OWNER TO horilla;

--
-- Name: attendance_attendanceovertime_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_attendanceovertime ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_attendanceovertime_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_attendancerequestcomment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_attendancerequestcomment (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    comment text,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    request_id_id bigint NOT NULL
);


ALTER TABLE public.attendance_attendancerequestcomment OWNER TO horilla;

--
-- Name: attendance_attendancerequestcomment_files; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_attendancerequestcomment_files (
    id bigint NOT NULL,
    attendancerequestcomment_id bigint NOT NULL,
    attendancerequestfile_id bigint NOT NULL
);


ALTER TABLE public.attendance_attendancerequestcomment_files OWNER TO horilla;

--
-- Name: attendance_attendancerequestcomment_files_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_attendancerequestcomment_files ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_attendancerequestcomment_files_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_attendancerequestcomment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_attendancerequestcomment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_attendancerequestcomment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_attendancerequestfile; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_attendancerequestfile (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    file character varying(100) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.attendance_attendancerequestfile OWNER TO horilla;

--
-- Name: attendance_attendancerequestfile_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_attendancerequestfile ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_attendancerequestfile_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_attendancevalidationcondition; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_attendancevalidationcondition (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    validation_at_work character varying(10) NOT NULL,
    minimum_overtime_to_approve character varying(10),
    overtime_cutoff character varying(10),
    auto_approve_ot boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.attendance_attendancevalidationcondition OWNER TO horilla;

--
-- Name: attendance_attendancevalidationcondition_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_attendancevalidationcondition_company_id (
    id bigint NOT NULL,
    attendancevalidationcondition_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.attendance_attendancevalidationcondition_company_id OWNER TO horilla;

--
-- Name: attendance_attendancevalidationcondition_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_attendancevalidationcondition_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_attendancevalidationcondition_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_attendancevalidationcondition_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_attendancevalidationcondition ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_attendancevalidationcondition_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_batchattendance; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_batchattendance (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(150) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.attendance_batchattendance OWNER TO horilla;

--
-- Name: attendance_batchattendance_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_batchattendance ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_batchattendance_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_gracetime; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_gracetime (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    allowed_time character varying(10) NOT NULL,
    allowed_time_in_secs integer NOT NULL,
    allowed_clock_in boolean NOT NULL,
    allowed_clock_out boolean NOT NULL,
    is_default boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.attendance_gracetime OWNER TO horilla;

--
-- Name: attendance_gracetime_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_gracetime_company_id (
    id bigint NOT NULL,
    gracetime_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.attendance_gracetime_company_id OWNER TO horilla;

--
-- Name: attendance_gracetime_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_gracetime_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_gracetime_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_gracetime_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_gracetime ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_gracetime_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_historicalattendance; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_historicalattendance (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    attendance_date date NOT NULL,
    attendance_clock_in_date date,
    attendance_clock_in time without time zone,
    attendance_clock_out_date date,
    attendance_clock_out time without time zone,
    attendance_worked_hour character varying(10),
    minimum_hour character varying(10) NOT NULL,
    attendance_overtime character varying(10) NOT NULL,
    attendance_overtime_approve boolean NOT NULL,
    attendance_validated boolean NOT NULL,
    at_work_second integer,
    overtime_second integer,
    approved_overtime_second integer NOT NULL,
    is_validate_request boolean NOT NULL,
    is_bulk_request boolean NOT NULL,
    is_validate_request_approved boolean NOT NULL,
    request_description text,
    request_type character varying(18),
    is_holiday boolean NOT NULL,
    requested_data jsonb,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    attendance_day_id bigint,
    batch_attendance_id_id bigint,
    created_by_id integer,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer,
    shift_id_id bigint,
    work_type_id_id bigint
);


ALTER TABLE public.attendance_historicalattendance OWNER TO horilla;

--
-- Name: attendance_historicalattendance_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_historicalattendance ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_historicalattendance_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_historicalattendance_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_historicalattendance_history_tags (
    id bigint NOT NULL,
    historicalattendance_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.attendance_historicalattendance_history_tags OWNER TO horilla;

--
-- Name: attendance_historicalattendance_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_historicalattendance_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_historicalattendance_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: attendance_workrecords; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.attendance_workrecords (
    id bigint NOT NULL,
    record_name character varying(250),
    work_record_type character varying(10),
    date date,
    at_work character varying(10),
    min_hour character varying(10),
    at_work_second integer,
    min_hour_second integer,
    note text NOT NULL,
    message character varying(30),
    is_attendance_record boolean NOT NULL,
    is_leave_record boolean NOT NULL,
    day_percentage double precision NOT NULL,
    last_update timestamp with time zone,
    attendance_id_id bigint,
    employee_id_id bigint NOT NULL,
    leave_request_id_id bigint,
    shift_id_id bigint
);


ALTER TABLE public.attendance_workrecords OWNER TO horilla;

--
-- Name: attendance_workrecords_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.attendance_workrecords ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.attendance_workrecords_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: auditlog_logentry; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.auditlog_logentry (
    id integer NOT NULL,
    object_pk character varying(255) NOT NULL,
    object_id bigint,
    object_repr text NOT NULL,
    action smallint NOT NULL,
    changes jsonb,
    "timestamp" timestamp with time zone NOT NULL,
    actor_id integer,
    content_type_id integer NOT NULL,
    remote_addr inet,
    additional_data jsonb,
    serialized_data jsonb,
    cid character varying(255),
    changes_text text NOT NULL,
    remote_port integer,
    actor_email character varying(254),
    CONSTRAINT auditlog_logentry_action_check CHECK ((action >= 0)),
    CONSTRAINT auditlog_logentry_remote_port_check CHECK ((remote_port >= 0))
);


ALTER TABLE public.auditlog_logentry OWNER TO horilla;

--
-- Name: auditlog_logentry_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.auditlog_logentry ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.auditlog_logentry_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: auth_group; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.auth_group (
    id integer NOT NULL,
    name character varying(150) NOT NULL
);


ALTER TABLE public.auth_group OWNER TO horilla;

--
-- Name: auth_group_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.auth_group ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.auth_group_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: auth_group_permissions; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.auth_group_permissions (
    id bigint NOT NULL,
    group_id integer NOT NULL,
    permission_id integer NOT NULL
);


ALTER TABLE public.auth_group_permissions OWNER TO horilla;

--
-- Name: auth_group_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.auth_group_permissions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.auth_group_permissions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: auth_permission; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.auth_permission (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    content_type_id integer NOT NULL,
    codename character varying(100) NOT NULL
);


ALTER TABLE public.auth_permission OWNER TO horilla;

--
-- Name: auth_permission_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.auth_permission ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.auth_permission_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: auth_user; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.auth_user (
    id integer NOT NULL,
    password character varying(128) NOT NULL,
    last_login timestamp with time zone,
    is_superuser boolean NOT NULL,
    username character varying(150) NOT NULL,
    first_name character varying(150) NOT NULL,
    last_name character varying(150) NOT NULL,
    email character varying(254) NOT NULL,
    is_staff boolean NOT NULL,
    is_active boolean NOT NULL,
    date_joined timestamp with time zone NOT NULL,
    is_new_employee boolean NOT NULL
);


ALTER TABLE public.auth_user OWNER TO horilla;

--
-- Name: auth_user_groups; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.auth_user_groups (
    id bigint NOT NULL,
    user_id integer NOT NULL,
    group_id integer NOT NULL
);


ALTER TABLE public.auth_user_groups OWNER TO horilla;

--
-- Name: auth_user_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.auth_user_groups ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.auth_user_groups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: auth_user_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.auth_user ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.auth_user_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: auth_user_user_permissions; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.auth_user_user_permissions (
    id bigint NOT NULL,
    user_id integer NOT NULL,
    permission_id integer NOT NULL
);


ALTER TABLE public.auth_user_user_permissions OWNER TO horilla;

--
-- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.auth_user_user_permissions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.auth_user_user_permissions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_announcement; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_announcement (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(100) NOT NULL,
    description text,
    expire_date date,
    disable_comments boolean NOT NULL,
    public_comments boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.base_announcement OWNER TO horilla;

--
-- Name: base_announcement_attachments; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_announcement_attachments (
    id bigint NOT NULL,
    announcement_id bigint NOT NULL,
    attachment_id bigint NOT NULL
);


ALTER TABLE public.base_announcement_attachments OWNER TO horilla;

--
-- Name: base_announcement_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_announcement_attachments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_announcement_attachments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_announcement_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_announcement_company_id (
    id bigint NOT NULL,
    announcement_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.base_announcement_company_id OWNER TO horilla;

--
-- Name: base_announcement_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_announcement_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_announcement_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_announcement_department; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_announcement_department (
    id bigint NOT NULL,
    announcement_id bigint NOT NULL,
    department_id bigint NOT NULL
);


ALTER TABLE public.base_announcement_department OWNER TO horilla;

--
-- Name: base_announcement_department_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_announcement_department ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_announcement_department_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_announcement_employees; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_announcement_employees (
    id bigint NOT NULL,
    announcement_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.base_announcement_employees OWNER TO horilla;

--
-- Name: base_announcement_employees_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_announcement_employees ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_announcement_employees_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_announcement_filtered_employees; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_announcement_filtered_employees (
    id bigint NOT NULL,
    announcement_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.base_announcement_filtered_employees OWNER TO horilla;

--
-- Name: base_announcement_filtered_employees_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_announcement_filtered_employees ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_announcement_filtered_employees_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_announcement_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_announcement ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_announcement_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_announcement_job_position; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_announcement_job_position (
    id bigint NOT NULL,
    announcement_id bigint NOT NULL,
    jobposition_id bigint NOT NULL
);


ALTER TABLE public.base_announcement_job_position OWNER TO horilla;

--
-- Name: base_announcement_job_position_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_announcement_job_position ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_announcement_job_position_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_announcementcomment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_announcementcomment (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    comment text,
    announcement_id_id bigint NOT NULL,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.base_announcementcomment OWNER TO horilla;

--
-- Name: base_announcementcomment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_announcementcomment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_announcementcomment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_announcementexpire; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_announcementexpire (
    id bigint NOT NULL,
    days integer
);


ALTER TABLE public.base_announcementexpire OWNER TO horilla;

--
-- Name: base_announcementexpire_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_announcementexpire ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_announcementexpire_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_announcementview; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_announcementview (
    id bigint NOT NULL,
    viewed boolean NOT NULL,
    created_at timestamp with time zone,
    announcement_id bigint NOT NULL,
    user_id integer NOT NULL
);


ALTER TABLE public.base_announcementview OWNER TO horilla;

--
-- Name: base_announcementview_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_announcementview ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_announcementview_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_attachment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_attachment (
    id bigint NOT NULL,
    file character varying(100) NOT NULL
);


ALTER TABLE public.base_attachment OWNER TO horilla;

--
-- Name: base_attachment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_attachment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_attachment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_attendanceallowedip; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_attendanceallowedip (
    id bigint NOT NULL,
    is_enabled boolean NOT NULL,
    additional_data jsonb
);


ALTER TABLE public.base_attendanceallowedip OWNER TO horilla;

--
-- Name: base_attendanceallowedip_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_attendanceallowedip ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_attendanceallowedip_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_baserequestfile; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_baserequestfile (
    id bigint NOT NULL,
    file character varying(100) NOT NULL
);


ALTER TABLE public.base_baserequestfile OWNER TO horilla;

--
-- Name: base_baserequestfile_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_baserequestfile ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_baserequestfile_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_biometricattendance; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_biometricattendance (
    id bigint NOT NULL,
    is_installed boolean NOT NULL,
    company_id_id bigint
);


ALTER TABLE public.base_biometricattendance OWNER TO horilla;

--
-- Name: base_biometricattendance_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_biometricattendance ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_biometricattendance_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_company; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_company (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    company character varying(50) NOT NULL,
    hq boolean NOT NULL,
    address text NOT NULL,
    country character varying(50) NOT NULL,
    state character varying(50) NOT NULL,
    city character varying(50) NOT NULL,
    zip character varying(20) NOT NULL,
    icon character varying(100),
    date_format character varying(30),
    time_format character varying(20),
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.base_company OWNER TO horilla;

--
-- Name: base_company_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_company ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_company_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_companyleaves; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_companyleaves (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    based_on_week character varying(100),
    based_on_week_day character varying(100) NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.base_companyleaves OWNER TO horilla;

--
-- Name: base_companyleaves_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_companyleaves ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_companyleaves_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_dashboardemployeecharts; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_dashboardemployeecharts (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    charts jsonb,
    created_by_id integer,
    employee_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.base_dashboardemployeecharts OWNER TO horilla;

--
-- Name: base_dashboardemployeecharts_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_dashboardemployeecharts ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_dashboardemployeecharts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_department; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_department (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    department character varying(50) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.base_department OWNER TO horilla;

--
-- Name: base_department_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_department_company_id (
    id bigint NOT NULL,
    department_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.base_department_company_id OWNER TO horilla;

--
-- Name: base_department_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_department_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_department_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_department_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_department ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_department_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_driverviewed; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_driverviewed (
    id bigint NOT NULL,
    viewed character varying(10) NOT NULL,
    user_id integer NOT NULL
);


ALTER TABLE public.base_driverviewed OWNER TO horilla;

--
-- Name: base_driverviewed_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_driverviewed ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_driverviewed_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_dynamicemailconfiguration; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_dynamicemailconfiguration (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    host character varying(256),
    port smallint,
    from_email character varying(256),
    username character varying(256),
    display_name character varying(256),
    password character varying(256),
    use_tls boolean NOT NULL,
    use_ssl boolean NOT NULL,
    fail_silently boolean NOT NULL,
    is_primary boolean NOT NULL,
    use_dynamic_display_name boolean NOT NULL,
    timeout smallint,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.base_dynamicemailconfiguration OWNER TO horilla;

--
-- Name: base_dynamicemailconfiguration_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_dynamicemailconfiguration ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_dynamicemailconfiguration_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_dynamicpagination; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_dynamicpagination (
    id bigint NOT NULL,
    pagination integer NOT NULL,
    user_id_id integer
);


ALTER TABLE public.base_dynamicpagination OWNER TO horilla;

--
-- Name: base_dynamicpagination_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_dynamicpagination ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_dynamicpagination_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_emaillog; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_emaillog (
    id bigint NOT NULL,
    subject character varying(255) NOT NULL,
    body text NOT NULL,
    from_email character varying(254) NOT NULL,
    "to" character varying(254) NOT NULL,
    status character varying(6) NOT NULL,
    created_at timestamp with time zone NOT NULL,
    company_id_id bigint
);


ALTER TABLE public.base_emaillog OWNER TO horilla;

--
-- Name: base_emaillog_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_emaillog ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_emaillog_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_employeeshift; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_employeeshift (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    employee_shift character varying(50) NOT NULL,
    weekly_full_time character varying(6),
    full_time character varying(6) NOT NULL,
    created_by_id integer,
    grace_time_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.base_employeeshift OWNER TO horilla;

--
-- Name: base_employeeshift_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_employeeshift_company_id (
    id bigint NOT NULL,
    employeeshift_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.base_employeeshift_company_id OWNER TO horilla;

--
-- Name: base_employeeshift_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_employeeshift_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_employeeshift_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_employeeshift_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_employeeshift ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_employeeshift_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_employeeshiftday; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_employeeshiftday (
    id bigint NOT NULL,
    day character varying(20) NOT NULL
);


ALTER TABLE public.base_employeeshiftday OWNER TO horilla;

--
-- Name: base_employeeshiftday_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_employeeshiftday_company_id (
    id bigint NOT NULL,
    employeeshiftday_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.base_employeeshiftday_company_id OWNER TO horilla;

--
-- Name: base_employeeshiftday_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_employeeshiftday_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_employeeshiftday_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_employeeshiftday_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_employeeshiftday ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_employeeshiftday_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_employeeshiftschedule; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_employeeshiftschedule (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    minimum_working_hour character varying(5) NOT NULL,
    start_time time without time zone,
    end_time time without time zone,
    is_night_shift boolean NOT NULL,
    is_auto_punch_out_enabled boolean NOT NULL,
    auto_punch_out_time time without time zone,
    created_by_id integer,
    day_id bigint NOT NULL,
    modified_by_id integer,
    shift_id_id bigint NOT NULL
);


ALTER TABLE public.base_employeeshiftschedule OWNER TO horilla;

--
-- Name: base_employeeshiftschedule_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_employeeshiftschedule_company_id (
    id bigint NOT NULL,
    employeeshiftschedule_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.base_employeeshiftschedule_company_id OWNER TO horilla;

--
-- Name: base_employeeshiftschedule_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_employeeshiftschedule_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_employeeshiftschedule_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_employeeshiftschedule_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_employeeshiftschedule ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_employeeshiftschedule_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_employeetype; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_employeetype (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    employee_type character varying(50) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.base_employeetype OWNER TO horilla;

--
-- Name: base_employeetype_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_employeetype_company_id (
    id bigint NOT NULL,
    employeetype_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.base_employeetype_company_id OWNER TO horilla;

--
-- Name: base_employeetype_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_employeetype_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_employeetype_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_employeetype_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_employeetype ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_employeetype_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_historicalrotatingshiftassign; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_historicalrotatingshiftassign (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    start_date date NOT NULL,
    next_change_date date,
    based_on character varying(10) NOT NULL,
    rotate_after_day integer,
    rotate_every_weekend character varying(10),
    rotate_every character varying(10),
    additional_data jsonb,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    current_shift_id bigint,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer,
    next_shift_id bigint,
    rotating_shift_id_id bigint
);


ALTER TABLE public.base_historicalrotatingshiftassign OWNER TO horilla;

--
-- Name: base_historicalrotatingshiftassign_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_historicalrotatingshiftassign ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_historicalrotatingshiftassign_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_historicalrotatingshiftassign_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_historicalrotatingshiftassign_history_tags (
    id bigint NOT NULL,
    historicalrotatingshiftassign_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.base_historicalrotatingshiftassign_history_tags OWNER TO horilla;

--
-- Name: base_historicalrotatingshiftassign_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_historicalrotatingshiftassign_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_historicalrotatingshiftassign_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_historicalrotatingworktypeassign; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_historicalrotatingworktypeassign (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    start_date date NOT NULL,
    next_change_date date,
    based_on character varying(10) NOT NULL,
    rotate_after_day integer NOT NULL,
    rotate_every_weekend character varying(10),
    rotate_every character varying(10) NOT NULL,
    additional_data jsonb,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    current_work_type_id bigint,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer,
    next_work_type_id bigint,
    rotating_work_type_id_id bigint
);


ALTER TABLE public.base_historicalrotatingworktypeassign OWNER TO horilla;

--
-- Name: base_historicalrotatingworktypeassign_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_historicalrotatingworktypeassign ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_historicalrotatingworktypeassign_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_historicalrotatingworktypeassign_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_historicalrotatingworktypeassign_history_tags (
    id bigint NOT NULL,
    historicalrotatingworktypeassign_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.base_historicalrotatingworktypeassign_history_tags OWNER TO horilla;

--
-- Name: base_historicalrotatingworktypeassign_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_historicalrotatingworktypeassign_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_historicalrotatingworktypeassign_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_historicalshiftrequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_historicalshiftrequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    requested_date date,
    reallocate_approved boolean NOT NULL,
    reallocate_canceled boolean NOT NULL,
    requested_till date,
    description text,
    is_permanent_shift boolean NOT NULL,
    approved boolean NOT NULL,
    canceled boolean NOT NULL,
    shift_changed boolean NOT NULL,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer,
    previous_shift_id_id bigint,
    reallocate_to_id bigint,
    shift_id_id bigint
);


ALTER TABLE public.base_historicalshiftrequest OWNER TO horilla;

--
-- Name: base_historicalshiftrequest_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_historicalshiftrequest ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_historicalshiftrequest_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_historicalshiftrequest_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_historicalshiftrequest_history_tags (
    id bigint NOT NULL,
    historicalshiftrequest_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.base_historicalshiftrequest_history_tags OWNER TO horilla;

--
-- Name: base_historicalshiftrequest_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_historicalshiftrequest_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_historicalshiftrequest_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_historicalworktyperequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_historicalworktyperequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    requested_date date,
    requested_till date,
    description text,
    is_permanent_work_type boolean NOT NULL,
    approved boolean NOT NULL,
    canceled boolean NOT NULL,
    work_type_changed boolean NOT NULL,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer,
    previous_work_type_id_id bigint,
    work_type_id_id bigint
);


ALTER TABLE public.base_historicalworktyperequest OWNER TO horilla;

--
-- Name: base_historicalworktyperequest_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_historicalworktyperequest ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_historicalworktyperequest_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_historicalworktyperequest_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_historicalworktyperequest_history_tags (
    id bigint NOT NULL,
    historicalworktyperequest_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.base_historicalworktyperequest_history_tags OWNER TO horilla;

--
-- Name: base_historicalworktyperequest_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_historicalworktyperequest_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_historicalworktyperequest_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_holidays; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_holidays (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    name character varying(30) NOT NULL,
    start_date date NOT NULL,
    end_date date,
    recurring boolean NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.base_holidays OWNER TO horilla;

--
-- Name: base_holidays_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_holidays ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_holidays_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_horillamailtemplate; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_horillamailtemplate (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(100) NOT NULL,
    body text NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.base_horillamailtemplate OWNER TO horilla;

--
-- Name: base_horillamailtemplate_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_horillamailtemplate ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_horillamailtemplate_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_jobposition; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_jobposition (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    job_position character varying(50) NOT NULL,
    created_by_id integer,
    department_id_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.base_jobposition OWNER TO horilla;

--
-- Name: base_jobposition_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_jobposition_company_id (
    id bigint NOT NULL,
    jobposition_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.base_jobposition_company_id OWNER TO horilla;

--
-- Name: base_jobposition_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_jobposition_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_jobposition_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_jobposition_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_jobposition ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_jobposition_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_jobrole; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_jobrole (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    job_role character varying(50),
    created_by_id integer,
    job_position_id_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.base_jobrole OWNER TO horilla;

--
-- Name: base_jobrole_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_jobrole_company_id (
    id bigint NOT NULL,
    jobrole_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.base_jobrole_company_id OWNER TO horilla;

--
-- Name: base_jobrole_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_jobrole_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_jobrole_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_jobrole_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_jobrole ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_jobrole_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_multipleapprovalcondition; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_multipleapprovalcondition (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    condition_field character varying(255) NOT NULL,
    condition_operator character varying(255),
    condition_value character varying(100),
    condition_start_value character varying(100),
    condition_end_value character varying(100),
    company_id_id bigint,
    created_by_id integer,
    department_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.base_multipleapprovalcondition OWNER TO horilla;

--
-- Name: base_multipleapprovalcondition_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_multipleapprovalcondition ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_multipleapprovalcondition_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_multipleapprovalmanagers; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_multipleapprovalmanagers (
    id bigint NOT NULL,
    sequence integer NOT NULL,
    employee_id integer,
    reporting_manager character varying(100),
    condition_id_id bigint NOT NULL
);


ALTER TABLE public.base_multipleapprovalmanagers OWNER TO horilla;

--
-- Name: base_multipleapprovalmanagers_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_multipleapprovalmanagers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_multipleapprovalmanagers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_notificationsound; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_notificationsound (
    id bigint NOT NULL,
    sound_enabled boolean NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.base_notificationsound OWNER TO horilla;

--
-- Name: base_notificationsound_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_notificationsound ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_notificationsound_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_penaltyaccounts; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_penaltyaccounts (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    minus_leaves double precision,
    deduct_from_carry_forward boolean NOT NULL,
    penalty_amount double precision,
    created_by_id integer,
    employee_id_id bigint,
    late_early_id_id bigint,
    leave_request_id_id bigint,
    leave_type_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.base_penaltyaccounts OWNER TO horilla;

--
-- Name: base_penaltyaccounts_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_penaltyaccounts ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_penaltyaccounts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_rotatingshift; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_rotatingshift (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    name character varying(50) NOT NULL,
    additional_data jsonb,
    created_by_id integer,
    modified_by_id integer,
    shift1_id bigint,
    shift2_id bigint
);


ALTER TABLE public.base_rotatingshift OWNER TO horilla;

--
-- Name: base_rotatingshift_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_rotatingshift ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_rotatingshift_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_rotatingshiftassign; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_rotatingshiftassign (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    start_date date NOT NULL,
    next_change_date date,
    based_on character varying(10) NOT NULL,
    rotate_after_day integer,
    rotate_every_weekend character varying(10),
    rotate_every character varying(10),
    additional_data jsonb,
    created_by_id integer,
    current_shift_id bigint,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    next_shift_id bigint,
    rotating_shift_id_id bigint NOT NULL
);


ALTER TABLE public.base_rotatingshiftassign OWNER TO horilla;

--
-- Name: base_rotatingshiftassign_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_rotatingshiftassign ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_rotatingshiftassign_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_rotatingworktype; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_rotatingworktype (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    name character varying(50) NOT NULL,
    additional_data jsonb,
    created_by_id integer,
    modified_by_id integer,
    work_type1_id bigint NOT NULL,
    work_type2_id bigint NOT NULL
);


ALTER TABLE public.base_rotatingworktype OWNER TO horilla;

--
-- Name: base_rotatingworktype_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_rotatingworktype ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_rotatingworktype_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_rotatingworktypeassign; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_rotatingworktypeassign (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    start_date date NOT NULL,
    next_change_date date,
    based_on character varying(10) NOT NULL,
    rotate_after_day integer NOT NULL,
    rotate_every_weekend character varying(10),
    rotate_every character varying(10) NOT NULL,
    additional_data jsonb,
    created_by_id integer,
    current_work_type_id bigint,
    employee_id_id bigint,
    modified_by_id integer,
    next_work_type_id bigint,
    rotating_work_type_id_id bigint NOT NULL
);


ALTER TABLE public.base_rotatingworktypeassign OWNER TO horilla;

--
-- Name: base_rotatingworktypeassign_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_rotatingworktypeassign ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_rotatingworktypeassign_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_shiftrequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_shiftrequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    requested_date date,
    reallocate_approved boolean NOT NULL,
    reallocate_canceled boolean NOT NULL,
    requested_till date,
    description text,
    is_permanent_shift boolean NOT NULL,
    approved boolean NOT NULL,
    canceled boolean NOT NULL,
    shift_changed boolean NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    modified_by_id integer,
    previous_shift_id_id bigint,
    reallocate_to_id bigint,
    shift_id_id bigint NOT NULL
);


ALTER TABLE public.base_shiftrequest OWNER TO horilla;

--
-- Name: base_shiftrequest_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_shiftrequest ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_shiftrequest_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_shiftrequestcomment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_shiftrequestcomment (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    comment text,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    request_id_id bigint NOT NULL
);


ALTER TABLE public.base_shiftrequestcomment OWNER TO horilla;

--
-- Name: base_shiftrequestcomment_files; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_shiftrequestcomment_files (
    id bigint NOT NULL,
    shiftrequestcomment_id bigint NOT NULL,
    baserequestfile_id bigint NOT NULL
);


ALTER TABLE public.base_shiftrequestcomment_files OWNER TO horilla;

--
-- Name: base_shiftrequestcomment_files_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_shiftrequestcomment_files ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_shiftrequestcomment_files_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_shiftrequestcomment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_shiftrequestcomment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_shiftrequestcomment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_tags (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(30) NOT NULL,
    color character varying(30) NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.base_tags OWNER TO horilla;

--
-- Name: base_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_tracklatecomeearlyout; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_tracklatecomeearlyout (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    is_enable boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.base_tracklatecomeearlyout OWNER TO horilla;

--
-- Name: base_tracklatecomeearlyout_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_tracklatecomeearlyout ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_tracklatecomeearlyout_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_worktype; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_worktype (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    work_type character varying(50) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.base_worktype OWNER TO horilla;

--
-- Name: base_worktype_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_worktype_company_id (
    id bigint NOT NULL,
    worktype_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.base_worktype_company_id OWNER TO horilla;

--
-- Name: base_worktype_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_worktype_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_worktype_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_worktype_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_worktype ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_worktype_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_worktyperequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_worktyperequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    requested_date date,
    requested_till date,
    description text,
    is_permanent_work_type boolean NOT NULL,
    approved boolean NOT NULL,
    canceled boolean NOT NULL,
    work_type_changed boolean NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    modified_by_id integer,
    previous_work_type_id_id bigint,
    work_type_id_id bigint NOT NULL
);


ALTER TABLE public.base_worktyperequest OWNER TO horilla;

--
-- Name: base_worktyperequest_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_worktyperequest ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_worktyperequest_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_worktyperequestcomment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_worktyperequestcomment (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    comment text,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    request_id_id bigint NOT NULL
);


ALTER TABLE public.base_worktyperequestcomment OWNER TO horilla;

--
-- Name: base_worktyperequestcomment_files; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.base_worktyperequestcomment_files (
    id bigint NOT NULL,
    worktyperequestcomment_id bigint NOT NULL,
    baserequestfile_id bigint NOT NULL
);


ALTER TABLE public.base_worktyperequestcomment_files OWNER TO horilla;

--
-- Name: base_worktyperequestcomment_files_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_worktyperequestcomment_files ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_worktyperequestcomment_files_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: base_worktyperequestcomment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.base_worktyperequestcomment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.base_worktyperequestcomment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: biometric_biometricdevices; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.biometric_biometricdevices (
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    id uuid NOT NULL,
    name character varying(100) NOT NULL,
    machine_type character varying(18),
    machine_ip character varying(150),
    port integer,
    zk_password character varying(100),
    bio_username character varying(100),
    bio_password character varying(100),
    anviz_request_id character varying(200),
    api_url character varying(200),
    api_key character varying(100),
    api_secret character varying(100),
    api_token character varying(500),
    api_expires character varying(100),
    is_live boolean NOT NULL,
    is_scheduler boolean NOT NULL,
    scheduler_duration character varying(10),
    last_fetch_date date,
    last_fetch_time time without time zone,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer,
    device_direction character varying(50) NOT NULL
);


ALTER TABLE public.biometric_biometricdevices OWNER TO horilla;

--
-- Name: biometric_biometricemployees; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.biometric_biometricemployees (
    id uuid NOT NULL,
    uid integer,
    ref_user_id integer,
    user_id character varying(100) NOT NULL,
    dahua_card_no character varying(100),
    device_id_id uuid,
    employee_id_id bigint NOT NULL
);


ALTER TABLE public.biometric_biometricemployees OWNER TO horilla;

--
-- Name: biometric_cosecattendancearguments; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.biometric_cosecattendancearguments (
    id uuid NOT NULL,
    last_fetch_roll_ovr_count character varying(100),
    last_fetch_seq_number character varying(100),
    device_id_id uuid
);


ALTER TABLE public.biometric_cosecattendancearguments OWNER TO horilla;

--
-- Name: django_admin_log; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.django_admin_log (
    id integer NOT NULL,
    action_time timestamp with time zone NOT NULL,
    object_id text,
    object_repr character varying(200) NOT NULL,
    action_flag smallint NOT NULL,
    change_message text NOT NULL,
    content_type_id integer,
    user_id integer NOT NULL,
    CONSTRAINT django_admin_log_action_flag_check CHECK ((action_flag >= 0))
);


ALTER TABLE public.django_admin_log OWNER TO horilla;

--
-- Name: django_admin_log_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.django_admin_log ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.django_admin_log_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: django_apscheduler_djangojob; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.django_apscheduler_djangojob (
    id character varying(255) NOT NULL,
    next_run_time timestamp with time zone,
    job_state bytea NOT NULL
);


ALTER TABLE public.django_apscheduler_djangojob OWNER TO horilla;

--
-- Name: django_apscheduler_djangojobexecution; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.django_apscheduler_djangojobexecution (
    id bigint NOT NULL,
    status character varying(50) NOT NULL,
    run_time timestamp with time zone NOT NULL,
    duration numeric(15,2),
    finished numeric(15,2),
    exception character varying(1000),
    traceback text,
    job_id character varying(255) NOT NULL
);


ALTER TABLE public.django_apscheduler_djangojobexecution OWNER TO horilla;

--
-- Name: django_apscheduler_djangojobexecution_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.django_apscheduler_djangojobexecution ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.django_apscheduler_djangojobexecution_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: django_content_type; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.django_content_type (
    id integer NOT NULL,
    app_label character varying(100) NOT NULL,
    model character varying(100) NOT NULL
);


ALTER TABLE public.django_content_type OWNER TO horilla;

--
-- Name: django_content_type_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.django_content_type ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.django_content_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: django_migrations; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.django_migrations (
    id bigint NOT NULL,
    app character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    applied timestamp with time zone NOT NULL
);


ALTER TABLE public.django_migrations OWNER TO horilla;

--
-- Name: django_migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.django_migrations ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.django_migrations_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: django_session; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.django_session (
    session_key character varying(40) NOT NULL,
    session_data text NOT NULL,
    expire_date timestamp with time zone NOT NULL
);


ALTER TABLE public.django_session OWNER TO horilla;

--
-- Name: employee_actiontype; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_actiontype (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(50) NOT NULL,
    action_type character varying(30) NOT NULL,
    block_option boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.employee_actiontype OWNER TO horilla;

--
-- Name: employee_actiontype_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_actiontype ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_actiontype_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_bonuspoint; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_bonuspoint (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    points integer NOT NULL,
    encashment_condition character varying(100),
    redeeming_points integer,
    reason text,
    created_by_id integer,
    employee_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.employee_bonuspoint OWNER TO horilla;

--
-- Name: employee_bonuspoint_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_bonuspoint ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_bonuspoint_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_disciplinaryaction; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_disciplinaryaction (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    description text NOT NULL,
    unit_in character varying(10) NOT NULL,
    days integer,
    hours character varying(6),
    start_date date,
    attachment character varying(100),
    action_id bigint NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.employee_disciplinaryaction OWNER TO horilla;

--
-- Name: employee_disciplinaryaction_employee_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_disciplinaryaction_employee_id (
    id bigint NOT NULL,
    disciplinaryaction_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.employee_disciplinaryaction_employee_id OWNER TO horilla;

--
-- Name: employee_disciplinaryaction_employee_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_disciplinaryaction_employee_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_disciplinaryaction_employee_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_disciplinaryaction_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_disciplinaryaction ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_disciplinaryaction_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_employee; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_employee (
    id bigint NOT NULL,
    badge_id character varying(50),
    employee_first_name character varying(200) NOT NULL,
    employee_last_name character varying(200),
    employee_profile character varying(100),
    email character varying(254) NOT NULL,
    phone character varying(25) NOT NULL,
    address text,
    country character varying(100),
    state character varying(100),
    city character varying(30),
    zip character varying(20),
    dob date,
    gender character varying(10),
    qualification character varying(50),
    experience integer,
    marital_status character varying(50),
    children integer,
    emergency_contact character varying(15),
    emergency_contact_name character varying(20),
    emergency_contact_relation character varying(20),
    is_active boolean NOT NULL,
    additional_info jsonb,
    is_from_onboarding boolean,
    is_directly_converted boolean,
    employee_user_id_id integer
);


ALTER TABLE public.employee_employee OWNER TO horilla;

--
-- Name: employee_employee_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_employee ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_employee_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_employeebankdetails; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_employeebankdetails (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    bank_name character varying(50) NOT NULL,
    account_number character varying(50),
    branch character varying(50),
    address text,
    country character varying(50),
    state character varying(50) NOT NULL,
    city character varying(50) NOT NULL,
    any_other_code1 character varying(50),
    any_other_code2 character varying(50),
    additional_info jsonb,
    created_by_id integer,
    employee_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.employee_employeebankdetails OWNER TO horilla;

--
-- Name: employee_employeebankdetails_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_employeebankdetails ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_employeebankdetails_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_employeegeneralsetting; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_employeegeneralsetting (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    badge_id_prefix character varying(5) NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.employee_employeegeneralsetting OWNER TO horilla;

--
-- Name: employee_employeegeneralsetting_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_employeegeneralsetting ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_employeegeneralsetting_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_employeenote; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_employeenote (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    description text,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    updated_by_id bigint NOT NULL
);


ALTER TABLE public.employee_employeenote OWNER TO horilla;

--
-- Name: employee_employeenote_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_employeenote ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_employeenote_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_employeenote_note_files; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_employeenote_note_files (
    id bigint NOT NULL,
    employeenote_id bigint NOT NULL,
    notefiles_id bigint NOT NULL
);


ALTER TABLE public.employee_employeenote_note_files OWNER TO horilla;

--
-- Name: employee_employeenote_note_files_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_employeenote_note_files ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_employeenote_note_files_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_employeetag; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_employeetag (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(50),
    color character varying(30),
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.employee_employeetag OWNER TO horilla;

--
-- Name: employee_employeetag_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_employeetag ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_employeetag_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_employeeworkinformation; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_employeeworkinformation (
    id bigint NOT NULL,
    location character varying(50),
    email character varying(254),
    mobile character varying(254),
    date_joining date,
    contract_end_date date,
    basic_salary integer,
    salary_hour integer,
    additional_info jsonb,
    experience double precision,
    company_id_id bigint,
    department_id_id bigint,
    employee_id_id bigint,
    employee_type_id_id bigint,
    job_position_id_id bigint,
    job_role_id_id bigint,
    reporting_manager_id_id bigint,
    shift_id_id bigint,
    work_type_id_id bigint
);


ALTER TABLE public.employee_employeeworkinformation OWNER TO horilla;

--
-- Name: employee_employeeworkinformation_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_employeeworkinformation ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_employeeworkinformation_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_employeeworkinformation_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_employeeworkinformation_tags (
    id bigint NOT NULL,
    employeeworkinformation_id bigint NOT NULL,
    employeetag_id bigint NOT NULL
);


ALTER TABLE public.employee_employeeworkinformation_tags OWNER TO horilla;

--
-- Name: employee_employeeworkinformation_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_employeeworkinformation_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_employeeworkinformation_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_historicalbonuspoint; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_historicalbonuspoint (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    points integer NOT NULL,
    encashment_condition character varying(100),
    redeeming_points integer,
    reason text,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer
);


ALTER TABLE public.employee_historicalbonuspoint OWNER TO horilla;

--
-- Name: employee_historicalbonuspoint_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_historicalbonuspoint ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_historicalbonuspoint_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_historicalbonuspoint_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_historicalbonuspoint_history_tags (
    id bigint NOT NULL,
    historicalbonuspoint_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.employee_historicalbonuspoint_history_tags OWNER TO horilla;

--
-- Name: employee_historicalbonuspoint_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_historicalbonuspoint_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_historicalbonuspoint_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_historicalemployeeworkinformation; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_historicalemployeeworkinformation (
    id bigint NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    location character varying(50),
    email character varying(254),
    mobile character varying(254),
    date_joining date,
    contract_end_date date,
    basic_salary integer,
    salary_hour integer,
    additional_info jsonb,
    experience double precision,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    company_id_id bigint,
    department_id_id bigint,
    employee_id_id bigint,
    employee_type_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    job_position_id_id bigint,
    job_role_id_id bigint,
    reporting_manager_id_id bigint,
    shift_id_id bigint,
    work_type_id_id bigint
);


ALTER TABLE public.employee_historicalemployeeworkinformation OWNER TO horilla;

--
-- Name: employee_historicalemployeeworkinformation_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_historicalemployeeworkinformation ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_historicalemployeeworkinformation_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_historicalemployeeworkinformation_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_historicalemployeeworkinformation_history_tags (
    id bigint NOT NULL,
    historicalemployeeworkinformation_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.employee_historicalemployeeworkinformation_history_tags OWNER TO horilla;

--
-- Name: employee_historicalemployeeworkinformation_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_historicalemployeeworkinformation_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_historicalemployeeworkinformation_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_notefiles; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_notefiles (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    files character varying(100),
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.employee_notefiles OWNER TO horilla;

--
-- Name: employee_notefiles_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_notefiles ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_notefiles_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_policy; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_policy (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(50) NOT NULL,
    body text NOT NULL,
    is_visible_to_all boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.employee_policy OWNER TO horilla;

--
-- Name: employee_policy_attachments; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_policy_attachments (
    id bigint NOT NULL,
    policy_id bigint NOT NULL,
    policymultiplefile_id bigint NOT NULL
);


ALTER TABLE public.employee_policy_attachments OWNER TO horilla;

--
-- Name: employee_policy_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_policy_attachments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_policy_attachments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_policy_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_policy_company_id (
    id bigint NOT NULL,
    policy_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.employee_policy_company_id OWNER TO horilla;

--
-- Name: employee_policy_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_policy_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_policy_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_policy_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_policy ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_policy_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_policy_specific_employees; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_policy_specific_employees (
    id bigint NOT NULL,
    policy_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.employee_policy_specific_employees OWNER TO horilla;

--
-- Name: employee_policy_specific_employees_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_policy_specific_employees ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_policy_specific_employees_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_policymultiplefile; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_policymultiplefile (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    attachment character varying(100) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.employee_policymultiplefile OWNER TO horilla;

--
-- Name: employee_policymultiplefile_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_policymultiplefile ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_policymultiplefile_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: employee_profileeditfeature; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.employee_profileeditfeature (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    is_enabled boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.employee_profileeditfeature OWNER TO horilla;

--
-- Name: employee_profileeditfeature_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.employee_profileeditfeature ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.employee_profileeditfeature_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: facedetection_employeefacedetection; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.facedetection_employeefacedetection (
    id bigint NOT NULL,
    image character varying(100) NOT NULL,
    employee_id_id bigint NOT NULL
);


ALTER TABLE public.facedetection_employeefacedetection OWNER TO horilla;

--
-- Name: facedetection_employeefacedetection_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.facedetection_employeefacedetection ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.facedetection_employeefacedetection_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: facedetection_facedetection; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.facedetection_facedetection (
    id bigint NOT NULL,
    start boolean NOT NULL,
    company_id_id bigint
);


ALTER TABLE public.facedetection_facedetection OWNER TO horilla;

--
-- Name: facedetection_facedetection_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.facedetection_facedetection ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.facedetection_facedetection_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: geofencing_geofencing; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.geofencing_geofencing (
    id bigint NOT NULL,
    latitude double precision NOT NULL,
    longitude double precision NOT NULL,
    radius_in_meters integer NOT NULL,
    start boolean NOT NULL,
    company_id_id bigint
);


ALTER TABLE public.geofencing_geofencing OWNER TO horilla;

--
-- Name: geofencing_geofencing_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.geofencing_geofencing ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.geofencing_geofencing_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_attachment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_attachment (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    file character varying(100) NOT NULL,
    description character varying(100),
    format character varying(50),
    comment_id bigint,
    created_by_id integer,
    modified_by_id integer,
    ticket_id bigint
);


ALTER TABLE public.helpdesk_attachment OWNER TO horilla;

--
-- Name: helpdesk_attachment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_attachment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_attachment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_claimrequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_claimrequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    is_approved boolean NOT NULL,
    is_rejected boolean NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    modified_by_id integer,
    ticket_id_id bigint
);


ALTER TABLE public.helpdesk_claimrequest OWNER TO horilla;

--
-- Name: helpdesk_claimrequest_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_claimrequest ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_claimrequest_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_comment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_comment (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    comment text,
    date timestamp with time zone NOT NULL,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    ticket_id bigint NOT NULL
);


ALTER TABLE public.helpdesk_comment OWNER TO horilla;

--
-- Name: helpdesk_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_comment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_comment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_departmentmanager; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_departmentmanager (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    department_id bigint NOT NULL,
    manager_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.helpdesk_departmentmanager OWNER TO horilla;

--
-- Name: helpdesk_departmentmanager_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_departmentmanager ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_departmentmanager_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_faq; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_faq (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    question character varying(255) NOT NULL,
    answer text NOT NULL,
    category_id bigint NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.helpdesk_faq OWNER TO horilla;

--
-- Name: helpdesk_faq_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_faq ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_faq_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_faq_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_faq_tags (
    id bigint NOT NULL,
    faq_id bigint NOT NULL,
    tags_id bigint NOT NULL
);


ALTER TABLE public.helpdesk_faq_tags OWNER TO horilla;

--
-- Name: helpdesk_faq_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_faq_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_faq_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_faqcategory; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_faqcategory (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(30) NOT NULL,
    description text,
    created_by_id integer,
    modified_by_id integer,
    company_id_id bigint
);


ALTER TABLE public.helpdesk_faqcategory OWNER TO horilla;

--
-- Name: helpdesk_faqcategory_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_faqcategory ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_faqcategory_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_historicalticket; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_historicalticket (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    title character varying(50) NOT NULL,
    description text NOT NULL,
    priority character varying(100) NOT NULL,
    created_date date NOT NULL,
    resolved_date date,
    assigning_type character varying(100) NOT NULL,
    raised_on character varying(100) NOT NULL,
    deadline date,
    status character varying(50) NOT NULL,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer,
    ticket_type_id bigint
);


ALTER TABLE public.helpdesk_historicalticket OWNER TO horilla;

--
-- Name: helpdesk_historicalticket_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_historicalticket ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_historicalticket_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_historicalticket_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_historicalticket_history_tags (
    id bigint NOT NULL,
    historicalticket_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.helpdesk_historicalticket_history_tags OWNER TO horilla;

--
-- Name: helpdesk_historicalticket_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_historicalticket_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_historicalticket_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_ticket; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_ticket (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(50) NOT NULL,
    description text NOT NULL,
    priority character varying(100) NOT NULL,
    created_date date NOT NULL,
    resolved_date date,
    assigning_type character varying(100) NOT NULL,
    raised_on character varying(100) NOT NULL,
    deadline date,
    status character varying(50) NOT NULL,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    ticket_type_id bigint NOT NULL
);


ALTER TABLE public.helpdesk_ticket OWNER TO horilla;

--
-- Name: helpdesk_ticket_assigned_to; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_ticket_assigned_to (
    id bigint NOT NULL,
    ticket_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.helpdesk_ticket_assigned_to OWNER TO horilla;

--
-- Name: helpdesk_ticket_assigned_to_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_ticket_assigned_to ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_ticket_assigned_to_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_ticket_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_ticket ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_ticket_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_ticket_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_ticket_tags (
    id bigint NOT NULL,
    ticket_id bigint NOT NULL,
    tags_id bigint NOT NULL
);


ALTER TABLE public.helpdesk_ticket_tags OWNER TO horilla;

--
-- Name: helpdesk_ticket_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_ticket_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_ticket_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: helpdesk_tickettype; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.helpdesk_tickettype (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(100) NOT NULL,
    type character varying(50) NOT NULL,
    prefix character varying(3) NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.helpdesk_tickettype OWNER TO horilla;

--
-- Name: helpdesk_tickettype_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.helpdesk_tickettype ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.helpdesk_tickettype_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_audit_accountblockunblock; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_audit_accountblockunblock (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    is_enabled boolean,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.horilla_audit_accountblockunblock OWNER TO horilla;

--
-- Name: horilla_audit_accountblockunblock_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_audit_accountblockunblock ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_audit_accountblockunblock_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_audit_audittag; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_audit_audittag (
    id bigint NOT NULL,
    title character varying(20) NOT NULL,
    highlight boolean NOT NULL
);


ALTER TABLE public.horilla_audit_audittag OWNER TO horilla;

--
-- Name: horilla_audit_audittag_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_audit_audittag ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_audit_audittag_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_audit_historytrackingfields; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_audit_historytrackingfields (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    tracking_fields jsonb,
    work_info_track boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.horilla_audit_historytrackingfields OWNER TO horilla;

--
-- Name: horilla_audit_historytrackingfields_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_audit_historytrackingfields ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_audit_historytrackingfields_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_automations_mailautomation; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_automations_mailautomation (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(256) NOT NULL,
    method_title character varying(50) NOT NULL,
    model character varying(100) NOT NULL,
    mail_to text NOT NULL,
    mail_details character varying(250) NOT NULL,
    mail_detail_choice text NOT NULL,
    trigger character varying(10) NOT NULL,
    condition_html text,
    condition_querystring text,
    condition text NOT NULL,
    created_by_id integer,
    mail_template_id bigint,
    modified_by_id integer,
    delivery_channel character varying(50) NOT NULL
);


ALTER TABLE public.horilla_automations_mailautomation OWNER TO horilla;

--
-- Name: horilla_automations_mailautomation_also_sent_to; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_automations_mailautomation_also_sent_to (
    id bigint NOT NULL,
    mailautomation_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.horilla_automations_mailautomation_also_sent_to OWNER TO horilla;

--
-- Name: horilla_automations_mailautomation_also_sent_to_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_automations_mailautomation_also_sent_to ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_automations_mailautomation_also_sent_to_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_automations_mailautomation_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_automations_mailautomation ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_automations_mailautomation_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_automations_mailautomation_template_attachments; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_automations_mailautomation_template_attachments (
    id bigint NOT NULL,
    mailautomation_id bigint NOT NULL,
    horillamailtemplate_id bigint NOT NULL
);


ALTER TABLE public.horilla_automations_mailautomation_template_attachments OWNER TO horilla;

--
-- Name: horilla_automations_mailautomation_template_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_automations_mailautomation_template_attachments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_automations_mailautomation_template_attachments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_backup_googledrivebackup; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_backup_googledrivebackup (
    id bigint NOT NULL,
    service_account_file character varying(100) NOT NULL,
    gdrive_folder_id character varying(255) NOT NULL,
    backup_media boolean,
    backup_db boolean,
    "interval" boolean,
    fixed boolean,
    seconds integer,
    hour integer,
    minute integer,
    active boolean NOT NULL
);


ALTER TABLE public.horilla_backup_googledrivebackup OWNER TO horilla;

--
-- Name: horilla_backup_googledrivebackup_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_backup_googledrivebackup ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_backup_googledrivebackup_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_backup_localbackup; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_backup_localbackup (
    id bigint NOT NULL,
    backup_path character varying(255) NOT NULL,
    backup_media boolean,
    backup_db boolean,
    "interval" boolean,
    fixed boolean,
    seconds integer,
    hour integer,
    minute integer,
    active boolean NOT NULL
);


ALTER TABLE public.horilla_backup_localbackup OWNER TO horilla;

--
-- Name: horilla_backup_localbackup_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_backup_localbackup ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_backup_localbackup_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_documents_document; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_documents_document (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(250) NOT NULL,
    document character varying(100),
    status character varying(10) NOT NULL,
    reject_reason text,
    issue_date date,
    expiry_date date,
    notify_before integer,
    is_digital_asset boolean NOT NULL,
    created_by_id integer,
    document_request_id_id bigint,
    employee_id_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.horilla_documents_document OWNER TO horilla;

--
-- Name: horilla_documents_document_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_documents_document ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_documents_document_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_documents_documentrequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_documents_documentrequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(100) NOT NULL,
    format character varying(10) NOT NULL,
    max_size integer,
    description text,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.horilla_documents_documentrequest OWNER TO horilla;

--
-- Name: horilla_documents_documentrequest_employee_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_documents_documentrequest_employee_id (
    id bigint NOT NULL,
    documentrequest_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.horilla_documents_documentrequest_employee_id OWNER TO horilla;

--
-- Name: horilla_documents_documentrequest_employee_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_documents_documentrequest_employee_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_documents_documentrequest_employee_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_documents_documentrequest_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_documents_documentrequest ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_documents_documentrequest_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_views_activegroup; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_views_activegroup (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    path character varying(256) NOT NULL,
    group_target character varying(256) NOT NULL,
    group_by_field character varying(256) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.horilla_views_activegroup OWNER TO horilla;

--
-- Name: horilla_views_activegroup_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_views_activegroup ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_views_activegroup_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_views_activetab; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_views_activetab (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    path character varying(256) NOT NULL,
    tab_target character varying(256) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.horilla_views_activetab OWNER TO horilla;

--
-- Name: horilla_views_activetab_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_views_activetab ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_views_activetab_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_views_activeview; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_views_activeview (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    path character varying(256) NOT NULL,
    type character varying(50) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.horilla_views_activeview OWNER TO horilla;

--
-- Name: horilla_views_activeview_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_views_activeview ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_views_activeview_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_views_savedfilter; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_views_savedfilter (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(20),
    color character varying(10) NOT NULL,
    is_default boolean NOT NULL,
    filter text NOT NULL,
    urlencode text NOT NULL,
    path character varying(256) NOT NULL,
    referrer character varying(256) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.horilla_views_savedfilter OWNER TO horilla;

--
-- Name: horilla_views_savedfilter_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_views_savedfilter ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_views_savedfilter_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: horilla_views_togglecolumn; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.horilla_views_togglecolumn (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    path character varying(256) NOT NULL,
    excluded_columns jsonb NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    user_id_id integer NOT NULL
);


ALTER TABLE public.horilla_views_togglecolumn OWNER TO horilla;

--
-- Name: horilla_views_togglecolumn_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.horilla_views_togglecolumn ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.horilla_views_togglecolumn_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_availableleave; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_availableleave (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    available_days double precision NOT NULL,
    carryforward_days double precision NOT NULL,
    total_leave_days double precision NOT NULL,
    assigned_date date NOT NULL,
    reset_date date,
    expired_date date,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    leave_type_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.leave_availableleave OWNER TO horilla;

--
-- Name: leave_availableleave_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_availableleave ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_availableleave_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_companyleave; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_companyleave (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    based_on_week character varying(100),
    based_on_week_day character varying(100) NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.leave_companyleave OWNER TO horilla;

--
-- Name: leave_companyleave_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_companyleave ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_companyleave_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_compensatoryleaverequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_compensatoryleaverequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    requested_days double precision,
    requested_date date NOT NULL,
    description text NOT NULL,
    status character varying(30) NOT NULL,
    reject_reason text NOT NULL,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    leave_type_id_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.leave_compensatoryleaverequest OWNER TO horilla;

--
-- Name: leave_compensatoryleaverequest_attendance_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_compensatoryleaverequest_attendance_id (
    id bigint NOT NULL,
    compensatoryleaverequest_id bigint NOT NULL,
    attendance_id bigint NOT NULL
);


ALTER TABLE public.leave_compensatoryleaverequest_attendance_id OWNER TO horilla;

--
-- Name: leave_compensatoryleaverequest_attendance_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_compensatoryleaverequest_attendance_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_compensatoryleaverequest_attendance_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_compensatoryleaverequest_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_compensatoryleaverequest ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_compensatoryleaverequest_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_compensatoryleaverequestcomment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_compensatoryleaverequestcomment (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    comment text,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    request_id_id bigint NOT NULL
);


ALTER TABLE public.leave_compensatoryleaverequestcomment OWNER TO horilla;

--
-- Name: leave_compensatoryleaverequestcomment_files; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_compensatoryleaverequestcomment_files (
    id bigint NOT NULL,
    compensatoryleaverequestcomment_id bigint NOT NULL,
    leaverequestfile_id bigint NOT NULL
);


ALTER TABLE public.leave_compensatoryleaverequestcomment_files OWNER TO horilla;

--
-- Name: leave_compensatoryleaverequestcomment_files_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_compensatoryleaverequestcomment_files ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_compensatoryleaverequestcomment_files_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_compensatoryleaverequestcomment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_compensatoryleaverequestcomment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_compensatoryleaverequestcomment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_employeepastleaverestrict; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_employeepastleaverestrict (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    enabled boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.leave_employeepastleaverestrict OWNER TO horilla;

--
-- Name: leave_employeepastleaverestrict_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_employeepastleaverestrict ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_employeepastleaverestrict_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_historicalavailableleave; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_historicalavailableleave (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    available_days double precision NOT NULL,
    carryforward_days double precision NOT NULL,
    total_leave_days double precision NOT NULL,
    assigned_date date NOT NULL,
    reset_date date,
    expired_date date,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    leave_type_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.leave_historicalavailableleave OWNER TO horilla;

--
-- Name: leave_historicalavailableleave_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_historicalavailableleave ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_historicalavailableleave_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_historicalavailableleave_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_historicalavailableleave_history_tags (
    id bigint NOT NULL,
    historicalavailableleave_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.leave_historicalavailableleave_history_tags OWNER TO horilla;

--
-- Name: leave_historicalavailableleave_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_historicalavailableleave_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_historicalavailableleave_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_historicalcompensatoryleaverequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_historicalcompensatoryleaverequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    requested_days double precision,
    requested_date date NOT NULL,
    description text NOT NULL,
    status character varying(30) NOT NULL,
    reject_reason text NOT NULL,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    leave_type_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.leave_historicalcompensatoryleaverequest OWNER TO horilla;

--
-- Name: leave_historicalcompensatoryleaverequest_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_historicalcompensatoryleaverequest ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_historicalcompensatoryleaverequest_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_historicalcompensatoryleaverequest_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_historicalcompensatoryleaverequest_history_tags (
    id bigint NOT NULL,
    historicalcompensatoryleaverequest_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.leave_historicalcompensatoryleaverequest_history_tags OWNER TO horilla;

--
-- Name: leave_historicalcompensatoryleaverequest_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_historicalcompensatoryleaverequest_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_historicalcompensatoryleaverequest_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_historicalleaveallocationrequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_historicalleaveallocationrequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    requested_days double precision,
    requested_date date NOT NULL,
    description text NOT NULL,
    attachment text,
    status character varying(30) NOT NULL,
    reject_reason text NOT NULL,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    leave_type_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.leave_historicalleaveallocationrequest OWNER TO horilla;

--
-- Name: leave_historicalleaveallocationrequest_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_historicalleaveallocationrequest ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_historicalleaveallocationrequest_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_historicalleaveallocationrequest_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_historicalleaveallocationrequest_history_tags (
    id bigint NOT NULL,
    historicalleaveallocationrequest_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.leave_historicalleaveallocationrequest_history_tags OWNER TO horilla;

--
-- Name: leave_historicalleaveallocationrequest_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_historicalleaveallocationrequest_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_historicalleaveallocationrequest_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_historicalleaverequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_historicalleaverequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    start_date date NOT NULL,
    start_date_breakdown character varying(30) NOT NULL,
    end_date date,
    end_date_breakdown character varying(30) NOT NULL,
    requested_days double precision,
    leave_clashes_count integer NOT NULL,
    description text NOT NULL,
    attachment text,
    status character varying(30) NOT NULL,
    requested_date date NOT NULL,
    approved_available_days double precision NOT NULL,
    approved_carryforward_days double precision NOT NULL,
    reject_reason text NOT NULL,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id bigint,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    leave_type_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.leave_historicalleaverequest OWNER TO horilla;

--
-- Name: leave_historicalleaverequest_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_historicalleaverequest ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_historicalleaverequest_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_historicalleaverequest_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_historicalleaverequest_history_tags (
    id bigint NOT NULL,
    historicalleaverequest_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.leave_historicalleaverequest_history_tags OWNER TO horilla;

--
-- Name: leave_historicalleaverequest_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_historicalleaverequest_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_historicalleaverequest_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_holiday; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_holiday (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    name character varying(30) NOT NULL,
    start_date date NOT NULL,
    end_date date,
    recurring boolean NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.leave_holiday OWNER TO horilla;

--
-- Name: leave_holiday_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_holiday ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_holiday_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_leaveallocationrequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_leaveallocationrequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    requested_days double precision,
    requested_date date NOT NULL,
    description text NOT NULL,
    attachment character varying(100),
    status character varying(30) NOT NULL,
    reject_reason text NOT NULL,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    leave_type_id_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.leave_leaveallocationrequest OWNER TO horilla;

--
-- Name: leave_leaveallocationrequest_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_leaveallocationrequest ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_leaveallocationrequest_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_leaveallocationrequestcomment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_leaveallocationrequestcomment (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    comment text,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    request_id_id bigint NOT NULL
);


ALTER TABLE public.leave_leaveallocationrequestcomment OWNER TO horilla;

--
-- Name: leave_leaveallocationrequestcomment_files; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_leaveallocationrequestcomment_files (
    id bigint NOT NULL,
    leaveallocationrequestcomment_id bigint NOT NULL,
    leaverequestfile_id bigint NOT NULL
);


ALTER TABLE public.leave_leaveallocationrequestcomment_files OWNER TO horilla;

--
-- Name: leave_leaveallocationrequestcomment_files_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_leaveallocationrequestcomment_files ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_leaveallocationrequestcomment_files_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_leaveallocationrequestcomment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_leaveallocationrequestcomment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_leaveallocationrequestcomment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_leavegeneralsetting; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_leavegeneralsetting (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    compensatory_leave boolean NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.leave_leavegeneralsetting OWNER TO horilla;

--
-- Name: leave_leavegeneralsetting_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_leavegeneralsetting ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_leavegeneralsetting_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_leaverequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_leaverequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    start_date date NOT NULL,
    start_date_breakdown character varying(30) NOT NULL,
    end_date date,
    end_date_breakdown character varying(30) NOT NULL,
    requested_days double precision,
    leave_clashes_count integer NOT NULL,
    description text NOT NULL,
    attachment character varying(100),
    status character varying(30) NOT NULL,
    requested_date date NOT NULL,
    approved_available_days double precision NOT NULL,
    approved_carryforward_days double precision NOT NULL,
    reject_reason text NOT NULL,
    created_by_id bigint,
    employee_id_id bigint NOT NULL,
    leave_type_id_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.leave_leaverequest OWNER TO horilla;

--
-- Name: leave_leaverequest_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_leaverequest ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_leaverequest_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_leaverequestcomment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_leaverequestcomment (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    comment text,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    request_id_id bigint NOT NULL
);


ALTER TABLE public.leave_leaverequestcomment OWNER TO horilla;

--
-- Name: leave_leaverequestcomment_files; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_leaverequestcomment_files (
    id bigint NOT NULL,
    leaverequestcomment_id bigint NOT NULL,
    leaverequestfile_id bigint NOT NULL
);


ALTER TABLE public.leave_leaverequestcomment_files OWNER TO horilla;

--
-- Name: leave_leaverequestcomment_files_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_leaverequestcomment_files ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_leaverequestcomment_files_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_leaverequestcomment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_leaverequestcomment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_leaverequestcomment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_leaverequestconditionapproval; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_leaverequestconditionapproval (
    id bigint NOT NULL,
    sequence integer NOT NULL,
    is_approved boolean NOT NULL,
    is_rejected boolean NOT NULL,
    leave_request_id_id bigint NOT NULL,
    manager_id_id bigint NOT NULL
);


ALTER TABLE public.leave_leaverequestconditionapproval OWNER TO horilla;

--
-- Name: leave_leaverequestconditionapproval_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_leaverequestconditionapproval ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_leaverequestconditionapproval_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_leaverequestfile; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_leaverequestfile (
    id bigint NOT NULL,
    file character varying(100) NOT NULL
);


ALTER TABLE public.leave_leaverequestfile OWNER TO horilla;

--
-- Name: leave_leaverequestfile_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_leaverequestfile ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_leaverequestfile_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_leavetype; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_leavetype (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    icon character varying(100),
    name character varying(30) NOT NULL,
    color character varying(30),
    payment character varying(30) NOT NULL,
    count double precision,
    period_in character varying(30) NOT NULL,
    limit_leave boolean NOT NULL,
    total_days double precision,
    reset boolean NOT NULL,
    is_encashable boolean NOT NULL,
    reset_based character varying(30),
    reset_month character varying(30) NOT NULL,
    reset_day character varying(30),
    reset_weekend character varying(10),
    carryforward_type character varying(30) NOT NULL,
    carryforward_max double precision,
    carryforward_expire_in integer,
    carryforward_expire_period character varying(30),
    carryforward_expire_date date,
    require_approval character varying(30),
    require_attachment character varying(30),
    exclude_company_leave character varying(30) NOT NULL,
    exclude_holiday character varying(30) NOT NULL,
    is_compensatory_leave boolean NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.leave_leavetype OWNER TO horilla;

--
-- Name: leave_leavetype_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_leavetype ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_leavetype_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_overrideleaverequests; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_overrideleaverequests (
    leaverequest_ptr_id bigint NOT NULL
);


ALTER TABLE public.leave_overrideleaverequests OWNER TO horilla;

--
-- Name: leave_restrictleave; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_restrictleave (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(200) NOT NULL,
    start_date date NOT NULL,
    end_date date NOT NULL,
    include_all boolean NOT NULL,
    description text,
    company_id_id bigint,
    created_by_id integer,
    department_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.leave_restrictleave OWNER TO horilla;

--
-- Name: leave_restrictleave_exclued_leave_types; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_restrictleave_exclued_leave_types (
    id bigint NOT NULL,
    restrictleave_id bigint NOT NULL,
    leavetype_id bigint NOT NULL
);


ALTER TABLE public.leave_restrictleave_exclued_leave_types OWNER TO horilla;

--
-- Name: leave_restrictleave_exclued_leave_types_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_restrictleave_exclued_leave_types ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_restrictleave_exclued_leave_types_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_restrictleave_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_restrictleave ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_restrictleave_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_restrictleave_job_position; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_restrictleave_job_position (
    id bigint NOT NULL,
    restrictleave_id bigint NOT NULL,
    jobposition_id bigint NOT NULL
);


ALTER TABLE public.leave_restrictleave_job_position OWNER TO horilla;

--
-- Name: leave_restrictleave_job_position_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_restrictleave_job_position ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_restrictleave_job_position_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: leave_restrictleave_spesific_leave_types; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.leave_restrictleave_spesific_leave_types (
    id bigint NOT NULL,
    restrictleave_id bigint NOT NULL,
    leavetype_id bigint NOT NULL
);


ALTER TABLE public.leave_restrictleave_spesific_leave_types OWNER TO horilla;

--
-- Name: leave_restrictleave_spesific_leave_types_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.leave_restrictleave_spesific_leave_types ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.leave_restrictleave_spesific_leave_types_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: notifications_notification; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.notifications_notification (
    id integer NOT NULL,
    level character varying(20) NOT NULL,
    unread boolean NOT NULL,
    actor_object_id character varying(255) NOT NULL,
    verb character varying(255) NOT NULL,
    description text,
    target_object_id character varying(255),
    action_object_object_id character varying(255),
    "timestamp" timestamp with time zone NOT NULL,
    public boolean NOT NULL,
    deleted boolean NOT NULL,
    emailed boolean NOT NULL,
    data jsonb,
    verb_en character varying(255),
    verb_ar character varying(255),
    verb_de character varying(255),
    verb_es character varying(255),
    verb_fr character varying(255),
    action_object_content_type_id integer,
    actor_content_type_id integer NOT NULL,
    recipient_id integer NOT NULL,
    target_content_type_id integer
);


ALTER TABLE public.notifications_notification OWNER TO horilla;

--
-- Name: notifications_notification_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.notifications_notification ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.notifications_notification_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_employeetask; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_employeetask (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    status character varying(20) NOT NULL,
    description text,
    created_by_id integer,
    employee_id_id bigint,
    modified_by_id integer,
    task_id_id bigint NOT NULL
);


ALTER TABLE public.offboarding_employeetask OWNER TO horilla;

--
-- Name: offboarding_employeetask_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_employeetask ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_employeetask_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_exitreason; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_exitreason (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(50) NOT NULL,
    description text NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    offboarding_employee_id_id bigint NOT NULL
);


ALTER TABLE public.offboarding_exitreason OWNER TO horilla;

--
-- Name: offboarding_exitreason_attachments; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_exitreason_attachments (
    id bigint NOT NULL,
    exitreason_id bigint NOT NULL,
    offboardingstagemultiplefile_id bigint NOT NULL
);


ALTER TABLE public.offboarding_exitreason_attachments OWNER TO horilla;

--
-- Name: offboarding_exitreason_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_exitreason_attachments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_exitreason_attachments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_exitreason_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_exitreason ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_exitreason_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_historicalemployeetask; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_historicalemployeetask (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    status character varying(20) NOT NULL,
    description text,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer,
    task_id_id bigint
);


ALTER TABLE public.offboarding_historicalemployeetask OWNER TO horilla;

--
-- Name: offboarding_historicalemployeetask_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_historicalemployeetask ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_historicalemployeetask_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_historicalemployeetask_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_historicalemployeetask_history_tags (
    id bigint NOT NULL,
    historicalemployeetask_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.offboarding_historicalemployeetask_history_tags OWNER TO horilla;

--
-- Name: offboarding_historicalemployeetask_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_historicalemployeetask_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_historicalemployeetask_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_offboarding; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_offboarding (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(20) NOT NULL,
    description text NOT NULL,
    status character varying(10) NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.offboarding_offboarding OWNER TO horilla;

--
-- Name: offboarding_offboarding_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_offboarding ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_offboarding_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_offboarding_managers; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_offboarding_managers (
    id bigint NOT NULL,
    offboarding_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.offboarding_offboarding_managers OWNER TO horilla;

--
-- Name: offboarding_offboarding_managers_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_offboarding_managers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_offboarding_managers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_offboardingemployee; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_offboardingemployee (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    notice_period integer,
    unit character varying(10),
    notice_period_starts date,
    notice_period_ends date,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    stage_id_id bigint
);


ALTER TABLE public.offboarding_offboardingemployee OWNER TO horilla;

--
-- Name: offboarding_offboardingemployee_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_offboardingemployee ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_offboardingemployee_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_offboardinggeneralsetting; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_offboardinggeneralsetting (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    resignation_request boolean NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.offboarding_offboardinggeneralsetting OWNER TO horilla;

--
-- Name: offboarding_offboardinggeneralsetting_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_offboardinggeneralsetting ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_offboardinggeneralsetting_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_offboardingnote; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_offboardingnote (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    description text,
    created_by_id integer,
    employee_id_id bigint,
    modified_by_id integer,
    note_by_id bigint,
    stage_id_id bigint
);


ALTER TABLE public.offboarding_offboardingnote OWNER TO horilla;

--
-- Name: offboarding_offboardingnote_attachments; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_offboardingnote_attachments (
    id bigint NOT NULL,
    offboardingnote_id bigint NOT NULL,
    offboardingstagemultiplefile_id bigint NOT NULL
);


ALTER TABLE public.offboarding_offboardingnote_attachments OWNER TO horilla;

--
-- Name: offboarding_offboardingnote_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_offboardingnote_attachments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_offboardingnote_attachments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_offboardingnote_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_offboardingnote ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_offboardingnote_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_offboardingstage; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_offboardingstage (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(20) NOT NULL,
    type character varying(13) NOT NULL,
    sequence integer NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    offboarding_id_id bigint NOT NULL
);


ALTER TABLE public.offboarding_offboardingstage OWNER TO horilla;

--
-- Name: offboarding_offboardingstage_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_offboardingstage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_offboardingstage_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_offboardingstage_managers; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_offboardingstage_managers (
    id bigint NOT NULL,
    offboardingstage_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.offboarding_offboardingstage_managers OWNER TO horilla;

--
-- Name: offboarding_offboardingstage_managers_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_offboardingstage_managers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_offboardingstage_managers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_offboardingstagemultiplefile; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_offboardingstagemultiplefile (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    attachment character varying(100) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.offboarding_offboardingstagemultiplefile OWNER TO horilla;

--
-- Name: offboarding_offboardingstagemultiplefile_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_offboardingstagemultiplefile ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_offboardingstagemultiplefile_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_offboardingtask; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_offboardingtask (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(30) NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    stage_id_id bigint
);


ALTER TABLE public.offboarding_offboardingtask OWNER TO horilla;

--
-- Name: offboarding_offboardingtask_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_offboardingtask ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_offboardingtask_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_offboardingtask_managers; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_offboardingtask_managers (
    id bigint NOT NULL,
    offboardingtask_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.offboarding_offboardingtask_managers OWNER TO horilla;

--
-- Name: offboarding_offboardingtask_managers_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_offboardingtask_managers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_offboardingtask_managers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: offboarding_resignationletter; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.offboarding_resignationletter (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(100),
    description text,
    planned_to_leave_on date NOT NULL,
    status character varying(10) NOT NULL,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    offboarding_employee_id_id bigint
);


ALTER TABLE public.offboarding_resignationletter OWNER TO horilla;

--
-- Name: offboarding_resignationletter_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.offboarding_resignationletter ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.offboarding_resignationletter_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: onboarding_candidatestage; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.onboarding_candidatestage (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    onboarding_end_date date,
    sequence integer,
    candidate_id_id bigint NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    onboarding_stage_id_id bigint NOT NULL
);


ALTER TABLE public.onboarding_candidatestage OWNER TO horilla;

--
-- Name: onboarding_candidatestage_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.onboarding_candidatestage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.onboarding_candidatestage_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: onboarding_candidatetask; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.onboarding_candidatetask (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    status character varying(50),
    candidate_id_id bigint NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    onboarding_task_id_id bigint NOT NULL,
    stage_id_id bigint
);


ALTER TABLE public.onboarding_candidatetask OWNER TO horilla;

--
-- Name: onboarding_candidatetask_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.onboarding_candidatetask ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.onboarding_candidatetask_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: onboarding_historicalcandidatetask; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.onboarding_historicalcandidatetask (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    status character varying(50),
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    candidate_id_id bigint,
    created_by_id integer,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer,
    onboarding_task_id_id bigint,
    stage_id_id bigint
);


ALTER TABLE public.onboarding_historicalcandidatetask OWNER TO horilla;

--
-- Name: onboarding_historicalcandidatetask_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.onboarding_historicalcandidatetask ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.onboarding_historicalcandidatetask_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: onboarding_historicalcandidatetask_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.onboarding_historicalcandidatetask_history_tags (
    id bigint NOT NULL,
    historicalcandidatetask_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.onboarding_historicalcandidatetask_history_tags OWNER TO horilla;

--
-- Name: onboarding_historicalcandidatetask_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.onboarding_historicalcandidatetask_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.onboarding_historicalcandidatetask_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: onboarding_onboardingportal; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.onboarding_onboardingportal (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    token character varying(200) NOT NULL,
    used boolean NOT NULL,
    count integer NOT NULL,
    profile character varying(100),
    candidate_id_id bigint NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.onboarding_onboardingportal OWNER TO horilla;

--
-- Name: onboarding_onboardingportal_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.onboarding_onboardingportal ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.onboarding_onboardingportal_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: onboarding_onboardingstage; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.onboarding_onboardingstage (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    stage_title character varying(200) NOT NULL,
    sequence integer,
    is_final_stage boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    recruitment_id_id bigint
);


ALTER TABLE public.onboarding_onboardingstage OWNER TO horilla;

--
-- Name: onboarding_onboardingstage_employee_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.onboarding_onboardingstage_employee_id (
    id bigint NOT NULL,
    onboardingstage_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.onboarding_onboardingstage_employee_id OWNER TO horilla;

--
-- Name: onboarding_onboardingstage_employee_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.onboarding_onboardingstage_employee_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.onboarding_onboardingstage_employee_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: onboarding_onboardingstage_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.onboarding_onboardingstage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.onboarding_onboardingstage_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: onboarding_onboardingtask; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.onboarding_onboardingtask (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    task_title character varying(200) NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    stage_id_id bigint
);


ALTER TABLE public.onboarding_onboardingtask OWNER TO horilla;

--
-- Name: onboarding_onboardingtask_candidates; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.onboarding_onboardingtask_candidates (
    id bigint NOT NULL,
    onboardingtask_id bigint NOT NULL,
    candidate_id bigint NOT NULL
);


ALTER TABLE public.onboarding_onboardingtask_candidates OWNER TO horilla;

--
-- Name: onboarding_onboardingtask_candidates_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.onboarding_onboardingtask_candidates ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.onboarding_onboardingtask_candidates_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: onboarding_onboardingtask_employee_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.onboarding_onboardingtask_employee_id (
    id bigint NOT NULL,
    onboardingtask_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.onboarding_onboardingtask_employee_id OWNER TO horilla;

--
-- Name: onboarding_onboardingtask_employee_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.onboarding_onboardingtask_employee_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.onboarding_onboardingtask_employee_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: onboarding_onboardingtask_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.onboarding_onboardingtask ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.onboarding_onboardingtask_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_allowance; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_allowance (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(255) NOT NULL,
    one_time_date date,
    include_active_employees boolean NOT NULL,
    is_taxable boolean NOT NULL,
    is_condition_based boolean NOT NULL,
    field character varying(255),
    condition character varying(255),
    value character varying(255),
    is_fixed boolean NOT NULL,
    amount double precision,
    based_on character varying(255),
    rate double precision,
    per_attendance_fixed_amount double precision,
    per_children_fixed_amount double precision,
    shift_per_attendance_amount double precision,
    amount_per_one_hr double precision,
    work_type_per_attendance_amount double precision,
    has_max_limit boolean NOT NULL,
    maximum_amount double precision,
    maximum_unit character varying(20),
    if_choice character varying(10) NOT NULL,
    if_condition character varying(10) NOT NULL,
    if_amount double precision NOT NULL,
    start_range double precision,
    end_range double precision,
    only_show_under_employee boolean NOT NULL,
    is_loan boolean NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer,
    shift_id_id bigint,
    work_type_id_id bigint
);


ALTER TABLE public.payroll_allowance OWNER TO horilla;

--
-- Name: payroll_allowance_exclude_employees; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_allowance_exclude_employees (
    id bigint NOT NULL,
    allowance_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.payroll_allowance_exclude_employees OWNER TO horilla;

--
-- Name: payroll_allowance_exclude_employees_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_allowance_exclude_employees ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_allowance_exclude_employees_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_allowance_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_allowance ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_allowance_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_allowance_other_conditions; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_allowance_other_conditions (
    id bigint NOT NULL,
    allowance_id bigint NOT NULL,
    multiplecondition_id bigint NOT NULL
);


ALTER TABLE public.payroll_allowance_other_conditions OWNER TO horilla;

--
-- Name: payroll_allowance_other_conditions_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_allowance_other_conditions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_allowance_other_conditions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_allowance_specific_employees; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_allowance_specific_employees (
    id bigint NOT NULL,
    allowance_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.payroll_allowance_specific_employees OWNER TO horilla;

--
-- Name: payroll_allowance_specific_employees_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_allowance_specific_employees ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_allowance_specific_employees_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_contract; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_contract (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    contract_name character varying(250) NOT NULL,
    contract_start_date date NOT NULL,
    contract_end_date date,
    wage_type character varying(250) NOT NULL,
    pay_frequency character varying(20),
    wage double precision,
    contract_status character varying(250) NOT NULL,
    notice_period_in_days integer NOT NULL,
    contract_document character varying(100),
    deduct_leave_from_basic_pay boolean NOT NULL,
    calculate_daily_leave_amount boolean NOT NULL,
    deduction_for_one_leave_amount double precision,
    note text,
    created_by_id integer,
    department_id bigint,
    employee_id_id bigint NOT NULL,
    filing_status_id bigint,
    job_position_id bigint,
    job_role_id bigint,
    modified_by_id integer,
    shift_id bigint,
    work_type_id bigint
);


ALTER TABLE public.payroll_contract OWNER TO horilla;

--
-- Name: payroll_contract_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_contract ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_contract_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_deduction; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_deduction (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(255) NOT NULL,
    one_time_date date,
    include_active_employees boolean NOT NULL,
    is_tax boolean NOT NULL,
    is_pretax boolean NOT NULL,
    is_condition_based boolean NOT NULL,
    field character varying(255),
    condition character varying(255),
    value character varying(255),
    update_compensation character varying(10),
    is_fixed boolean NOT NULL,
    amount double precision,
    based_on character varying(255),
    rate double precision,
    employer_rate double precision NOT NULL,
    has_max_limit boolean NOT NULL,
    maximum_amount double precision,
    maximum_unit character varying(20),
    if_choice character varying(10) NOT NULL,
    if_condition character varying(10) NOT NULL,
    if_amount double precision NOT NULL,
    start_range double precision,
    end_range double precision,
    only_show_under_employee boolean NOT NULL,
    is_installment boolean NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.payroll_deduction OWNER TO horilla;

--
-- Name: payroll_deduction_exclude_employees; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_deduction_exclude_employees (
    id bigint NOT NULL,
    deduction_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.payroll_deduction_exclude_employees OWNER TO horilla;

--
-- Name: payroll_deduction_exclude_employees_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_deduction_exclude_employees ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_deduction_exclude_employees_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_deduction_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_deduction ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_deduction_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_deduction_other_conditions; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_deduction_other_conditions (
    id bigint NOT NULL,
    deduction_id bigint NOT NULL,
    multiplecondition_id bigint NOT NULL
);


ALTER TABLE public.payroll_deduction_other_conditions OWNER TO horilla;

--
-- Name: payroll_deduction_other_conditions_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_deduction_other_conditions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_deduction_other_conditions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_deduction_specific_employees; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_deduction_specific_employees (
    id bigint NOT NULL,
    deduction_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.payroll_deduction_specific_employees OWNER TO horilla;

--
-- Name: payroll_deduction_specific_employees_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_deduction_specific_employees ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_deduction_specific_employees_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_encashmentgeneralsettings; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_encashmentgeneralsettings (
    id bigint NOT NULL,
    bonus_amount integer NOT NULL,
    leave_amount integer
);


ALTER TABLE public.payroll_encashmentgeneralsettings OWNER TO horilla;

--
-- Name: payroll_encashmentgeneralsettings_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_encashmentgeneralsettings ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_encashmentgeneralsettings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_filingstatus; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_filingstatus (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    filing_status character varying(30) NOT NULL,
    based_on character varying(255) NOT NULL,
    use_py boolean NOT NULL,
    python_code text,
    description text NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.payroll_filingstatus OWNER TO horilla;

--
-- Name: payroll_filingstatus_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_filingstatus ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_filingstatus_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_historicalcontract; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_historicalcontract (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    contract_name character varying(250) NOT NULL,
    contract_start_date date NOT NULL,
    contract_end_date date,
    wage_type character varying(250) NOT NULL,
    pay_frequency character varying(20),
    wage double precision,
    contract_status character varying(250) NOT NULL,
    notice_period_in_days integer NOT NULL,
    contract_document text,
    deduct_leave_from_basic_pay boolean NOT NULL,
    calculate_daily_leave_amount boolean NOT NULL,
    deduction_for_one_leave_amount double precision,
    note text,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    department_id bigint,
    employee_id_id bigint,
    filing_status_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    job_position_id bigint,
    job_role_id bigint,
    modified_by_id integer,
    shift_id bigint,
    work_type_id bigint
);


ALTER TABLE public.payroll_historicalcontract OWNER TO horilla;

--
-- Name: payroll_historicalcontract_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_historicalcontract ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_historicalcontract_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_historicalcontract_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_historicalcontract_history_tags (
    id bigint NOT NULL,
    historicalcontract_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.payroll_historicalcontract_history_tags OWNER TO horilla;

--
-- Name: payroll_historicalcontract_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_historicalcontract_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_historicalcontract_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_historicalpayslip; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_historicalpayslip (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    group_name character varying(50),
    reference character varying(255),
    start_date date NOT NULL,
    end_date date NOT NULL,
    pay_head_data jsonb NOT NULL,
    contract_wage double precision,
    basic_pay double precision,
    gross_pay double precision,
    deduction double precision,
    net_pay double precision,
    status character varying(20),
    sent_to_employee boolean,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer
);


ALTER TABLE public.payroll_historicalpayslip OWNER TO horilla;

--
-- Name: payroll_historicalpayslip_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_historicalpayslip ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_historicalpayslip_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_historicalpayslip_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_historicalpayslip_history_tags (
    id bigint NOT NULL,
    historicalpayslip_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.payroll_historicalpayslip_history_tags OWNER TO horilla;

--
-- Name: payroll_historicalpayslip_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_historicalpayslip_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_historicalpayslip_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_loanaccount; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_loanaccount (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    type character varying(15) NOT NULL,
    title character varying(20) NOT NULL,
    loan_amount double precision NOT NULL,
    provided_date date NOT NULL,
    description text,
    is_fixed boolean NOT NULL,
    rate double precision NOT NULL,
    installment_amount double precision,
    installments integer NOT NULL,
    installment_start_date date NOT NULL,
    apply_on character varying(20) NOT NULL,
    settled boolean NOT NULL,
    settled_date timestamp with time zone,
    allowance_id_id bigint,
    asset_id_id bigint,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.payroll_loanaccount OWNER TO horilla;

--
-- Name: payroll_loanaccount_deduction_ids; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_loanaccount_deduction_ids (
    id bigint NOT NULL,
    loanaccount_id bigint NOT NULL,
    deduction_id bigint NOT NULL
);


ALTER TABLE public.payroll_loanaccount_deduction_ids OWNER TO horilla;

--
-- Name: payroll_loanaccount_deduction_ids_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_loanaccount_deduction_ids ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_loanaccount_deduction_ids_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_loanaccount_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_loanaccount ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_loanaccount_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_multiplecondition; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_multiplecondition (
    id bigint NOT NULL,
    field character varying(255) NOT NULL,
    condition character varying(255),
    value character varying(255)
);


ALTER TABLE public.payroll_multiplecondition OWNER TO horilla;

--
-- Name: payroll_multiplecondition_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_multiplecondition ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_multiplecondition_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_overrideattendance; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_overrideattendance (
    attendance_ptr_id bigint NOT NULL
);


ALTER TABLE public.payroll_overrideattendance OWNER TO horilla;

--
-- Name: payroll_overrideleaverequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_overrideleaverequest (
    leaverequest_ptr_id bigint NOT NULL
);


ALTER TABLE public.payroll_overrideleaverequest OWNER TO horilla;

--
-- Name: payroll_payrollgeneralsetting; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_payrollgeneralsetting (
    id bigint NOT NULL,
    notice_period integer NOT NULL,
    company_id_id bigint
);


ALTER TABLE public.payroll_payrollgeneralsetting OWNER TO horilla;

--
-- Name: payroll_payrollgeneralsetting_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_payrollgeneralsetting ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_payrollgeneralsetting_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_payrollsettings; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_payrollsettings (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    currency_symbol character varying(5),
    "position" character varying(15),
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.payroll_payrollsettings OWNER TO horilla;

--
-- Name: payroll_payrollsettings_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_payrollsettings ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_payrollsettings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_payslip; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_payslip (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    group_name character varying(50),
    reference character varying(255),
    start_date date NOT NULL,
    end_date date NOT NULL,
    pay_head_data jsonb NOT NULL,
    contract_wage double precision,
    basic_pay double precision,
    gross_pay double precision,
    deduction double precision,
    net_pay double precision,
    status character varying(20),
    sent_to_employee boolean,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.payroll_payslip OWNER TO horilla;

--
-- Name: payroll_payslip_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_payslip ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_payslip_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_payslip_installment_ids; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_payslip_installment_ids (
    id bigint NOT NULL,
    payslip_id bigint NOT NULL,
    deduction_id bigint NOT NULL
);


ALTER TABLE public.payroll_payslip_installment_ids OWNER TO horilla;

--
-- Name: payroll_payslip_installment_ids_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_payslip_installment_ids ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_payslip_installment_ids_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_payslipautogenerate; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_payslipautogenerate (
    id bigint NOT NULL,
    generate_day character varying(30) NOT NULL,
    auto_generate boolean NOT NULL,
    company_id_id bigint
);


ALTER TABLE public.payroll_payslipautogenerate OWNER TO horilla;

--
-- Name: payroll_payslipautogenerate_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_payslipautogenerate ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_payslipautogenerate_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_reimbursement; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_reimbursement (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(50) NOT NULL,
    type character varying(16) NOT NULL,
    allowance_on date NOT NULL,
    attachment character varying(100),
    ad_to_encash double precision NOT NULL,
    cfd_to_encash double precision NOT NULL,
    bonus_to_encash integer NOT NULL,
    amount double precision NOT NULL,
    status character varying(10) NOT NULL,
    description text,
    allowance_id_id bigint,
    approved_by_id bigint,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    leave_type_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.payroll_reimbursement OWNER TO horilla;

--
-- Name: payroll_reimbursement_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_reimbursement ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_reimbursement_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_reimbursement_other_attachments; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_reimbursement_other_attachments (
    id bigint NOT NULL,
    reimbursement_id bigint NOT NULL,
    reimbursementmultipleattachment_id bigint NOT NULL
);


ALTER TABLE public.payroll_reimbursement_other_attachments OWNER TO horilla;

--
-- Name: payroll_reimbursement_other_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_reimbursement_other_attachments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_reimbursement_other_attachments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_reimbursementfile; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_reimbursementfile (
    id bigint NOT NULL,
    file character varying(100) NOT NULL
);


ALTER TABLE public.payroll_reimbursementfile OWNER TO horilla;

--
-- Name: payroll_reimbursementfile_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_reimbursementfile ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_reimbursementfile_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_reimbursementmultipleattachment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_reimbursementmultipleattachment (
    id bigint NOT NULL,
    attachment character varying(100) NOT NULL
);


ALTER TABLE public.payroll_reimbursementmultipleattachment OWNER TO horilla;

--
-- Name: payroll_reimbursementmultipleattachment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_reimbursementmultipleattachment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_reimbursementmultipleattachment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_reimbursementrequestcomment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_reimbursementrequestcomment (
    id bigint NOT NULL,
    is_active boolean NOT NULL,
    comment text,
    created_at timestamp with time zone,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    request_id_id bigint NOT NULL
);


ALTER TABLE public.payroll_reimbursementrequestcomment OWNER TO horilla;

--
-- Name: payroll_reimbursementrequestcomment_files; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_reimbursementrequestcomment_files (
    id bigint NOT NULL,
    reimbursementrequestcomment_id bigint NOT NULL,
    reimbursementfile_id bigint NOT NULL
);


ALTER TABLE public.payroll_reimbursementrequestcomment_files OWNER TO horilla;

--
-- Name: payroll_reimbursementrequestcomment_files_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_reimbursementrequestcomment_files ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_reimbursementrequestcomment_files_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_reimbursementrequestcomment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_reimbursementrequestcomment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_reimbursementrequestcomment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_taxbracket; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_taxbracket (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    min_income double precision NOT NULL,
    max_income double precision,
    tax_rate double precision NOT NULL,
    created_by_id integer,
    filing_status_id_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.payroll_taxbracket OWNER TO horilla;

--
-- Name: payroll_taxbracket_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_taxbracket ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_taxbracket_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payroll_workrecord; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.payroll_workrecord (
    id bigint NOT NULL,
    record_name character varying(250),
    work_record_type character varying(5),
    date date,
    at_work character varying(5),
    min_hour character varying(5),
    at_work_second integer,
    min_hour_second integer,
    note text NOT NULL,
    message character varying(30),
    is_attendance_record boolean NOT NULL,
    is_leave_record boolean NOT NULL,
    day_percentage double precision NOT NULL,
    last_update timestamp with time zone,
    employee_id_id bigint NOT NULL
);


ALTER TABLE public.payroll_workrecord OWNER TO horilla;

--
-- Name: payroll_workrecord_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.payroll_workrecord ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payroll_workrecord_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_anonymousfeedback; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_anonymousfeedback (
    id bigint NOT NULL,
    feedback_subject character varying(100) NOT NULL,
    based_on character varying(50) NOT NULL,
    status character varying(50) NOT NULL,
    created_at date NOT NULL,
    archive boolean,
    anonymous_feedback_id character varying(10),
    feedback_description text,
    department_id_id bigint,
    employee_id_id bigint,
    job_position_id_id bigint
);


ALTER TABLE public.pms_anonymousfeedback OWNER TO horilla;

--
-- Name: pms_anonymousfeedback_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_anonymousfeedback ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_anonymousfeedback_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_answer; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_answer (
    id bigint NOT NULL,
    answer jsonb,
    employee_id_id bigint,
    feedback_id_id bigint NOT NULL,
    question_id_id bigint
);


ALTER TABLE public.pms_answer OWNER TO horilla;

--
-- Name: pms_answer_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_answer ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_answer_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_bonuspointsetting; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_bonuspointsetting (
    id bigint NOT NULL,
    model character varying(100) NOT NULL,
    applicable_for character varying(50),
    bonus_for character varying(25) NOT NULL,
    field_1 character varying(25),
    conditions character varying(25),
    field_2 character varying(25),
    points integer NOT NULL,
    is_active boolean NOT NULL
);


ALTER TABLE public.pms_bonuspointsetting OWNER TO horilla;

--
-- Name: pms_bonuspointsetting_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_bonuspointsetting ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_bonuspointsetting_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_comment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_comment (
    id bigint NOT NULL,
    comment character varying(150) NOT NULL,
    created_at timestamp with time zone,
    employee_id_id bigint,
    employee_objective_id_id bigint
);


ALTER TABLE public.pms_comment OWNER TO horilla;

--
-- Name: pms_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_comment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_comment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_employeebonuspoint; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_employeebonuspoint (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    bonus_point integer NOT NULL,
    instance character varying(150),
    based_on character varying(150) NOT NULL,
    bonus_point_id_id bigint,
    created_by_id integer,
    employee_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.pms_employeebonuspoint OWNER TO horilla;

--
-- Name: pms_employeebonuspoint_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_employeebonuspoint ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_employeebonuspoint_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_employeekeyresult; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_employeekeyresult (
    id bigint NOT NULL,
    key_result character varying(60),
    key_result_description text,
    progress_type character varying(60),
    status character varying(20),
    created_at date,
    updated_at date,
    start_value integer,
    current_value integer,
    target_value integer,
    start_date date,
    end_date date,
    progress_percentage integer NOT NULL,
    employee_objective_id_id bigint,
    key_result_id_id bigint
);


ALTER TABLE public.pms_employeekeyresult OWNER TO horilla;

--
-- Name: pms_employeekeyresult_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_employeekeyresult ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_employeekeyresult_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_employeeobjective; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_employeeobjective (
    id bigint NOT NULL,
    is_active boolean NOT NULL,
    objective character varying(100),
    objective_description text,
    created_at date NOT NULL,
    updated_at date NOT NULL,
    start_date date NOT NULL,
    end_date date NOT NULL,
    status character varying(20) NOT NULL,
    progress_percentage integer NOT NULL,
    archive boolean NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    modified_by_id integer,
    objective_id_id bigint
);


ALTER TABLE public.pms_employeeobjective OWNER TO horilla;

--
-- Name: pms_employeeobjective_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_employeeobjective ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_employeeobjective_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_employeeobjective_key_result_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_employeeobjective_key_result_id (
    id bigint NOT NULL,
    employeeobjective_id bigint NOT NULL,
    keyresult_id bigint NOT NULL
);


ALTER TABLE public.pms_employeeobjective_key_result_id OWNER TO horilla;

--
-- Name: pms_employeeobjective_key_result_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_employeeobjective_key_result_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_employeeobjective_key_result_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_feedback; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_feedback (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    review_cycle character varying(100) NOT NULL,
    status character varying(50) NOT NULL,
    archive boolean,
    start_date date NOT NULL,
    end_date date,
    cyclic_feedback boolean NOT NULL,
    cyclic_feedback_days_count integer,
    cyclic_feedback_period character varying(50),
    cyclic_next_start_date date,
    cyclic_next_end_date date,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    manager_id_id bigint,
    modified_by_id integer,
    question_template_id_id bigint NOT NULL
);


ALTER TABLE public.pms_feedback OWNER TO horilla;

--
-- Name: pms_feedback_colleague_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_feedback_colleague_id (
    id bigint NOT NULL,
    feedback_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.pms_feedback_colleague_id OWNER TO horilla;

--
-- Name: pms_feedback_colleague_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_feedback_colleague_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_feedback_colleague_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_feedback_employee_key_results_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_feedback_employee_key_results_id (
    id bigint NOT NULL,
    feedback_id bigint NOT NULL,
    employeekeyresult_id bigint NOT NULL
);


ALTER TABLE public.pms_feedback_employee_key_results_id OWNER TO horilla;

--
-- Name: pms_feedback_employee_key_results_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_feedback_employee_key_results_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_feedback_employee_key_results_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_feedback_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_feedback ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_feedback_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_feedback_others_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_feedback_others_id (
    id bigint NOT NULL,
    feedback_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.pms_feedback_others_id OWNER TO horilla;

--
-- Name: pms_feedback_others_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_feedback_others_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_feedback_others_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_feedback_subordinate_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_feedback_subordinate_id (
    id bigint NOT NULL,
    feedback_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.pms_feedback_subordinate_id OWNER TO horilla;

--
-- Name: pms_feedback_subordinate_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_feedback_subordinate_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_feedback_subordinate_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_historicalcomment; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_historicalcomment (
    id bigint NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    created_at timestamp with time zone,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    employee_id_id bigint,
    employee_objective_id_id bigint,
    history_user_id integer
);


ALTER TABLE public.pms_historicalcomment OWNER TO horilla;

--
-- Name: pms_historicalcomment_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_historicalcomment ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_historicalcomment_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_historicalcomment_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_historicalcomment_history_tags (
    id bigint NOT NULL,
    historicalcomment_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.pms_historicalcomment_history_tags OWNER TO horilla;

--
-- Name: pms_historicalcomment_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_historicalcomment_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_historicalcomment_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_historicalemployeekeyresult; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_historicalemployeekeyresult (
    id bigint NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    key_result character varying(60),
    key_result_description text,
    progress_type character varying(60),
    status character varying(20),
    created_at date,
    updated_at date,
    start_value integer,
    current_value integer,
    target_value integer,
    start_date date,
    end_date date,
    progress_percentage integer NOT NULL,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    employee_objective_id_id bigint,
    history_user_id integer,
    key_result_id_id bigint
);


ALTER TABLE public.pms_historicalemployeekeyresult OWNER TO horilla;

--
-- Name: pms_historicalemployeekeyresult_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_historicalemployeekeyresult ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_historicalemployeekeyresult_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_historicalemployeekeyresult_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_historicalemployeekeyresult_history_tags (
    id bigint NOT NULL,
    historicalemployeekeyresult_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.pms_historicalemployeekeyresult_history_tags OWNER TO horilla;

--
-- Name: pms_historicalemployeekeyresult_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_historicalemployeekeyresult_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_historicalemployeekeyresult_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_historicalemployeeobjective; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_historicalemployeeobjective (
    id bigint NOT NULL,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    objective character varying(100),
    objective_description text,
    created_at date NOT NULL,
    updated_at date NOT NULL,
    start_date date NOT NULL,
    end_date date NOT NULL,
    status character varying(20) NOT NULL,
    progress_percentage integer NOT NULL,
    archive boolean NOT NULL,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    created_by_id integer,
    employee_id_id bigint,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer,
    objective_id_id bigint
);


ALTER TABLE public.pms_historicalemployeeobjective OWNER TO horilla;

--
-- Name: pms_historicalemployeeobjective_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_historicalemployeeobjective ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_historicalemployeeobjective_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_historicalemployeeobjective_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_historicalemployeeobjective_history_tags (
    id bigint NOT NULL,
    historicalemployeeobjective_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.pms_historicalemployeeobjective_history_tags OWNER TO horilla;

--
-- Name: pms_historicalemployeeobjective_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_historicalemployeeobjective_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_historicalemployeeobjective_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_historicalkeyresult; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_historicalkeyresult (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    title character varying(60),
    description text NOT NULL,
    progress_type character varying(60) NOT NULL,
    target_value integer,
    duration integer,
    archive boolean NOT NULL,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    history_user_id integer,
    modified_by_id integer
);


ALTER TABLE public.pms_historicalkeyresult OWNER TO horilla;

--
-- Name: pms_historicalkeyresult_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_historicalkeyresult ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_historicalkeyresult_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_historicalkeyresult_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_historicalkeyresult_history_tags (
    id bigint NOT NULL,
    historicalkeyresult_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.pms_historicalkeyresult_history_tags OWNER TO horilla;

--
-- Name: pms_historicalkeyresult_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_historicalkeyresult_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_historicalkeyresult_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_historicalobjective; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_historicalobjective (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    title character varying(100) NOT NULL,
    description text NOT NULL,
    duration_unit character varying(20),
    duration integer NOT NULL,
    add_assignees boolean NOT NULL,
    archive boolean NOT NULL,
    self_employee_progress_update boolean NOT NULL,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    history_user_id integer,
    modified_by_id integer
);


ALTER TABLE public.pms_historicalobjective OWNER TO horilla;

--
-- Name: pms_historicalobjective_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_historicalobjective ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_historicalobjective_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_historicalobjective_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_historicalobjective_history_tags (
    id bigint NOT NULL,
    historicalobjective_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.pms_historicalobjective_history_tags OWNER TO horilla;

--
-- Name: pms_historicalobjective_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_historicalobjective_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_historicalobjective_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_keyresult; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_keyresult (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(60),
    description text NOT NULL,
    progress_type character varying(60) NOT NULL,
    target_value integer,
    duration integer,
    archive boolean NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.pms_keyresult OWNER TO horilla;

--
-- Name: pms_keyresult_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_keyresult ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_keyresult_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_keyresultfeedback; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_keyresultfeedback (
    id bigint NOT NULL,
    answer jsonb,
    employee_id_id bigint NOT NULL,
    feedback_id_id bigint,
    key_result_id_id bigint
);


ALTER TABLE public.pms_keyresultfeedback OWNER TO horilla;

--
-- Name: pms_keyresultfeedback_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_keyresultfeedback ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_keyresultfeedback_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_meetings; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_meetings (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(100) NOT NULL,
    date timestamp with time zone,
    response text,
    show_response boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    question_template_id bigint,
    company_id_id bigint
);


ALTER TABLE public.pms_meetings OWNER TO horilla;

--
-- Name: pms_meetings_answer_employees; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_meetings_answer_employees (
    id bigint NOT NULL,
    meetings_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.pms_meetings_answer_employees OWNER TO horilla;

--
-- Name: pms_meetings_answer_employees_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_meetings_answer_employees ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_meetings_answer_employees_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_meetings_employee_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_meetings_employee_id (
    id bigint NOT NULL,
    meetings_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.pms_meetings_employee_id OWNER TO horilla;

--
-- Name: pms_meetings_employee_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_meetings_employee_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_meetings_employee_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_meetings_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_meetings ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_meetings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_meetings_manager; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_meetings_manager (
    id bigint NOT NULL,
    meetings_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.pms_meetings_manager OWNER TO horilla;

--
-- Name: pms_meetings_manager_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_meetings_manager ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_meetings_manager_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_meetingsanswer; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_meetingsanswer (
    id bigint NOT NULL,
    answer jsonb,
    employee_id_id bigint,
    meeting_id_id bigint NOT NULL,
    question_id_id bigint
);


ALTER TABLE public.pms_meetingsanswer OWNER TO horilla;

--
-- Name: pms_meetingsanswer_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_meetingsanswer ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_meetingsanswer_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_objective; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_objective (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(100) NOT NULL,
    description text NOT NULL,
    duration_unit character varying(20),
    duration integer NOT NULL,
    add_assignees boolean NOT NULL,
    archive boolean NOT NULL,
    self_employee_progress_update boolean NOT NULL,
    company_id_id bigint,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.pms_objective OWNER TO horilla;

--
-- Name: pms_objective_assignees; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_objective_assignees (
    id bigint NOT NULL,
    objective_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.pms_objective_assignees OWNER TO horilla;

--
-- Name: pms_objective_assignees_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_objective_assignees ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_objective_assignees_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_objective_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_objective ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_objective_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_objective_key_result_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_objective_key_result_id (
    id bigint NOT NULL,
    objective_id bigint NOT NULL,
    keyresult_id bigint NOT NULL
);


ALTER TABLE public.pms_objective_key_result_id OWNER TO horilla;

--
-- Name: pms_objective_key_result_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_objective_key_result_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_objective_key_result_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_objective_managers; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_objective_managers (
    id bigint NOT NULL,
    objective_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.pms_objective_managers OWNER TO horilla;

--
-- Name: pms_objective_managers_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_objective_managers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_objective_managers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_period; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_period (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    period_name character varying(150) NOT NULL,
    start_date date NOT NULL,
    end_date date NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.pms_period OWNER TO horilla;

--
-- Name: pms_period_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_period_company_id (
    id bigint NOT NULL,
    period_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.pms_period_company_id OWNER TO horilla;

--
-- Name: pms_period_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_period_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_period_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_period_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_period ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_period_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_question; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_question (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    question character varying(250) NOT NULL,
    question_type character varying(100),
    created_by_id integer,
    modified_by_id integer,
    template_id_id bigint
);


ALTER TABLE public.pms_question OWNER TO horilla;

--
-- Name: pms_question_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_question ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_question_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_questionoptions; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_questionoptions (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    option_a character varying(250),
    option_b character varying(250),
    option_c character varying(250),
    option_d character varying(250),
    created_by_id integer,
    modified_by_id integer,
    question_id_id bigint
);


ALTER TABLE public.pms_questionoptions OWNER TO horilla;

--
-- Name: pms_questionoptions_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_questionoptions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_questionoptions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_questiontemplate; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_questiontemplate (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    question_template character varying(100) NOT NULL,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.pms_questiontemplate OWNER TO horilla;

--
-- Name: pms_questiontemplate_company_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.pms_questiontemplate_company_id (
    id bigint NOT NULL,
    questiontemplate_id bigint NOT NULL,
    company_id bigint NOT NULL
);


ALTER TABLE public.pms_questiontemplate_company_id OWNER TO horilla;

--
-- Name: pms_questiontemplate_company_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_questiontemplate_company_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_questiontemplate_company_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: pms_questiontemplate_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.pms_questiontemplate ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.pms_questiontemplate_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: project_project; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.project_project (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(200) NOT NULL,
    status character varying(250) NOT NULL,
    start_date date NOT NULL,
    end_date date,
    document character varying(100),
    description text NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    company_id_id bigint
);


ALTER TABLE public.project_project OWNER TO horilla;

--
-- Name: project_project_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.project_project ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.project_project_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: project_project_managers; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.project_project_managers (
    id bigint NOT NULL,
    project_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.project_project_managers OWNER TO horilla;

--
-- Name: project_project_managers_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.project_project_managers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.project_project_managers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: project_project_members; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.project_project_members (
    id bigint NOT NULL,
    project_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.project_project_members OWNER TO horilla;

--
-- Name: project_project_members_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.project_project_members ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.project_project_members_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: project_projectstage; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.project_projectstage (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(200) NOT NULL,
    sequence integer,
    is_end_stage boolean NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    project_id bigint
);


ALTER TABLE public.project_projectstage OWNER TO horilla;

--
-- Name: project_projectstage_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.project_projectstage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.project_projectstage_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: project_task; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.project_task (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(200) NOT NULL,
    status character varying(250) NOT NULL,
    start_date date,
    end_date date,
    document character varying(100),
    description text NOT NULL,
    sequence integer NOT NULL,
    created_by_id integer,
    modified_by_id integer,
    project_id bigint,
    stage_id bigint
);


ALTER TABLE public.project_task OWNER TO horilla;

--
-- Name: project_task_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.project_task ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.project_task_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: project_task_task_managers; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.project_task_task_managers (
    id bigint NOT NULL,
    task_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.project_task_task_managers OWNER TO horilla;

--
-- Name: project_task_task_managers_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.project_task_task_managers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.project_task_task_managers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: project_task_task_members; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.project_task_task_members (
    id bigint NOT NULL,
    task_id bigint NOT NULL,
    employee_id bigint NOT NULL
);


ALTER TABLE public.project_task_task_members OWNER TO horilla;

--
-- Name: project_task_task_members_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.project_task_task_members ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.project_task_task_members_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: project_timesheet; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.project_timesheet (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    date date NOT NULL,
    time_spent character varying(10),
    status character varying(250) NOT NULL,
    description text,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer,
    project_id_id bigint,
    task_id_id bigint
);


ALTER TABLE public.project_timesheet OWNER TO horilla;

--
-- Name: project_timesheet_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.project_timesheet ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.project_timesheet_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: recruitment_candidate; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.recruitment_candidate (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    name character varying(100),
    profile character varying(100),
    portfolio character varying(200) NOT NULL,
    schedule_date timestamp with time zone,
    email character varying(254) NOT NULL,
    mobile character varying(15) NOT NULL,
    resume character varying(100) NOT NULL,
    address text,
    country character varying(30),
    dob date,
    state character varying(30),
    city character varying(30),
    zip character varying(30),
    gender character varying(15),
    source character varying(20),
    start_onboard boolean NOT NULL,
    hired boolean NOT NULL,
    canceled boolean NOT NULL,
    converted boolean NOT NULL,
    joining_date date,
    sequence integer,
    probation_end date,
    offer_letter_status character varying(10) NOT NULL,
    last_updated date,
    hired_date date,
    converted_employee_id_id bigint,
    created_by_id integer,
    job_position_id_id bigint,
    modified_by_id integer,
    recruitment_id_id bigint,
    referral_id bigint,
    stage_id_id bigint
);


ALTER TABLE public.recruitment_candidate OWNER TO horilla;

--
-- Name: recruitment_candidate_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.recruitment_candidate ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.recruitment_candidate_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: recruitment_candidatedocument; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.recruitment_candidatedocument (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(250) NOT NULL,
    document character varying(100),
    status character varying(10) NOT NULL,
    reject_reason text,
    candidate_id_id bigint NOT NULL,
    created_by_id integer,
    document_request_id_id bigint,
    modified_by_id integer
);


ALTER TABLE public.recruitment_candidatedocument OWNER TO horilla;

--
-- Name: recruitment_candidatedocument_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.recruitment_candidatedocument ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.recruitment_candidatedocument_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: recruitment_candidatedocumentrequest; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.recruitment_candidatedocumentrequest (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    title character varying(100) NOT NULL,
    format character varying(10) NOT NULL,
    max_size integer,
    description text,
    created_by_id integer,
    modified_by_id integer
);


ALTER TABLE public.recruitment_candidatedocumentrequest OWNER TO horilla;

--
-- Name: recruitment_candidatedocumentrequest_candidate_id; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.recruitment_candidatedocumentrequest_candidate_id (
    id bigint NOT NULL,
    candidatedocumentrequest_id bigint NOT NULL,
    candidate_id bigint NOT NULL
);


ALTER TABLE public.recruitment_candidatedocumentrequest_candidate_id OWNER TO horilla;

--
-- Name: recruitment_candidatedocumentrequest_candidate_id_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.recruitment_candidatedocumentrequest_candidate_id ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.recruitment_candidatedocumentrequest_candidate_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: recruitment_candidatedocumentrequest_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.recruitment_candidatedocumentrequest ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.recruitment_candidatedocumentrequest_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: recruitment_candidaterating; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.recruitment_candidaterating (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    rating integer NOT NULL,
    candidate_id_id bigint NOT NULL,
    created_by_id integer,
    employee_id_id bigint NOT NULL,
    modified_by_id integer
);


ALTER TABLE public.recruitment_candidaterating OWNER TO horilla;

--
-- Name: recruitment_candidaterating_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.recruitment_candidaterating ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.recruitment_candidaterating_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: recruitment_historicalcandidate; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.recruitment_historicalcandidate (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    name character varying(100),
    profile text,
    portfolio character varying(200) NOT NULL,
    schedule_date timestamp with time zone,
    email character varying(254) NOT NULL,
    mobile character varying(15) NOT NULL,
    resume text NOT NULL,
    address text,
    country character varying(30),
    dob date,
    state character varying(30),
    city character varying(30),
    zip character varying(30),
    gender character varying(15),
    source character varying(20),
    start_onboard boolean NOT NULL,
    hired boolean NOT NULL,
    canceled boolean NOT NULL,
    converted boolean NOT NULL,
    joining_date date,
    sequence integer,
    probation_end date,
    offer_letter_status character varying(10) NOT NULL,
    last_updated date,
    hired_date date,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    converted_employee_id_id bigint,
    created_by_id integer,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    job_position_id_id bigint,
    modified_by_id integer,
    recruitment_id_id bigint,
    referral_id bigint,
    stage_id_id bigint
);


ALTER TABLE public.recruitment_historicalcandidate OWNER TO horilla;

--
-- Name: recruitment_historicalcandidate_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.recruitment_historicalcandidate ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.recruitment_historicalcandidate_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: recruitment_historicalcandidate_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.recruitment_historicalcandidate_history_tags (
    id bigint NOT NULL,
    historicalcandidate_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.recruitment_historicalcandidate_history_tags OWNER TO horilla;

--
-- Name: recruitment_historicalcandidate_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.recruitment_historicalcandidate_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.recruitment_historicalcandidate_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: recruitment_historicalrejectedcandidate; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.recruitment_historicalrejectedcandidate (
    id bigint NOT NULL,
    created_at timestamp with time zone,
    is_active boolean NOT NULL,
    history_title character varying(20),
    history_description text,
    history_highlight boolean,
    description text NOT NULL,
    history_id integer NOT NULL,
    history_date timestamp with time zone NOT NULL,
    history_change_reason character varying(100),
    history_type character varying(1) NOT NULL,
    candidate_id_id bigint,
    created_by_id integer,
    history_relation_id bigint NOT NULL,
    history_user_id integer,
    modified_by_id integer
);


ALTER TABLE public.recruitment_historicalrejectedcandidate OWNER TO horilla;

--
-- Name: recruitment_historicalrejectedcandidate_history_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.recruitment_historicalrejectedcandidate ALTER COLUMN history_id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.recruitment_historicalrejectedcandidate_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: recruitment_historicalrejectedcandidate_history_tags; Type: TABLE; Schema: public; Owner: horilla
--

CREATE TABLE public.recruitment_historicalrejectedcandidate_history_tags (
    id bigint NOT NULL,
    historicalrejectedcandidate_id integer NOT NULL,
    audittag_id bigint NOT NULL
);


ALTER TABLE public.recruitment_historicalrejectedcandidate_history_tags OWNER TO horilla;

--
-- Name: recruitment_historicalrejectedcandidate_history_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: horilla
--

ALTER TABLE public.recruitment_historicalrejectedcandidate_history_tags ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.recruitment_historicalrejectedcandidate_history_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
