-- Name: COLUMN res_config_settings.module_website_sale_collect; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_config_settings.module_website_sale_collect IS 'Click & Collect';


--
-- Name: COLUMN res_config_settings.module_website_sale_wishlist; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_config_settings.module_website_sale_wishlist IS 'Wishlists';


--
-- Name: COLUMN res_config_settings.enabled_extra_checkout_step; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_config_settings.enabled_extra_checkout_step IS 'Extra Step During Checkout';


--
-- Name: COLUMN res_config_settings.enabled_buy_now_button; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_config_settings.enabled_buy_now_button IS 'Buy Now';


--
-- Name: res_config_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_config_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_config_settings_id_seq OWNED BY public.res_config_settings.id;


--
-- Name: res_country; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_country (
    id integer NOT NULL,
    address_view_id integer,
    currency_id integer,
    phone_code integer,
    create_uid integer,
    write_uid integer,
    code character varying(2) NOT NULL,
    name_position character varying,
    name jsonb NOT NULL,
    vat_label jsonb,
    address_format text,
    state_required boolean,
    zip_required boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_country; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_country IS 'Country';


--
-- Name: COLUMN res_country.address_view_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.address_view_id IS 'Input View';


--
-- Name: COLUMN res_country.currency_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.currency_id IS 'Currency';


--
-- Name: COLUMN res_country.phone_code; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.phone_code IS 'Country Calling Code';


--
-- Name: COLUMN res_country.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.create_uid IS 'Created by';


--
-- Name: COLUMN res_country.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_country.code; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.code IS 'Country Code';


--
-- Name: COLUMN res_country.name_position; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.name_position IS 'Customer Name Position';


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

COMMENT ON COLUMN public.res_country.name IS 'Country Name';


--
-- Name: COLUMN res_country.vat_label; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.vat_label IS 'Vat Label';


--
-- Name: COLUMN res_country.address_format; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.address_format IS 'Layout in Reports';


--
-- Name: COLUMN res_country.state_required; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.state_required IS 'State Required';


--
-- Name: COLUMN res_country.zip_required; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.zip_required IS 'Zip Required';


--
-- Name: COLUMN res_country.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.create_date IS 'Created on';


--
-- Name: COLUMN res_country.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country.write_date IS 'Last Updated on';


--
-- Name: res_country_group; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_country_group (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    code character varying,
    name jsonb NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_country_group; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_country_group IS 'Country Group';


--
-- Name: COLUMN res_country_group.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country_group.create_uid IS 'Created by';


--
-- Name: COLUMN res_country_group.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country_group.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_country_group.code; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country_group.code IS 'Code';


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

COMMENT ON COLUMN public.res_country_group.name IS 'Name';


--
-- Name: COLUMN res_country_group.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country_group.create_date IS 'Created on';


--
-- Name: COLUMN res_country_group.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country_group.write_date IS 'Last Updated on';


--
-- Name: res_country_group_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_country_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_country_group_id_seq OWNED BY public.res_country_group.id;


--
-- Name: res_country_group_pricelist_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_country_group_pricelist_rel (
    pricelist_id integer NOT NULL,
    res_country_group_id integer NOT NULL
);


--
-- Name: TABLE res_country_group_pricelist_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_country_group_pricelist_rel IS 'RELATION BETWEEN product_pricelist AND res_country_group';


--
-- Name: res_country_group_res_country_state_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_country_group_res_country_state_rel (
    res_country_group_id integer NOT NULL,
    res_country_state_id integer NOT NULL
);


--
-- Name: TABLE res_country_group_res_country_state_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_country_group_res_country_state_rel IS 'RELATION BETWEEN res_country_group AND res_country_state';


--
-- Name: res_country_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_country_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_country_id_seq OWNED BY public.res_country.id;


--
-- Name: res_country_res_country_group_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_country_res_country_group_rel (
    res_country_id integer NOT NULL,
    res_country_group_id integer NOT NULL
);


--
-- Name: TABLE res_country_res_country_group_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_country_res_country_group_rel IS 'RELATION BETWEEN res_country AND res_country_group';


--
-- Name: res_country_state; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_country_state (
    id integer NOT NULL,
    country_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    code character varying NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_country_state; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_country_state IS 'Country state';


--
-- Name: COLUMN res_country_state.country_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country_state.country_id IS 'Country';


--
-- Name: COLUMN res_country_state.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country_state.create_uid IS 'Created by';


--
-- Name: COLUMN res_country_state.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country_state.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.res_country_state.name IS 'State Name';


--
-- Name: COLUMN res_country_state.code; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country_state.code IS 'State Code';


--
-- Name: COLUMN res_country_state.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country_state.create_date IS 'Created on';


--
-- Name: COLUMN res_country_state.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_country_state.write_date IS 'Last Updated on';


--
-- Name: res_country_state_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_country_state_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_country_state_id_seq OWNED BY public.res_country_state.id;


--
-- Name: res_currency; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_currency (
    id integer NOT NULL,
    name character varying NOT NULL,
    symbol character varying NOT NULL,
    iso_numeric integer,
    decimal_places integer,
    create_uid integer,
    write_uid integer,
    full_name character varying,
    "position" character varying,
    currency_unit_label jsonb,
    currency_subunit_label jsonb,
    rounding numeric,
    active boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    CONSTRAINT res_currency_rounding_gt_zero CHECK ((rounding > (0)::numeric))
);


--
-- Name: COLUMN res_currency.iso_numeric; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency.iso_numeric IS 'Currency numeric code.';


--
-- Name: COLUMN res_currency.decimal_places; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency.decimal_places IS 'Decimal Places';


--
-- Name: COLUMN res_currency.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency.create_uid IS 'Created by';


--
-- Name: COLUMN res_currency.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_currency.full_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency.full_name IS 'Name';


--
-- Name: COLUMN res_currency."position"; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency."position" IS 'Symbol Position';


--
-- Name: COLUMN res_currency.currency_unit_label; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency.currency_unit_label IS 'Currency Unit';


--
-- Name: COLUMN res_currency.currency_subunit_label; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency.currency_subunit_label IS 'Currency Subunit';


--
-- Name: COLUMN res_currency.rounding; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency.rounding IS 'Rounding Factor';


--
-- Name: COLUMN res_currency.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency.active IS 'Active';


--
-- Name: COLUMN res_currency.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency.create_date IS 'Created on';


--
-- Name: COLUMN res_currency.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency.write_date IS 'Last Updated on';


--
-- Name: CONSTRAINT res_currency_rounding_gt_zero ON res_currency; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON CONSTRAINT res_currency_rounding_gt_zero ON public.res_currency IS 'CHECK (rounding>0)';


--
-- Name: res_currency_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_currency_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_currency_id_seq OWNED BY public.res_currency.id;


--
-- Name: res_currency_rate; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_currency_rate (
    id integer NOT NULL,
    currency_id integer NOT NULL,
    company_id integer,
    create_uid integer,
    write_uid integer,
    name date NOT NULL,
    rate numeric,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    CONSTRAINT res_currency_rate_currency_rate_check CHECK ((rate > (0)::numeric))
);


--
-- Name: TABLE res_currency_rate; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_currency_rate IS 'Currency Rate';


--
-- Name: COLUMN res_currency_rate.currency_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency_rate.currency_id IS 'Currency';


--
-- Name: COLUMN res_currency_rate.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency_rate.company_id IS 'Company';


--
-- Name: COLUMN res_currency_rate.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency_rate.create_uid IS 'Created by';


--
-- Name: COLUMN res_currency_rate.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency_rate.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.res_currency_rate.name IS 'Date';


--
-- Name: COLUMN res_currency_rate.rate; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency_rate.rate IS 'Technical Rate';


--
-- Name: COLUMN res_currency_rate.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency_rate.create_date IS 'Created on';


--
-- Name: COLUMN res_currency_rate.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_currency_rate.write_date IS 'Last Updated on';


--
-- Name: CONSTRAINT res_currency_rate_currency_rate_check ON res_currency_rate; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON CONSTRAINT res_currency_rate_currency_rate_check ON public.res_currency_rate IS 'CHECK (rate>0)';


--
-- Name: res_currency_rate_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_currency_rate_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_currency_rate_id_seq OWNED BY public.res_currency_rate.id;


--
-- Name: res_device_log; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_device_log (
    id integer NOT NULL,
    user_id integer,
    create_uid integer,
    write_uid integer,
    session_identifier character varying NOT NULL,
    platform character varying,
    browser character varying,
    ip_address character varying,
    country character varying,
    city character varying,
    device_type character varying,
    revoked boolean,
    first_activity timestamp without time zone,
    last_activity timestamp without time zone,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_device_log; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_device_log IS 'Device Log';


--
-- Name: COLUMN res_device_log.user_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.user_id IS 'User';


--
-- Name: COLUMN res_device_log.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.create_uid IS 'Created by';


--
-- Name: COLUMN res_device_log.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_device_log.session_identifier; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.session_identifier IS 'Session Identifier';


--
-- Name: COLUMN res_device_log.platform; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.platform IS 'Platform';


--
-- Name: COLUMN res_device_log.browser; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.browser IS 'Browser';


--
-- Name: COLUMN res_device_log.ip_address; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.ip_address IS 'IP Address';


--
-- Name: COLUMN res_device_log.country; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.country IS 'Country';


--
-- Name: COLUMN res_device_log.city; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.city IS 'City';


--
-- Name: COLUMN res_device_log.device_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.device_type IS 'Device Type';


--
-- Name: COLUMN res_device_log.revoked; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.revoked IS 'Revoked';


--
-- Name: COLUMN res_device_log.first_activity; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.first_activity IS 'First Activity';


--
-- Name: COLUMN res_device_log.last_activity; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.last_activity IS 'Last Activity';


--
-- Name: COLUMN res_device_log.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.create_date IS 'Created on';


--
-- Name: COLUMN res_device_log.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_device_log.write_date IS 'Last Updated on';


--
-- Name: res_device; Type: VIEW; Schema: public; Owner: -
--

CREATE VIEW public.res_device AS
 SELECT id,
    user_id,
    create_uid,
    write_uid,
    session_identifier,
    platform,
    browser,
    ip_address,
    country,
    city,
    device_type,
    revoked,
    first_activity,
    last_activity,
    create_date,
    write_date
   FROM public.res_device_log d
  WHERE ((NOT (EXISTS ( SELECT 1
           FROM public.res_device_log d2
          WHERE ((d2.user_id = d.user_id) AND ((d2.session_identifier)::text = (d.session_identifier)::text) AND (NOT ((d2.platform)::text IS DISTINCT FROM (d.platform)::text)) AND (NOT ((d2.browser)::text IS DISTINCT FROM (d.browser)::text)) AND ((d2.last_activity > d.last_activity) OR ((d2.last_activity = d.last_activity) AND (d2.id > d.id))) AND (d2.revoked = false))))) AND (revoked = false));


--
-- Name: res_device_log_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_device_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_device_log_id_seq OWNED BY public.res_device_log.id;


--
-- Name: res_groups; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_groups (
    id integer NOT NULL,
    name jsonb NOT NULL,
    sequence integer,
    privilege_id integer,
    create_uid integer,
    write_uid integer,
    comment jsonb,
    share boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    api_key_duration double precision,
    CONSTRAINT res_groups_check_api_key_duration CHECK ((api_key_duration >= (0)::double precision))
);


--
-- Name: COLUMN res_groups.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups.sequence IS 'Sequence';


--
-- Name: COLUMN res_groups.privilege_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups.privilege_id IS 'Privilege';


--
-- Name: COLUMN res_groups.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups.create_uid IS 'Created by';


--
-- Name: COLUMN res_groups.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_groups.comment; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups.comment IS 'Comment';


--
-- Name: COLUMN res_groups.share; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups.share IS 'Share Group';


--
-- Name: COLUMN res_groups.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups.create_date IS 'Created on';


--
-- Name: COLUMN res_groups.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups.write_date IS 'Last Updated on';


--
-- Name: COLUMN res_groups.api_key_duration; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups.api_key_duration IS 'API Keys maximum duration days';


--
-- Name: CONSTRAINT res_groups_check_api_key_duration ON res_groups; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON CONSTRAINT res_groups_check_api_key_duration ON public.res_groups IS 'CHECK(api_key_duration >= 0)';


--
-- Name: res_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_groups_id_seq OWNED BY public.res_groups.id;


--
-- Name: res_groups_implied_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_groups_implied_rel (
    gid integer NOT NULL,
    hid integer NOT NULL
);


--
-- Name: TABLE res_groups_implied_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_groups_implied_rel IS 'RELATION BETWEEN res_groups AND res_groups';


--
-- Name: res_groups_privilege; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_groups_privilege (
    id integer NOT NULL,
    sequence integer,
    category_id integer,
    create_uid integer,
    write_uid integer,
    placeholder character varying,
    name jsonb NOT NULL,
    description text,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_groups_privilege; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_groups_privilege IS 'Privileges';


--
-- Name: COLUMN res_groups_privilege.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups_privilege.sequence IS 'Sequence';


--
-- Name: COLUMN res_groups_privilege.category_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups_privilege.category_id IS 'Category';


--
-- Name: COLUMN res_groups_privilege.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups_privilege.create_uid IS 'Created by';


--
-- Name: COLUMN res_groups_privilege.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups_privilege.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_groups_privilege.placeholder; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups_privilege.placeholder IS 'Placeholder';


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

COMMENT ON COLUMN public.res_groups_privilege.name IS 'Name';


--
-- Name: COLUMN res_groups_privilege.description; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups_privilege.description IS 'Description';


--
-- Name: COLUMN res_groups_privilege.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups_privilege.create_date IS 'Created on';


--
-- Name: COLUMN res_groups_privilege.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_groups_privilege.write_date IS 'Last Updated on';


--
-- Name: res_groups_privilege_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_groups_privilege_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_groups_privilege_id_seq OWNED BY public.res_groups_privilege.id;


--
-- Name: res_groups_report_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_groups_report_rel (
    uid integer NOT NULL,
    gid integer NOT NULL
);


--
-- Name: TABLE res_groups_report_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_groups_report_rel IS 'RELATION BETWEEN ir_act_report_xml AND res_groups';


--
-- Name: res_groups_spreadsheet_dashboard_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_groups_spreadsheet_dashboard_rel (
    spreadsheet_dashboard_id integer NOT NULL,
    res_groups_id integer NOT NULL
);


--
-- Name: TABLE res_groups_spreadsheet_dashboard_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_groups_spreadsheet_dashboard_rel IS 'RELATION BETWEEN spreadsheet_dashboard AND res_groups';


--
-- Name: res_groups_users_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_groups_users_rel (
    gid integer NOT NULL,
    uid integer NOT NULL
);


--
-- Name: TABLE res_groups_users_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_groups_users_rel IS 'RELATION BETWEEN res_groups AND res_users';


--
-- Name: res_groups_website_menu_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_groups_website_menu_rel (
    website_menu_id integer NOT NULL,
    res_groups_id integer NOT NULL
);


--
-- Name: TABLE res_groups_website_menu_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_groups_website_menu_rel IS 'RELATION BETWEEN website_menu AND res_groups';


--
-- Name: res_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_lang (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    code character varying NOT NULL,
    iso_code character varying,
    url_code character varying NOT NULL,
    direction character varying NOT NULL,
    date_format character varying NOT NULL,
    short_date_format character varying NOT NULL,
    time_format character varying NOT NULL,
    short_time_format character varying NOT NULL,
    week_start character varying NOT NULL,
    "grouping" character varying NOT NULL,
    decimal_point character varying NOT NULL,
    thousands_sep character varying,
    active boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_lang; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_lang IS 'Languages';


--
-- Name: COLUMN res_lang.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.create_uid IS 'Created by';


--
-- Name: COLUMN res_lang.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.res_lang.name IS 'Name';


--
-- Name: COLUMN res_lang.code; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.code IS 'Locale Code';


--
-- Name: COLUMN res_lang.iso_code; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.iso_code IS 'ISO code';


--
-- Name: COLUMN res_lang.url_code; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.url_code IS 'URL Code';


--
-- Name: COLUMN res_lang.direction; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.direction IS 'Direction';


--
-- Name: COLUMN res_lang.date_format; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.date_format IS 'Date Format';


--
-- Name: COLUMN res_lang.short_date_format; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.short_date_format IS 'Short Date Format';


--
-- Name: COLUMN res_lang.time_format; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.time_format IS 'Time Format';


--
-- Name: COLUMN res_lang.short_time_format; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.short_time_format IS 'Short Time Format';


--
-- Name: COLUMN res_lang.week_start; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.week_start IS 'First Day of Week';


--
-- Name: COLUMN res_lang."grouping"; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang."grouping" IS 'Separator Format';


--
-- Name: COLUMN res_lang.decimal_point; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.decimal_point IS 'Decimal Separator';


--
-- Name: COLUMN res_lang.thousands_sep; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.thousands_sep IS 'Thousands Separator';


--
-- Name: COLUMN res_lang.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.active IS 'Active';


--
-- Name: COLUMN res_lang.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.create_date IS 'Created on';


--
-- Name: COLUMN res_lang.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_lang.write_date IS 'Last Updated on';


--
-- Name: res_lang_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_lang_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_lang_id_seq OWNED BY public.res_lang.id;


--
-- Name: res_lang_install_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_lang_install_rel (
    language_wizard_id integer NOT NULL,
    lang_id integer NOT NULL
);


--
-- Name: TABLE res_lang_install_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_lang_install_rel IS 'RELATION BETWEEN base_language_install AND res_lang';


--
-- Name: res_partner; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_partner (
    id integer NOT NULL,
    company_id integer,
    create_date timestamp without time zone,
    name character varying,
    parent_id integer,
    user_id integer,
    state_id integer,
    country_id integer,
    industry_id integer,
    color integer,
    commercial_partner_id integer,
    create_uid integer,
    write_uid integer,
    complete_name character varying,
    ref character varying,
    lang character varying,
    tz character varying,
    vat character varying,
    company_registry character varying,
    website character varying,
    function character varying,
    type character varying,
    street character varying,
    street2 character varying,
    zip character varying,
    city character varying,
    email character varying,
    phone character varying,
    commercial_company_name character varying,
    company_name character varying,
    barcode jsonb,
    comment text,
    partner_latitude numeric,
    partner_longitude numeric,
    active boolean,
    employee boolean,
    is_company boolean,
    partner_share boolean,
    write_date timestamp without time zone,
    contact_address_complete character varying,
    message_bounce integer,
    email_normalized character varying,
    signup_type character varying,
    phone_sanitized character varying,
    ocn_token character varying,
    website_id integer,
    is_published boolean,
    specific_property_product_pricelist jsonb,
    invoice_template_pdf_report_id integer,
    supplier_rank integer,
    customer_rank integer,
    autopost_bills character varying NOT NULL,
    credit_limit jsonb,
    property_account_payable_id jsonb,
    property_account_receivable_id jsonb,
    property_account_position_id jsonb,
    property_payment_term_id jsonb,
    property_supplier_payment_term_id jsonb,
    trust jsonb,
    ignore_abnormal_invoice_date jsonb,
    ignore_abnormal_invoice_amount jsonb,
    invoice_sending_method jsonb,
    invoice_edi_format_store jsonb,
    property_outbound_payment_method_line_id jsonb,
    property_inbound_payment_method_line_id jsonb,
    peppol_endpoint character varying,
    peppol_eas character varying,
    website_meta_og_img character varying,
    website_meta_title jsonb,
    website_meta_description jsonb,
    website_meta_keywords jsonb,
    seo_name jsonb,
    website_description jsonb,
    website_short_description jsonb,
    is_seo_optimized boolean,
    online_partner_information character varying,
    sale_warn_msg text,
    followup_reminder_type character varying,
    followup_next_action_date jsonb,
    followup_responsible_id jsonb,
    property_delivery_carrier_id jsonb,
    is_pickup_location boolean,
    CONSTRAINT res_partner_check_name CHECK (((((type)::text = 'contact'::text) AND (name IS NOT NULL)) OR ((type)::text <> 'contact'::text)))
);


--
-- Name: COLUMN res_partner.parent_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.parent_id IS 'Related Company';


--
-- Name: COLUMN res_partner.user_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.user_id IS 'Salesperson';


--
-- Name: COLUMN res_partner.state_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.state_id IS 'State';


--
-- Name: COLUMN res_partner.country_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.country_id IS 'Country';


--
-- Name: COLUMN res_partner.industry_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.industry_id IS 'Industry';


--
-- Name: COLUMN res_partner.color; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.color IS 'Color Index';


--
-- Name: COLUMN res_partner.commercial_partner_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.commercial_partner_id IS 'Commercial Entity';


--
-- Name: COLUMN res_partner.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.create_uid IS 'Created by';


--
-- Name: COLUMN res_partner.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_partner.complete_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.complete_name IS 'Complete Name';


--
-- Name: COLUMN res_partner.ref; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.ref IS 'Reference';


--
-- Name: COLUMN res_partner.lang; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.lang IS 'Language';


--
-- Name: COLUMN res_partner.tz; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.tz IS 'Timezone';


--
-- Name: COLUMN res_partner.vat; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.vat IS 'Tax ID';


--
-- Name: COLUMN res_partner.company_registry; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.company_registry IS 'Company ID';


--
-- Name: COLUMN res_partner.website; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.website IS 'Website Link';


--
-- Name: COLUMN res_partner.function; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.function IS 'Job Position';


--
-- Name: COLUMN res_partner.type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.type IS 'Address Type';


--
-- Name: COLUMN res_partner.street; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.street IS 'Street';


--
-- Name: COLUMN res_partner.street2; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.street2 IS 'Street2';


--
-- Name: COLUMN res_partner.zip; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.zip IS 'Zip';


--
-- Name: COLUMN res_partner.city; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.city IS 'City';


--
-- Name: COLUMN res_partner.email; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.email IS 'Email';


--
-- Name: COLUMN res_partner.phone; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.phone IS 'Phone';


--
-- Name: COLUMN res_partner.commercial_company_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.commercial_company_name IS 'Company Name Entity';


--
-- Name: COLUMN res_partner.company_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.company_name IS 'Company Name';


--
-- Name: COLUMN res_partner.barcode; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.barcode IS 'Barcode';


--
-- Name: COLUMN res_partner.comment; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.comment IS 'Notes';


--
-- Name: COLUMN res_partner.partner_latitude; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.partner_latitude IS 'Geo Latitude';


--
-- Name: COLUMN res_partner.partner_longitude; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.partner_longitude IS 'Geo Longitude';


--
-- Name: COLUMN res_partner.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.active IS 'Active';


--
-- Name: COLUMN res_partner.employee; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.employee IS 'Employee';


--
-- Name: COLUMN res_partner.is_company; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.is_company IS 'Is a Company';


--
-- Name: COLUMN res_partner.partner_share; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.partner_share IS 'Share Partner';


--
-- Name: COLUMN res_partner.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.write_date IS 'Last Updated on';


--
-- Name: COLUMN res_partner.contact_address_complete; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.contact_address_complete IS 'Contact Address Complete';


--
-- Name: COLUMN res_partner.message_bounce; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.message_bounce IS 'Bounce';


--
-- Name: COLUMN res_partner.email_normalized; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.email_normalized IS 'Normalized Email';


--
-- Name: COLUMN res_partner.signup_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.signup_type IS 'Signup Token Type';


--
-- Name: COLUMN res_partner.phone_sanitized; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.phone_sanitized IS 'Sanitized Number';


--
-- Name: COLUMN res_partner.ocn_token; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.ocn_token IS 'OCN Token';


--
-- Name: COLUMN res_partner.website_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.website_id IS 'Website';


--
-- Name: COLUMN res_partner.is_published; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.is_published IS 'Is Published';


--
-- Name: COLUMN res_partner.specific_property_product_pricelist; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.specific_property_product_pricelist IS 'Specific Property Product Pricelist';


--
-- Name: COLUMN res_partner.invoice_template_pdf_report_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.invoice_template_pdf_report_id IS 'Invoice report';


--
-- Name: COLUMN res_partner.supplier_rank; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.supplier_rank IS 'Supplier Rank';


--
-- Name: COLUMN res_partner.customer_rank; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.customer_rank IS 'Customer Rank';


--
-- Name: COLUMN res_partner.autopost_bills; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.autopost_bills IS 'Auto-post bills';


--
-- Name: COLUMN res_partner.credit_limit; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.credit_limit IS 'Credit Limit';


--
-- Name: COLUMN res_partner.property_account_payable_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.property_account_payable_id IS 'Account Payable';


--
-- Name: COLUMN res_partner.property_account_receivable_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.property_account_receivable_id IS 'Account Receivable';


--
-- Name: COLUMN res_partner.property_account_position_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.property_account_position_id IS 'Fiscal Position';


--
-- Name: COLUMN res_partner.property_payment_term_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.property_payment_term_id IS 'Customer Payment Terms';


--
-- Name: COLUMN res_partner.property_supplier_payment_term_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.property_supplier_payment_term_id IS 'Vendor Payment Terms';


--
-- Name: COLUMN res_partner.trust; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.trust IS 'Degree of trust you have in this debtor';


--
-- Name: COLUMN res_partner.ignore_abnormal_invoice_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.ignore_abnormal_invoice_date IS 'Ignore Abnormal Invoice Date';


--
-- Name: COLUMN res_partner.ignore_abnormal_invoice_amount; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.ignore_abnormal_invoice_amount IS 'Ignore Abnormal Invoice Amount';


--
-- Name: COLUMN res_partner.invoice_sending_method; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.invoice_sending_method IS 'Invoice sending';


--
-- Name: COLUMN res_partner.invoice_edi_format_store; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.invoice_edi_format_store IS 'Invoice Edi Format Store';


--
-- Name: COLUMN res_partner.property_outbound_payment_method_line_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.property_outbound_payment_method_line_id IS 'Property Outbound Payment Method Line';


--
-- Name: COLUMN res_partner.property_inbound_payment_method_line_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.property_inbound_payment_method_line_id IS 'Property Inbound Payment Method Line';


--
-- Name: COLUMN res_partner.peppol_endpoint; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.peppol_endpoint IS 'Peppol Endpoint';


--
-- Name: COLUMN res_partner.peppol_eas; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.peppol_eas IS 'Peppol e-address (EAS)';


--
-- Name: COLUMN res_partner.website_meta_og_img; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.website_meta_og_img IS 'Website opengraph image';


--
-- Name: COLUMN res_partner.website_meta_title; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.website_meta_title IS 'Website meta title';


--
-- Name: COLUMN res_partner.website_meta_description; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.website_meta_description IS 'Website meta description';


--
-- Name: COLUMN res_partner.website_meta_keywords; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.website_meta_keywords IS 'Website meta keywords';


--
-- Name: COLUMN res_partner.seo_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.seo_name IS 'Seo name';


--
-- Name: COLUMN res_partner.website_description; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.website_description IS 'Website Partner Full Description';


--
-- Name: COLUMN res_partner.website_short_description; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.website_short_description IS 'Website Partner Short Description';


--
-- Name: COLUMN res_partner.is_seo_optimized; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.is_seo_optimized IS 'SEO optimized';


--
-- Name: COLUMN res_partner.online_partner_information; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.online_partner_information IS 'Online Partner Information';


--
-- Name: COLUMN res_partner.sale_warn_msg; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.sale_warn_msg IS 'Message for Sales Order';


--
-- Name: COLUMN res_partner.followup_reminder_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.followup_reminder_type IS 'Reminders';


--
-- Name: COLUMN res_partner.followup_next_action_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.followup_next_action_date IS 'Next reminder';


--
-- Name: COLUMN res_partner.followup_responsible_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.followup_responsible_id IS 'Responsible';


--
-- Name: COLUMN res_partner.property_delivery_carrier_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.property_delivery_carrier_id IS 'Delivery Method';


--
-- Name: COLUMN res_partner.is_pickup_location; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner.is_pickup_location IS 'Is Pickup Location';


--
-- Name: CONSTRAINT res_partner_check_name ON res_partner; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON CONSTRAINT res_partner_check_name ON public.res_partner IS 'CHECK( (type=''contact'' AND name IS NOT NULL) or (type!=''contact'') )';


--
-- Name: res_partner_bank; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_partner_bank (
    id integer NOT NULL,
    partner_id integer NOT NULL,
    bank_id integer,
    sequence integer,
    currency_id integer,
    company_id integer,
    create_uid integer,
    write_uid integer,
    acc_number character varying NOT NULL,
    clearing_number character varying,
    sanitized_acc_number character varying,
    acc_holder_name character varying,
    note text,
    active boolean,
    allow_out_payment boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    has_iban_warning boolean,
    has_money_transfer_warning boolean
);


--
-- Name: TABLE res_partner_bank; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_partner_bank IS 'Bank Accounts';


--
-- Name: COLUMN res_partner_bank.partner_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.partner_id IS 'Account Holder';


--
-- Name: COLUMN res_partner_bank.bank_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.bank_id IS 'Bank';


--
-- Name: COLUMN res_partner_bank.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.sequence IS 'Sequence';


--
-- Name: COLUMN res_partner_bank.currency_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.currency_id IS 'Currency';


--
-- Name: COLUMN res_partner_bank.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.company_id IS 'Company';


--
-- Name: COLUMN res_partner_bank.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.create_uid IS 'Created by';


--
-- Name: COLUMN res_partner_bank.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_partner_bank.acc_number; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.acc_number IS 'Account Number';


--
-- Name: COLUMN res_partner_bank.clearing_number; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.clearing_number IS 'Clearing Number';


--
-- Name: COLUMN res_partner_bank.sanitized_acc_number; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.sanitized_acc_number IS 'Sanitized Account Number';


--
-- Name: COLUMN res_partner_bank.acc_holder_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.acc_holder_name IS 'Account Holder Name';


--
-- Name: COLUMN res_partner_bank.note; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.note IS 'Notes';


--
-- Name: COLUMN res_partner_bank.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.active IS 'Active';


--
-- Name: COLUMN res_partner_bank.allow_out_payment; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.allow_out_payment IS 'Send Money';


--
-- Name: COLUMN res_partner_bank.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.create_date IS 'Created on';


--
-- Name: COLUMN res_partner_bank.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.write_date IS 'Last Updated on';


--
-- Name: COLUMN res_partner_bank.has_iban_warning; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.has_iban_warning IS 'Has Iban Warning';


--
-- Name: COLUMN res_partner_bank.has_money_transfer_warning; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_bank.has_money_transfer_warning IS 'Has Money Transfer Warning';


--
-- Name: res_partner_bank_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_partner_bank_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_partner_bank_id_seq OWNED BY public.res_partner_bank.id;


--
-- Name: res_partner_category; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_partner_category (
    id integer NOT NULL,
    color integer,
    parent_id integer,
    create_uid integer,
    write_uid integer,
    parent_path character varying,
    name jsonb NOT NULL,
    active boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_partner_category; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_partner_category IS 'Partner Tags';


--
-- Name: COLUMN res_partner_category.color; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_category.color IS 'Color';


--
-- Name: COLUMN res_partner_category.parent_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_category.parent_id IS 'Category';


--
-- Name: COLUMN res_partner_category.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_category.create_uid IS 'Created by';


--
-- Name: COLUMN res_partner_category.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_category.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_partner_category.parent_path; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_category.parent_path IS 'Parent Path';


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

COMMENT ON COLUMN public.res_partner_category.name IS 'Name';


--
-- Name: COLUMN res_partner_category.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_category.active IS 'Active';


--
-- Name: COLUMN res_partner_category.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_category.create_date IS 'Created on';


--
-- Name: COLUMN res_partner_category.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_category.write_date IS 'Last Updated on';


--
-- Name: res_partner_category_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_partner_category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_partner_category_id_seq OWNED BY public.res_partner_category.id;


--
-- Name: res_partner_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_partner_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_partner_id_seq OWNED BY public.res_partner.id;


--
-- Name: res_partner_industry; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_partner_industry (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name jsonb,
    full_name jsonb,
    active boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_partner_industry; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_partner_industry IS 'Industry';


--
-- Name: COLUMN res_partner_industry.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_industry.create_uid IS 'Created by';


--
-- Name: COLUMN res_partner_industry.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_industry.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.res_partner_industry.name IS 'Name';


--
-- Name: COLUMN res_partner_industry.full_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_industry.full_name IS 'Full Name';


--
-- Name: COLUMN res_partner_industry.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_industry.active IS 'Active';


--
-- Name: COLUMN res_partner_industry.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_industry.create_date IS 'Created on';


--
-- Name: COLUMN res_partner_industry.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_partner_industry.write_date IS 'Last Updated on';


--
-- Name: res_partner_industry_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_partner_industry_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_partner_industry_id_seq OWNED BY public.res_partner_industry.id;


--
-- Name: res_partner_res_partner_category_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_partner_res_partner_category_rel (
    category_id integer NOT NULL,
    partner_id integer NOT NULL
);


--
-- Name: TABLE res_partner_res_partner_category_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_partner_res_partner_category_rel IS 'RELATION BETWEEN res_partner_category AND res_partner';


--
-- Name: res_role; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_role (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_role; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_role IS 'Represents a role in the system used to categorize users. Each role has a unique name and can be associated with multiple users. Roles can be mentioned in messages to notify all associated users.';


--
-- Name: COLUMN res_role.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_role.create_uid IS 'Created by';


--
-- Name: COLUMN res_role.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_role.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.res_role.name IS 'Name';


--
-- Name: COLUMN res_role.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_role.create_date IS 'Created on';


--
-- Name: COLUMN res_role.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_role.write_date IS 'Last Updated on';


--
-- Name: res_role_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_role_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_role_id_seq OWNED BY public.res_role.id;


--
-- Name: res_role_res_users_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_role_res_users_rel (
    res_role_id integer NOT NULL,
    res_users_id integer NOT NULL
);


--
-- Name: TABLE res_role_res_users_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_role_res_users_rel IS 'RELATION BETWEEN res_role AND res_users';


--
-- Name: res_users; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_users (
    id integer NOT NULL,
    company_id integer NOT NULL,
    partner_id integer NOT NULL,
    active boolean DEFAULT true,
    create_date timestamp without time zone,
    login character varying NOT NULL,
    password character varying,
    action_id integer,
    create_uid integer,
    write_uid integer,
    signature text,
    share boolean,
    write_date timestamp without time zone,
    totp_last_counter integer,
    totp_secret character varying,
    tour_enabled boolean,
    notification_type character varying NOT NULL,
    manual_im_status character varying,
    odoobot_state character varying,
    odoobot_failed boolean,
    oauth_uid character varying,
    website_id integer,
    sale_team_id integer,
    CONSTRAINT res_users_notification_type CHECK ((((notification_type)::text = 'email'::text) OR (NOT share)))
);


--
-- Name: COLUMN res_users.action_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.action_id IS 'Home Action';


--
-- Name: COLUMN res_users.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.create_uid IS 'Created by';


--
-- Name: COLUMN res_users.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_users.signature; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.signature IS 'Email Signature';


--
-- Name: COLUMN res_users.share; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.share IS 'Share User';


--
-- Name: COLUMN res_users.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.write_date IS 'Last Updated on';


--
-- Name: COLUMN res_users.totp_last_counter; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.totp_last_counter IS 'Totp Last Counter';


--
-- Name: COLUMN res_users.tour_enabled; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.tour_enabled IS 'Onboarding';


--
-- Name: COLUMN res_users.notification_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.notification_type IS 'Notification';


--
-- Name: COLUMN res_users.manual_im_status; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.manual_im_status IS 'IM status manually set by the user';


--
-- Name: COLUMN res_users.odoobot_state; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.odoobot_state IS 'OdooBot Status';


--
-- Name: COLUMN res_users.odoobot_failed; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.odoobot_failed IS 'Odoobot Failed';


--
-- Name: COLUMN res_users.oauth_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.oauth_uid IS 'OAuth User ID';


--
-- Name: COLUMN res_users.website_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.website_id IS 'Website';


--
-- Name: COLUMN res_users.sale_team_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users.sale_team_id IS 'User Sales Team';


--
-- Name: CONSTRAINT res_users_notification_type ON res_users; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON CONSTRAINT res_users_notification_type ON public.res_users IS 'CHECK (notification_type = ''email'' OR NOT share)';


--
-- Name: res_users_apikeys; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_users_apikeys (
    id integer NOT NULL,
    name character varying NOT NULL,
    user_id integer NOT NULL,
    scope character varying,
    expiration_date timestamp without time zone,
    index character varying(8),
    key character varying,
    create_date timestamp without time zone DEFAULT (now() AT TIME ZONE 'utc'::text),
    CONSTRAINT res_users_apikeys_index_check CHECK ((char_length((index)::text) = 8))
);


--
-- Name: res_users_apikeys_description; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_users_apikeys_description (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    duration character varying NOT NULL,
    expiration_date timestamp without time zone,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_users_apikeys_description; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_users_apikeys_description IS 'API Key Description';


--
-- Name: COLUMN res_users_apikeys_description.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_apikeys_description.create_uid IS 'Created by';


--
-- Name: COLUMN res_users_apikeys_description.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_apikeys_description.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.res_users_apikeys_description.name IS 'Description';


--
-- Name: COLUMN res_users_apikeys_description.duration; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_apikeys_description.duration IS 'Duration';


--
-- Name: COLUMN res_users_apikeys_description.expiration_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_apikeys_description.expiration_date IS 'Expiration Date';


--
-- Name: COLUMN res_users_apikeys_description.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_apikeys_description.create_date IS 'Created on';


--
-- Name: COLUMN res_users_apikeys_description.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_apikeys_description.write_date IS 'Last Updated on';


--
-- Name: res_users_apikeys_description_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_users_apikeys_description_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_users_apikeys_description_id_seq OWNED BY public.res_users_apikeys_description.id;


--
-- Name: res_users_apikeys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_users_apikeys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_users_apikeys_id_seq OWNED BY public.res_users_apikeys.id;


--
-- Name: res_users_deletion; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_users_deletion (
    id integer NOT NULL,
    user_id integer,
    user_id_int integer,
    create_uid integer,
    write_uid integer,
    state character varying NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_users_deletion; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_users_deletion IS 'Users Deletion Request';


--
-- Name: COLUMN res_users_deletion.user_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_deletion.user_id IS 'User';


--
-- Name: COLUMN res_users_deletion.user_id_int; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_deletion.user_id_int IS 'User Id';


--
-- Name: COLUMN res_users_deletion.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_deletion.create_uid IS 'Created by';


--
-- Name: COLUMN res_users_deletion.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_deletion.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_users_deletion.state; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_deletion.state IS 'State';


--
-- Name: COLUMN res_users_deletion.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_deletion.create_date IS 'Created on';


--
-- Name: COLUMN res_users_deletion.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_deletion.write_date IS 'Last Updated on';


--
-- Name: res_users_deletion_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_users_deletion_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_users_deletion_id_seq OWNED BY public.res_users_deletion.id;


--
-- Name: res_users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_users_id_seq OWNED BY public.res_users.id;


--
-- Name: res_users_identitycheck; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_users_identitycheck (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    request character varying,
    auth_method character varying,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_users_identitycheck; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_users_identitycheck IS 'Password Check Wizard';


--
-- Name: COLUMN res_users_identitycheck.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_identitycheck.create_uid IS 'Created by';


--
-- Name: COLUMN res_users_identitycheck.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_identitycheck.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_users_identitycheck.request; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_identitycheck.request IS 'Request';


--
-- Name: COLUMN res_users_identitycheck.auth_method; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_identitycheck.auth_method IS 'Auth Method';


--
-- Name: COLUMN res_users_identitycheck.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_identitycheck.create_date IS 'Created on';


--
-- Name: COLUMN res_users_identitycheck.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_identitycheck.write_date IS 'Last Updated on';


--
-- Name: res_users_identitycheck_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_users_identitycheck_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_users_identitycheck_id_seq OWNED BY public.res_users_identitycheck.id;


--
-- Name: res_users_log; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_users_log (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE res_users_log; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_users_log IS 'Users Log';


--
-- Name: COLUMN res_users_log.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_log.create_uid IS 'Created by';


--
-- Name: COLUMN res_users_log.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_log.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_users_log.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_log.create_date IS 'Created on';


--
-- Name: COLUMN res_users_log.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_log.write_date IS 'Last Updated on';


--
-- Name: res_users_log_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_users_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_users_log_id_seq OWNED BY public.res_users_log.id;


--
-- Name: res_users_settings; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_users_settings (
    id integer NOT NULL,
    user_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    homemenu_config jsonb,
    voice_active_duration integer,
    push_to_talk_key character varying,
    channel_notifications character varying,
    is_discuss_sidebar_category_channel_open boolean,
    is_discuss_sidebar_category_chat_open boolean,
    use_push_to_talk boolean,
    mute_until_dt timestamp without time zone
);


--
-- Name: TABLE res_users_settings; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_users_settings IS 'User Settings';


--
-- Name: COLUMN res_users_settings.user_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.user_id IS 'User';


--
-- Name: COLUMN res_users_settings.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.create_uid IS 'Created by';


--
-- Name: COLUMN res_users_settings.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_users_settings.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.create_date IS 'Created on';


--
-- Name: COLUMN res_users_settings.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.write_date IS 'Last Updated on';


--
-- Name: COLUMN res_users_settings.homemenu_config; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.homemenu_config IS 'Home Menu Configuration';


--
-- Name: COLUMN res_users_settings.voice_active_duration; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.voice_active_duration IS 'Duration of voice activity in ms';


--
-- Name: COLUMN res_users_settings.push_to_talk_key; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.push_to_talk_key IS 'Push-To-Talk shortcut';


--
-- Name: COLUMN res_users_settings.channel_notifications; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.channel_notifications IS 'Channel Notifications';


--
-- Name: COLUMN res_users_settings.is_discuss_sidebar_category_channel_open; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.is_discuss_sidebar_category_channel_open IS 'Is discuss sidebar category channel open?';


--
-- Name: COLUMN res_users_settings.is_discuss_sidebar_category_chat_open; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.is_discuss_sidebar_category_chat_open IS 'Is discuss sidebar category chat open?';


--
-- Name: COLUMN res_users_settings.use_push_to_talk; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.use_push_to_talk IS 'Use the push to talk feature';


--
-- Name: COLUMN res_users_settings.mute_until_dt; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings.mute_until_dt IS 'Mute notifications until';


--
-- Name: res_users_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_users_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_users_settings_id_seq OWNED BY public.res_users_settings.id;


--
-- Name: res_users_settings_volumes; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_users_settings_volumes (
    id integer NOT NULL,
    user_setting_id integer NOT NULL,
    partner_id integer,
    guest_id integer,
    create_uid integer,
    write_uid integer,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    volume double precision,
    CONSTRAINT res_users_settings_volumes_partner_or_guest_exists CHECK ((((partner_id IS NOT NULL) AND (guest_id IS NULL)) OR ((partner_id IS NULL) AND (guest_id IS NOT NULL))))
);


--
-- Name: TABLE res_users_settings_volumes; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_users_settings_volumes IS 'User Settings Volumes';


--
-- Name: COLUMN res_users_settings_volumes.user_setting_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings_volumes.user_setting_id IS 'User Setting';


--
-- Name: COLUMN res_users_settings_volumes.partner_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings_volumes.partner_id IS 'Partner';


--
-- Name: COLUMN res_users_settings_volumes.guest_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings_volumes.guest_id IS 'Guest';


--
-- Name: COLUMN res_users_settings_volumes.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings_volumes.create_uid IS 'Created by';


--
-- Name: COLUMN res_users_settings_volumes.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings_volumes.write_uid IS 'Last Updated by';


--
-- Name: COLUMN res_users_settings_volumes.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings_volumes.create_date IS 'Created on';


--
-- Name: COLUMN res_users_settings_volumes.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings_volumes.write_date IS 'Last Updated on';


--
-- Name: COLUMN res_users_settings_volumes.volume; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.res_users_settings_volumes.volume IS 'Volume';


--
-- Name: CONSTRAINT res_users_settings_volumes_partner_or_guest_exists ON res_users_settings_volumes; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON CONSTRAINT res_users_settings_volumes_partner_or_guest_exists ON public.res_users_settings_volumes IS 'CHECK((partner_id IS NOT NULL AND guest_id IS NULL) OR (partner_id IS NULL AND guest_id IS NOT NULL))';


--
-- Name: res_users_settings_volumes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: res_users_settings_volumes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.res_users_settings_volumes_id_seq OWNED BY public.res_users_settings_volumes.id;


--
-- Name: res_users_spreadsheet_dashboard_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_users_spreadsheet_dashboard_rel (
    spreadsheet_dashboard_id integer NOT NULL,
    res_users_id integer NOT NULL
);


--
-- Name: TABLE res_users_spreadsheet_dashboard_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_users_spreadsheet_dashboard_rel IS 'RELATION BETWEEN spreadsheet_dashboard AND res_users';


--
-- Name: res_users_web_tour_tour_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.res_users_web_tour_tour_rel (
    web_tour_tour_id integer NOT NULL,
    res_users_id integer NOT NULL
);


--
-- Name: TABLE res_users_web_tour_tour_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.res_users_web_tour_tour_rel IS 'RELATION BETWEEN web_tour_tour AND res_users';


--
-- Name: reset_view_arch_wizard; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.reset_view_arch_wizard (
    id integer NOT NULL,
    view_id integer,
    compare_view_id integer,
    create_uid integer,
    write_uid integer,
    reset_mode character varying NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE reset_view_arch_wizard; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.reset_view_arch_wizard IS 'Reset View Architecture Wizard';


--
-- Name: COLUMN reset_view_arch_wizard.view_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.reset_view_arch_wizard.view_id IS 'View';


--
-- Name: COLUMN reset_view_arch_wizard.compare_view_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.reset_view_arch_wizard.compare_view_id IS 'Compare To View';


--
-- Name: COLUMN reset_view_arch_wizard.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.reset_view_arch_wizard.create_uid IS 'Created by';


--
-- Name: COLUMN reset_view_arch_wizard.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.reset_view_arch_wizard.write_uid IS 'Last Updated by';


--
-- Name: COLUMN reset_view_arch_wizard.reset_mode; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.reset_view_arch_wizard.reset_mode IS 'Reset Mode';


--
-- Name: COLUMN reset_view_arch_wizard.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.reset_view_arch_wizard.create_date IS 'Created on';


--
-- Name: COLUMN reset_view_arch_wizard.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.reset_view_arch_wizard.write_date IS 'Last Updated on';


--
-- Name: reset_view_arch_wizard_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: reset_view_arch_wizard_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.reset_view_arch_wizard_id_seq OWNED BY public.reset_view_arch_wizard.id;


--
-- Name: resource_calendar; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.resource_calendar (
    id integer NOT NULL,
    company_id integer,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    tz character varying NOT NULL,
    hours_per_day numeric,
    active boolean,
    two_weeks_calendar boolean,
    flexible_hours boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    hours_per_week double precision,
    full_time_required_hours double precision
);


--
-- Name: TABLE resource_calendar; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.resource_calendar IS 'Resource Working Time';


--
-- Name: COLUMN resource_calendar.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.company_id IS 'Company';


--
-- Name: COLUMN resource_calendar.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.create_uid IS 'Created by';


--
-- Name: COLUMN resource_calendar.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.resource_calendar.name IS 'Name';


--
-- Name: COLUMN resource_calendar.tz; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.tz IS 'Timezone';


--
-- Name: COLUMN resource_calendar.hours_per_day; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.hours_per_day IS 'Average Hour per Day';


--
-- Name: COLUMN resource_calendar.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.active IS 'Active';


--
-- Name: COLUMN resource_calendar.two_weeks_calendar; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.two_weeks_calendar IS 'Calendar in 2 weeks mode';


--
-- Name: COLUMN resource_calendar.flexible_hours; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.flexible_hours IS 'Flexible Hours';


--
-- Name: COLUMN resource_calendar.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.create_date IS 'Created on';


--
-- Name: COLUMN resource_calendar.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.write_date IS 'Last Updated on';


--
-- Name: COLUMN resource_calendar.hours_per_week; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.hours_per_week IS 'Hours per Week';


--
-- Name: COLUMN resource_calendar.full_time_required_hours; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar.full_time_required_hours IS 'Company Full Time';


--
-- Name: resource_calendar_attendance; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.resource_calendar_attendance (
    id integer NOT NULL,
    calendar_id integer NOT NULL,
    resource_id integer,
    sequence integer,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    dayofweek character varying NOT NULL,
    day_period character varying NOT NULL,
    week_type character varying,
    display_type character varying,
    date_from date,
    date_to date,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    hour_from double precision NOT NULL,
    hour_to double precision NOT NULL,
    duration_days double precision
);


--
-- Name: TABLE resource_calendar_attendance; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.resource_calendar_attendance IS 'Work Detail';


--
-- Name: COLUMN resource_calendar_attendance.calendar_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.calendar_id IS 'Resource''s Calendar';


--
-- Name: COLUMN resource_calendar_attendance.resource_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.resource_id IS 'Resource';


--
-- Name: COLUMN resource_calendar_attendance.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.sequence IS 'Sequence';


--
-- Name: COLUMN resource_calendar_attendance.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.create_uid IS 'Created by';


--
-- Name: COLUMN resource_calendar_attendance.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.resource_calendar_attendance.name IS 'Name';


--
-- Name: COLUMN resource_calendar_attendance.dayofweek; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.dayofweek IS 'Day of Week';


--
-- Name: COLUMN resource_calendar_attendance.day_period; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.day_period IS 'Day Period';


--
-- Name: COLUMN resource_calendar_attendance.week_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.week_type IS 'Week Number';


--
-- Name: COLUMN resource_calendar_attendance.display_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.display_type IS 'Display Type';


--
-- Name: COLUMN resource_calendar_attendance.date_from; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.date_from IS 'Starting Date';


--
-- Name: COLUMN resource_calendar_attendance.date_to; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.date_to IS 'End Date';


--
-- Name: COLUMN resource_calendar_attendance.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.create_date IS 'Created on';


--
-- Name: COLUMN resource_calendar_attendance.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.write_date IS 'Last Updated on';


--
-- Name: COLUMN resource_calendar_attendance.hour_from; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.hour_from IS 'Work from';


--
-- Name: COLUMN resource_calendar_attendance.hour_to; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.hour_to IS 'Work to';


--
-- Name: COLUMN resource_calendar_attendance.duration_days; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_attendance.duration_days IS 'Duration (days)';


--
-- Name: resource_calendar_attendance_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: resource_calendar_attendance_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.resource_calendar_attendance_id_seq OWNED BY public.resource_calendar_attendance.id;


--
-- Name: resource_calendar_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: resource_calendar_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.resource_calendar_id_seq OWNED BY public.resource_calendar.id;


--
-- Name: resource_calendar_leaves; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.resource_calendar_leaves (
    id integer NOT NULL,
    company_id integer,
    calendar_id integer,
    resource_id integer,
    create_uid integer,
    write_uid integer,
    name character varying,
    time_type character varying,
    date_from timestamp without time zone NOT NULL,
    date_to timestamp without time zone NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE resource_calendar_leaves; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.resource_calendar_leaves IS 'Resource Time Off Detail';


--
-- Name: COLUMN resource_calendar_leaves.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_leaves.company_id IS 'Company';


--
-- Name: COLUMN resource_calendar_leaves.calendar_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_leaves.calendar_id IS 'Working Hours';


--
-- Name: COLUMN resource_calendar_leaves.resource_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_leaves.resource_id IS 'Resource';


--
-- Name: COLUMN resource_calendar_leaves.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_leaves.create_uid IS 'Created by';


--
-- Name: COLUMN resource_calendar_leaves.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_leaves.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.resource_calendar_leaves.name IS 'Reason';


--
-- Name: COLUMN resource_calendar_leaves.time_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_leaves.time_type IS 'Time Type';


--
-- Name: COLUMN resource_calendar_leaves.date_from; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_leaves.date_from IS 'Start Date';


--
-- Name: COLUMN resource_calendar_leaves.date_to; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_leaves.date_to IS 'End Date';


--
-- Name: COLUMN resource_calendar_leaves.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_leaves.create_date IS 'Created on';


--
-- Name: COLUMN resource_calendar_leaves.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_calendar_leaves.write_date IS 'Last Updated on';


--
-- Name: resource_calendar_leaves_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: resource_calendar_leaves_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.resource_calendar_leaves_id_seq OWNED BY public.resource_calendar_leaves.id;


--
-- Name: resource_resource; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.resource_resource (
    id integer NOT NULL,
    company_id integer,
    user_id integer,
    calendar_id integer,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    resource_type character varying NOT NULL,
    tz character varying NOT NULL,
    active boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    time_efficiency double precision NOT NULL,
    color integer,
    CONSTRAINT resource_resource_check_time_efficiency CHECK ((time_efficiency > (0)::double precision))
);


--
-- Name: TABLE resource_resource; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.resource_resource IS 'Resources';


--
-- Name: COLUMN resource_resource.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.company_id IS 'Company';


--
-- Name: COLUMN resource_resource.user_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.user_id IS 'User';


--
-- Name: COLUMN resource_resource.calendar_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.calendar_id IS 'Working Time';


--
-- Name: COLUMN resource_resource.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.create_uid IS 'Created by';


--
-- Name: COLUMN resource_resource.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.resource_resource.name IS 'Name';


--
-- Name: COLUMN resource_resource.resource_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.resource_type IS 'Type';


--
-- Name: COLUMN resource_resource.tz; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.tz IS 'Timezone';


--
-- Name: COLUMN resource_resource.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.active IS 'Active';


--
-- Name: COLUMN resource_resource.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.create_date IS 'Created on';


--
-- Name: COLUMN resource_resource.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.write_date IS 'Last Updated on';


--
-- Name: COLUMN resource_resource.time_efficiency; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.time_efficiency IS 'Efficiency Factor';


--
-- Name: COLUMN resource_resource.color; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.resource_resource.color IS 'Color';


--
-- Name: CONSTRAINT resource_resource_check_time_efficiency ON resource_resource; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON CONSTRAINT resource_resource_check_time_efficiency ON public.resource_resource IS 'CHECK(time_efficiency>0)';


--
-- Name: resource_resource_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: resource_resource_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.resource_resource_id_seq OWNED BY public.resource_resource.id;


--
-- Name: rule_group_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.rule_group_rel (
    rule_group_id integer NOT NULL,
    group_id integer NOT NULL
);


--
-- Name: TABLE rule_group_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.rule_group_rel IS 'RELATION BETWEEN ir_rule AND res_groups';


--
-- Name: sale_advance_payment_inv; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_advance_payment_inv (
    id integer NOT NULL,
    currency_id integer,
    company_id integer,
    create_uid integer,
    write_uid integer,
    advance_payment_method character varying NOT NULL,
    fixed_amount numeric,
    deduct_down_payments boolean,
    consolidated_billing boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    amount double precision
);


--
-- Name: TABLE sale_advance_payment_inv; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_advance_payment_inv IS 'Sales Advance Payment Invoice';


--
-- Name: COLUMN sale_advance_payment_inv.currency_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_advance_payment_inv.currency_id IS 'Currency';


--
-- Name: COLUMN sale_advance_payment_inv.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_advance_payment_inv.company_id IS 'Company';


--
-- Name: COLUMN sale_advance_payment_inv.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_advance_payment_inv.create_uid IS 'Created by';


--
-- Name: COLUMN sale_advance_payment_inv.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_advance_payment_inv.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sale_advance_payment_inv.advance_payment_method; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_advance_payment_inv.advance_payment_method IS 'Create Invoice';


--
-- Name: COLUMN sale_advance_payment_inv.fixed_amount; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_advance_payment_inv.fixed_amount IS 'Down Payment Amount (Fixed)';


--
-- Name: COLUMN sale_advance_payment_inv.deduct_down_payments; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_advance_payment_inv.deduct_down_payments IS 'Deduct down payments';


--
-- Name: COLUMN sale_advance_payment_inv.consolidated_billing; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_advance_payment_inv.consolidated_billing IS 'Consolidated Billing';


--
-- Name: COLUMN sale_advance_payment_inv.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_advance_payment_inv.create_date IS 'Created on';


--
-- Name: COLUMN sale_advance_payment_inv.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_advance_payment_inv.write_date IS 'Last Updated on';


--
-- Name: COLUMN sale_advance_payment_inv.amount; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_advance_payment_inv.amount IS 'Down Payment';


--
-- Name: sale_advance_payment_inv_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_advance_payment_inv_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_advance_payment_inv_id_seq OWNED BY public.sale_advance_payment_inv.id;


--
-- Name: sale_advance_payment_inv_sale_order_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_advance_payment_inv_sale_order_rel (
    sale_advance_payment_inv_id integer NOT NULL,
    sale_order_id integer NOT NULL
);


--
-- Name: TABLE sale_advance_payment_inv_sale_order_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_advance_payment_inv_sale_order_rel IS 'RELATION BETWEEN sale_advance_payment_inv AND sale_order';


--
-- Name: sale_mass_cancel_orders; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_mass_cancel_orders (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sale_mass_cancel_orders; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_mass_cancel_orders IS 'Cancel multiple quotations';


--
-- Name: COLUMN sale_mass_cancel_orders.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_mass_cancel_orders.create_uid IS 'Created by';


--
-- Name: COLUMN sale_mass_cancel_orders.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_mass_cancel_orders.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sale_mass_cancel_orders.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_mass_cancel_orders.create_date IS 'Created on';


--
-- Name: COLUMN sale_mass_cancel_orders.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_mass_cancel_orders.write_date IS 'Last Updated on';


--
-- Name: sale_mass_cancel_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_mass_cancel_orders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_mass_cancel_orders_id_seq OWNED BY public.sale_mass_cancel_orders.id;


--
-- Name: sale_order_discount; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_order_discount (
    id integer NOT NULL,
    sale_order_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    discount_type character varying,
    discount_amount numeric,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    discount_percentage double precision
);


--
-- Name: TABLE sale_order_discount; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_order_discount IS 'Discount Wizard';


--
-- Name: COLUMN sale_order_discount.sale_order_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_discount.sale_order_id IS 'Sale Order';


--
-- Name: COLUMN sale_order_discount.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_discount.create_uid IS 'Created by';


--
-- Name: COLUMN sale_order_discount.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_discount.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sale_order_discount.discount_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_discount.discount_type IS 'Discount Type';


--
-- Name: COLUMN sale_order_discount.discount_amount; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_discount.discount_amount IS 'Amount';


--
-- Name: COLUMN sale_order_discount.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_discount.create_date IS 'Created on';


--
-- Name: COLUMN sale_order_discount.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_discount.write_date IS 'Last Updated on';


--
-- Name: COLUMN sale_order_discount.discount_percentage; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_discount.discount_percentage IS 'Percentage';


--
-- Name: sale_order_discount_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_order_discount_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_order_discount_id_seq OWNED BY public.sale_order_discount.id;


--
-- Name: sale_order_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_order_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_order_id_seq OWNED BY public.sale_order.id;


--
-- Name: sale_order_line_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_order_line_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_order_line_id_seq OWNED BY public.sale_order_line.id;


--
-- Name: sale_order_line_invoice_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_order_line_invoice_rel (
    invoice_line_id integer NOT NULL,
    order_line_id integer NOT NULL
);


--
-- Name: TABLE sale_order_line_invoice_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_order_line_invoice_rel IS 'RELATION BETWEEN account_move_line AND sale_order_line';


--
-- Name: sale_order_line_product_document_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_order_line_product_document_rel (
    sale_order_line_id integer NOT NULL,
    product_document_id integer NOT NULL
);


--
-- Name: TABLE sale_order_line_product_document_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_order_line_product_document_rel IS 'RELATION BETWEEN sale_order_line AND product_document';


--
-- Name: sale_order_mass_cancel_wizard_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_order_mass_cancel_wizard_rel (
    sale_mass_cancel_orders_id integer NOT NULL,
    sale_order_id integer NOT NULL
);


--
-- Name: TABLE sale_order_mass_cancel_wizard_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_order_mass_cancel_wizard_rel IS 'RELATION BETWEEN sale_mass_cancel_orders AND sale_order';


--
-- Name: sale_order_option; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_order_option (
    id integer NOT NULL,
    order_id integer,
    product_id integer NOT NULL,
    line_id integer,
    sequence integer,
    uom_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name text NOT NULL,
    quantity numeric NOT NULL,
    price_unit numeric NOT NULL,
    discount numeric,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sale_order_option; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_order_option IS 'Sale Options';


--
-- Name: COLUMN sale_order_option.order_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.order_id IS 'Sales Order Reference';


--
-- Name: COLUMN sale_order_option.product_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.product_id IS 'Product';


--
-- Name: COLUMN sale_order_option.line_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.line_id IS 'Line';


--
-- Name: COLUMN sale_order_option.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.sequence IS 'Sequence';


--
-- Name: COLUMN sale_order_option.uom_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.uom_id IS 'Unit';


--
-- Name: COLUMN sale_order_option.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.create_uid IS 'Created by';


--
-- Name: COLUMN sale_order_option.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.sale_order_option.name IS 'Description';


--
-- Name: COLUMN sale_order_option.quantity; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.quantity IS 'Quantity';


--
-- Name: COLUMN sale_order_option.price_unit; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.price_unit IS 'Unit Price';


--
-- Name: COLUMN sale_order_option.discount; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.discount IS 'Discount (%)';


--
-- Name: COLUMN sale_order_option.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.create_date IS 'Created on';


--
-- Name: COLUMN sale_order_option.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_option.write_date IS 'Last Updated on';


--
-- Name: sale_order_option_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_order_option_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_order_option_id_seq OWNED BY public.sale_order_option.id;


--
-- Name: sale_order_spreadsheet; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_order_spreadsheet (
    id integer NOT NULL,
    company_id integer,
    order_id integer,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sale_order_spreadsheet; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_order_spreadsheet IS 'Quotation Spreadsheet';


--
-- Name: COLUMN sale_order_spreadsheet.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_spreadsheet.company_id IS 'Company';


--
-- Name: COLUMN sale_order_spreadsheet.order_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_spreadsheet.order_id IS 'Order';


--
-- Name: COLUMN sale_order_spreadsheet.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_spreadsheet.create_uid IS 'Created by';


--
-- Name: COLUMN sale_order_spreadsheet.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_spreadsheet.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.sale_order_spreadsheet.name IS 'Name';


--
-- Name: COLUMN sale_order_spreadsheet.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_spreadsheet.create_date IS 'Created on';


--
-- Name: COLUMN sale_order_spreadsheet.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_spreadsheet.write_date IS 'Last Updated on';


--
-- Name: sale_order_spreadsheet_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_order_spreadsheet_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_order_spreadsheet_id_seq OWNED BY public.sale_order_spreadsheet.id;


--
-- Name: sale_order_tag_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_order_tag_rel (
    order_id integer NOT NULL,
    tag_id integer NOT NULL
);


--
-- Name: TABLE sale_order_tag_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_order_tag_rel IS 'RELATION BETWEEN sale_order AND crm_tag';


--
-- Name: sale_order_template; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_order_template (
    id integer NOT NULL,
    company_id integer,
    sequence integer,
    mail_template_id integer,
    number_of_days integer,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    note jsonb,
    journal_id jsonb,
    active boolean,
    require_signature boolean,
    require_payment boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    prepayment_percent double precision,
    spreadsheet_template_id integer
);


--
-- Name: TABLE sale_order_template; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_order_template IS 'Quotation Template';


--
-- Name: COLUMN sale_order_template.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.company_id IS 'Company';


--
-- Name: COLUMN sale_order_template.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.sequence IS 'Sequence';


--
-- Name: COLUMN sale_order_template.mail_template_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.mail_template_id IS 'Confirmation Mail';


--
-- Name: COLUMN sale_order_template.number_of_days; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.number_of_days IS 'Quotation Duration';


--
-- Name: COLUMN sale_order_template.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.create_uid IS 'Created by';


--
-- Name: COLUMN sale_order_template.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.sale_order_template.name IS 'Quotation Template';


--
-- Name: COLUMN sale_order_template.note; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.note IS 'Terms and conditions';


--
-- Name: COLUMN sale_order_template.journal_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.journal_id IS 'Invoicing Journal';


--
-- Name: COLUMN sale_order_template.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.active IS 'Active';


--
-- Name: COLUMN sale_order_template.require_signature; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.require_signature IS 'Online Signature';


--
-- Name: COLUMN sale_order_template.require_payment; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.require_payment IS 'Online Payment';


--
-- Name: COLUMN sale_order_template.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.create_date IS 'Created on';


--
-- Name: COLUMN sale_order_template.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.write_date IS 'Last Updated on';


--
-- Name: COLUMN sale_order_template.prepayment_percent; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.prepayment_percent IS 'Prepayment percentage';


--
-- Name: COLUMN sale_order_template.spreadsheet_template_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template.spreadsheet_template_id IS 'Quote calculator';


--
-- Name: sale_order_template_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_order_template_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_order_template_id_seq OWNED BY public.sale_order_template.id;


--
-- Name: sale_order_template_line; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_order_template_line (
    id integer NOT NULL,
    sale_order_template_id integer NOT NULL,
    sequence integer,
    company_id integer,
    product_id integer,
    product_uom_id integer,
    create_uid integer,
    write_uid integer,
    display_type character varying,
    name jsonb,
    product_uom_qty numeric NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    CONSTRAINT sale_order_template_line_accountable_product_id_required CHECK (((display_type IS NOT NULL) OR ((product_id IS NOT NULL) AND (product_uom_id IS NOT NULL)))),
    CONSTRAINT sale_order_template_line_non_accountable_fields_null CHECK (((display_type IS NULL) OR ((product_id IS NULL) AND (product_uom_qty = (0)::numeric) AND (product_uom_id IS NULL))))
);


--
-- Name: TABLE sale_order_template_line; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_order_template_line IS 'Quotation Template Line';


--
-- Name: COLUMN sale_order_template_line.sale_order_template_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_line.sale_order_template_id IS 'Quotation Template Reference';


--
-- Name: COLUMN sale_order_template_line.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_line.sequence IS 'Sequence';


--
-- Name: COLUMN sale_order_template_line.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_line.company_id IS 'Company';


--
-- Name: COLUMN sale_order_template_line.product_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_line.product_id IS 'Product';


--
-- Name: COLUMN sale_order_template_line.product_uom_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_line.product_uom_id IS 'Unit';


--
-- Name: COLUMN sale_order_template_line.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_line.create_uid IS 'Created by';


--
-- Name: COLUMN sale_order_template_line.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_line.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sale_order_template_line.display_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_line.display_type IS 'Display Type';


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

COMMENT ON COLUMN public.sale_order_template_line.name IS 'Description';


--
-- Name: COLUMN sale_order_template_line.product_uom_qty; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_line.product_uom_qty IS 'Quantity';


--
-- Name: COLUMN sale_order_template_line.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_line.create_date IS 'Created on';


--
-- Name: COLUMN sale_order_template_line.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_line.write_date IS 'Last Updated on';


--
-- Name: CONSTRAINT sale_order_template_line_accountable_product_id_required ON sale_order_template_line; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON CONSTRAINT sale_order_template_line_accountable_product_id_required ON public.sale_order_template_line IS 'CHECK(display_type IS NOT NULL OR (product_id IS NOT NULL AND product_uom_id IS NOT NULL))';


--
-- Name: CONSTRAINT sale_order_template_line_non_accountable_fields_null ON sale_order_template_line; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON CONSTRAINT sale_order_template_line_non_accountable_fields_null ON public.sale_order_template_line IS 'CHECK(display_type IS NULL OR (product_id IS NULL AND product_uom_qty = 0 AND product_uom_id IS NULL))';


--
-- Name: sale_order_template_line_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_order_template_line_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_order_template_line_id_seq OWNED BY public.sale_order_template_line.id;


--
-- Name: sale_order_template_option; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_order_template_option (
    id integer NOT NULL,
    sale_order_template_id integer NOT NULL,
    company_id integer,
    product_id integer NOT NULL,
    uom_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name jsonb NOT NULL,
    quantity numeric NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sale_order_template_option; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_order_template_option IS 'Quotation Template Option';


--
-- Name: COLUMN sale_order_template_option.sale_order_template_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_option.sale_order_template_id IS 'Quotation Template Reference';


--
-- Name: COLUMN sale_order_template_option.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_option.company_id IS 'Company';


--
-- Name: COLUMN sale_order_template_option.product_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_option.product_id IS 'Product';


--
-- Name: COLUMN sale_order_template_option.uom_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_option.uom_id IS 'Unit';


--
-- Name: COLUMN sale_order_template_option.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_option.create_uid IS 'Created by';


--
-- Name: COLUMN sale_order_template_option.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_option.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.sale_order_template_option.name IS 'Description';


--
-- Name: COLUMN sale_order_template_option.quantity; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_option.quantity IS 'Quantity';


--
-- Name: COLUMN sale_order_template_option.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_option.create_date IS 'Created on';


--
-- Name: COLUMN sale_order_template_option.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_order_template_option.write_date IS 'Last Updated on';


--
-- Name: sale_order_template_option_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_order_template_option_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_order_template_option_id_seq OWNED BY public.sale_order_template_option.id;


--
-- Name: sale_order_transaction_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_order_transaction_rel (
    transaction_id integer NOT NULL,
    sale_order_id integer NOT NULL
);


--
-- Name: TABLE sale_order_transaction_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_order_transaction_rel IS 'RELATION BETWEEN payment_transaction AND sale_order';


--
-- Name: sale_payment_provider_onboarding_wizard; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_payment_provider_onboarding_wizard (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    payment_method character varying,
    paypal_email_account character varying,
    manual_name character varying,
    journal_name character varying,
    acc_number character varying,
    manual_post_msg text,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sale_payment_provider_onboarding_wizard; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_payment_provider_onboarding_wizard IS 'Sale Payment provider onboarding wizard';


--
-- Name: COLUMN sale_payment_provider_onboarding_wizard.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_payment_provider_onboarding_wizard.create_uid IS 'Created by';


--
-- Name: COLUMN sale_payment_provider_onboarding_wizard.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_payment_provider_onboarding_wizard.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sale_payment_provider_onboarding_wizard.payment_method; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_payment_provider_onboarding_wizard.payment_method IS 'Payment Method';


--
-- Name: COLUMN sale_payment_provider_onboarding_wizard.paypal_email_account; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_payment_provider_onboarding_wizard.paypal_email_account IS 'Email';


--
-- Name: COLUMN sale_payment_provider_onboarding_wizard.manual_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_payment_provider_onboarding_wizard.manual_name IS 'Method';


--
-- Name: COLUMN sale_payment_provider_onboarding_wizard.journal_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_payment_provider_onboarding_wizard.journal_name IS 'Bank Name';


--
-- Name: COLUMN sale_payment_provider_onboarding_wizard.acc_number; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_payment_provider_onboarding_wizard.acc_number IS 'Account Number';


--
-- Name: COLUMN sale_payment_provider_onboarding_wizard.manual_post_msg; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_payment_provider_onboarding_wizard.manual_post_msg IS 'Payment Instructions';


--
-- Name: COLUMN sale_payment_provider_onboarding_wizard.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_payment_provider_onboarding_wizard.create_date IS 'Created on';


--
-- Name: COLUMN sale_payment_provider_onboarding_wizard.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_payment_provider_onboarding_wizard.write_date IS 'Last Updated on';


--
-- Name: sale_payment_provider_onboarding_wizard_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_payment_provider_onboarding_wizard_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_payment_provider_onboarding_wizard_id_seq OWNED BY public.sale_payment_provider_onboarding_wizard.id;


--
-- Name: sale_pdf_form_field; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_pdf_form_field (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    document_type character varying NOT NULL,
    path character varying,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sale_pdf_form_field; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sale_pdf_form_field IS 'Form fields of inside quotation documents.';


--
-- Name: COLUMN sale_pdf_form_field.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_pdf_form_field.create_uid IS 'Created by';


--
-- Name: COLUMN sale_pdf_form_field.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_pdf_form_field.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.sale_pdf_form_field.name IS 'Form Field Name';


--
-- Name: COLUMN sale_pdf_form_field.document_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_pdf_form_field.document_type IS 'Document Type';


--
-- Name: COLUMN sale_pdf_form_field.path; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_pdf_form_field.path IS 'Path';


--
-- Name: COLUMN sale_pdf_form_field.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_pdf_form_field.create_date IS 'Created on';


--
-- Name: COLUMN sale_pdf_form_field.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sale_pdf_form_field.write_date IS 'Last Updated on';


--
-- Name: sale_pdf_form_field_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sale_pdf_form_field_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sale_pdf_form_field_id_seq OWNED BY public.sale_pdf_form_field.id;


--
-- Name: scheduled_message_attachment_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.scheduled_message_attachment_rel (
    scheduled_message_id integer NOT NULL,
    attachment_id integer NOT NULL
);


--
-- Name: TABLE scheduled_message_attachment_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.scheduled_message_attachment_rel IS 'RELATION BETWEEN mail_scheduled_message AND ir_attachment';


--
-- Name: sms_account_code; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sms_account_code (
    id integer NOT NULL,
    account_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    verification_code character varying NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sms_account_code; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sms_account_code IS 'SMS Account Verification Code Wizard';


--
-- Name: COLUMN sms_account_code.account_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_code.account_id IS 'Account';


--
-- Name: COLUMN sms_account_code.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_code.create_uid IS 'Created by';


--
-- Name: COLUMN sms_account_code.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_code.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sms_account_code.verification_code; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_code.verification_code IS 'Verification Code';


--
-- Name: COLUMN sms_account_code.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_code.create_date IS 'Created on';


--
-- Name: COLUMN sms_account_code.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_code.write_date IS 'Last Updated on';


--
-- Name: sms_account_code_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sms_account_code_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sms_account_code_id_seq OWNED BY public.sms_account_code.id;


--
-- Name: sms_account_phone; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sms_account_phone (
    id integer NOT NULL,
    account_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    phone_number character varying NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sms_account_phone; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sms_account_phone IS 'SMS Account Registration Phone Number Wizard';


--
-- Name: COLUMN sms_account_phone.account_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_phone.account_id IS 'Account';


--
-- Name: COLUMN sms_account_phone.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_phone.create_uid IS 'Created by';


--
-- Name: COLUMN sms_account_phone.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_phone.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sms_account_phone.phone_number; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_phone.phone_number IS 'Phone Number';


--
-- Name: COLUMN sms_account_phone.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_phone.create_date IS 'Created on';


--
-- Name: COLUMN sms_account_phone.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_phone.write_date IS 'Last Updated on';


--
-- Name: sms_account_phone_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sms_account_phone_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sms_account_phone_id_seq OWNED BY public.sms_account_phone.id;


--
-- Name: sms_account_sender; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sms_account_sender (
    id integer NOT NULL,
    account_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    sender_name character varying,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sms_account_sender; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sms_account_sender IS 'SMS Account Sender Name Wizard';


--
-- Name: COLUMN sms_account_sender.account_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_sender.account_id IS 'Account';


--
-- Name: COLUMN sms_account_sender.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_sender.create_uid IS 'Created by';


--
-- Name: COLUMN sms_account_sender.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_sender.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sms_account_sender.sender_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_sender.sender_name IS 'Sender Name';


--
-- Name: COLUMN sms_account_sender.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_sender.create_date IS 'Created on';


--
-- Name: COLUMN sms_account_sender.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_account_sender.write_date IS 'Last Updated on';


--
-- Name: sms_account_sender_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sms_account_sender_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sms_account_sender_id_seq OWNED BY public.sms_account_sender.id;


--
-- Name: sms_composer; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sms_composer (
    id integer NOT NULL,
    res_id integer,
    template_id integer,
    create_uid integer,
    write_uid integer,
    composition_mode character varying NOT NULL,
    res_model character varying,
    res_ids character varying,
    recipient_single_number_itf character varying,
    number_field_name character varying,
    numbers character varying,
    body text NOT NULL,
    mass_keep_log boolean,
    mass_force_send boolean,
    mass_use_blacklist boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sms_composer; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sms_composer IS 'Send SMS Wizard';


--
-- Name: COLUMN sms_composer.res_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.res_id IS 'Document ID';


--
-- Name: COLUMN sms_composer.template_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.template_id IS 'Use Template';


--
-- Name: COLUMN sms_composer.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.create_uid IS 'Created by';


--
-- Name: COLUMN sms_composer.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sms_composer.composition_mode; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.composition_mode IS 'Composition Mode';


--
-- Name: COLUMN sms_composer.res_model; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.res_model IS 'Document Model Name';


--
-- Name: COLUMN sms_composer.res_ids; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.res_ids IS 'Document IDs';


--
-- Name: COLUMN sms_composer.recipient_single_number_itf; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.recipient_single_number_itf IS 'Recipient Number';


--
-- Name: COLUMN sms_composer.number_field_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.number_field_name IS 'Number Field';


--
-- Name: COLUMN sms_composer.numbers; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.numbers IS 'Recipients (Numbers)';


--
-- Name: COLUMN sms_composer.body; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.body IS 'Message';


--
-- Name: COLUMN sms_composer.mass_keep_log; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.mass_keep_log IS 'Keep a note on document';


--
-- Name: COLUMN sms_composer.mass_force_send; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.mass_force_send IS 'Send directly';


--
-- Name: COLUMN sms_composer.mass_use_blacklist; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.mass_use_blacklist IS 'Use blacklist';


--
-- Name: COLUMN sms_composer.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.create_date IS 'Created on';


--
-- Name: COLUMN sms_composer.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_composer.write_date IS 'Last Updated on';


--
-- Name: sms_composer_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sms_composer_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sms_composer_id_seq OWNED BY public.sms_composer.id;


--
-- Name: sms_sms; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sms_sms (
    id integer NOT NULL,
    partner_id integer,
    mail_message_id integer,
    create_uid integer,
    write_uid integer,
    uuid character varying,
    number character varying,
    state character varying NOT NULL,
    failure_type character varying,
    body text,
    to_delete boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sms_sms; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sms_sms IS 'Outgoing SMS';


--
-- Name: COLUMN sms_sms.partner_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.partner_id IS 'Customer';


--
-- Name: COLUMN sms_sms.mail_message_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.mail_message_id IS 'Mail Message';


--
-- Name: COLUMN sms_sms.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.create_uid IS 'Created by';


--
-- Name: COLUMN sms_sms.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sms_sms.uuid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.uuid IS 'UUID';


--
-- Name: COLUMN sms_sms.number; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.number IS 'Number';


--
-- Name: COLUMN sms_sms.state; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.state IS 'SMS Status';


--
-- Name: COLUMN sms_sms.failure_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.failure_type IS 'Failure Type';


--
-- Name: COLUMN sms_sms.body; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.body IS 'Body';


--
-- Name: COLUMN sms_sms.to_delete; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.to_delete IS 'Marked for deletion';


--
-- Name: COLUMN sms_sms.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.create_date IS 'Created on';


--
-- Name: COLUMN sms_sms.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_sms.write_date IS 'Last Updated on';


--
-- Name: sms_sms_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sms_sms_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sms_sms_id_seq OWNED BY public.sms_sms.id;


--
-- Name: sms_template; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sms_template (
    id integer NOT NULL,
    model_id integer NOT NULL,
    sidebar_action_id integer,
    create_uid integer,
    write_uid integer,
    template_fs character varying,
    lang character varying,
    model character varying,
    name jsonb,
    body jsonb NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sms_template; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sms_template IS 'SMS Templates';


--
-- Name: COLUMN sms_template.model_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template.model_id IS 'Applies to';


--
-- Name: COLUMN sms_template.sidebar_action_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template.sidebar_action_id IS 'Sidebar action';


--
-- Name: COLUMN sms_template.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template.create_uid IS 'Created by';


--
-- Name: COLUMN sms_template.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sms_template.template_fs; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template.template_fs IS 'Template Filename';


--
-- Name: COLUMN sms_template.lang; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template.lang IS 'Language';


--
-- Name: COLUMN sms_template.model; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template.model IS 'Related Document Model';


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

COMMENT ON COLUMN public.sms_template.name IS 'Name';


--
-- Name: COLUMN sms_template.body; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template.body IS 'Body';


--
-- Name: COLUMN sms_template.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template.create_date IS 'Created on';


--
-- Name: COLUMN sms_template.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template.write_date IS 'Last Updated on';


--
-- Name: sms_template_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sms_template_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sms_template_id_seq OWNED BY public.sms_template.id;


--
-- Name: sms_template_preview; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sms_template_preview (
    id integer NOT NULL,
    sms_template_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    lang character varying,
    resource_ref character varying,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sms_template_preview; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sms_template_preview IS 'SMS Template Preview';


--
-- Name: COLUMN sms_template_preview.sms_template_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template_preview.sms_template_id IS 'Sms Template';


--
-- Name: COLUMN sms_template_preview.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template_preview.create_uid IS 'Created by';


--
-- Name: COLUMN sms_template_preview.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template_preview.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sms_template_preview.lang; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template_preview.lang IS 'Template Preview Language';


--
-- Name: COLUMN sms_template_preview.resource_ref; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template_preview.resource_ref IS 'Record reference';


--
-- Name: COLUMN sms_template_preview.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template_preview.create_date IS 'Created on';


--
-- Name: COLUMN sms_template_preview.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template_preview.write_date IS 'Last Updated on';


--
-- Name: sms_template_preview_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sms_template_preview_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sms_template_preview_id_seq OWNED BY public.sms_template_preview.id;


--
-- Name: sms_template_reset; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sms_template_reset (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sms_template_reset; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sms_template_reset IS 'SMS Template Reset';


--
-- Name: COLUMN sms_template_reset.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template_reset.create_uid IS 'Created by';


--
-- Name: COLUMN sms_template_reset.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template_reset.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sms_template_reset.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template_reset.create_date IS 'Created on';


--
-- Name: COLUMN sms_template_reset.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_template_reset.write_date IS 'Last Updated on';


--
-- Name: sms_template_reset_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sms_template_reset_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sms_template_reset_id_seq OWNED BY public.sms_template_reset.id;


--
-- Name: sms_template_sms_template_reset_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sms_template_sms_template_reset_rel (
    sms_template_reset_id integer NOT NULL,
    sms_template_id integer NOT NULL
);


--
-- Name: TABLE sms_template_sms_template_reset_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sms_template_sms_template_reset_rel IS 'RELATION BETWEEN sms_template_reset AND sms_template';


--
-- Name: sms_tracker; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sms_tracker (
    id integer NOT NULL,
    mail_notification_id integer,
    create_uid integer,
    write_uid integer,
    sms_uuid character varying NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE sms_tracker; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.sms_tracker IS 'Link SMS to mailing/sms tracking models';


--
-- Name: COLUMN sms_tracker.mail_notification_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_tracker.mail_notification_id IS 'Mail Notification';


--
-- Name: COLUMN sms_tracker.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_tracker.create_uid IS 'Created by';


--
-- Name: COLUMN sms_tracker.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_tracker.write_uid IS 'Last Updated by';


--
-- Name: COLUMN sms_tracker.sms_uuid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_tracker.sms_uuid IS 'SMS uuid';


--
-- Name: COLUMN sms_tracker.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_tracker.create_date IS 'Created on';


--
-- Name: COLUMN sms_tracker.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.sms_tracker.write_date IS 'Last Updated on';


--
-- Name: sms_tracker_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: sms_tracker_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.sms_tracker_id_seq OWNED BY public.sms_tracker.id;


--
-- Name: snailmail_letter; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.snailmail_letter (
    id integer NOT NULL,
    user_id integer,
    res_id integer NOT NULL,
    partner_id integer NOT NULL,
    company_id integer NOT NULL,
    report_template integer,
    attachment_id integer,
    message_id integer,
    state_id integer,
    country_id integer,
    create_uid integer,
    write_uid integer,
    model character varying NOT NULL,
    state character varying NOT NULL,
    error_code character varying,
    street character varying,
    street2 character varying,
    zip character varying,
    city character varying,
    info_msg text,
    color boolean,
    cover boolean,
    duplex boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE snailmail_letter; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.snailmail_letter IS 'Snailmail Letter';


--
-- Name: COLUMN snailmail_letter.user_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.user_id IS 'Sent by';


--
-- Name: COLUMN snailmail_letter.res_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.res_id IS 'Document ID';


--
-- Name: COLUMN snailmail_letter.partner_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.partner_id IS 'Recipient';


--
-- Name: COLUMN snailmail_letter.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.company_id IS 'Company';


--
-- Name: COLUMN snailmail_letter.report_template; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.report_template IS 'Optional report to print and attach';


--
-- Name: COLUMN snailmail_letter.attachment_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.attachment_id IS 'Attachment';


--
-- Name: COLUMN snailmail_letter.message_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.message_id IS 'Snailmail Status Message';


--
-- Name: COLUMN snailmail_letter.state_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.state_id IS 'State';


--
-- Name: COLUMN snailmail_letter.country_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.country_id IS 'Country';


--
-- Name: COLUMN snailmail_letter.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.create_uid IS 'Created by';


--
-- Name: COLUMN snailmail_letter.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.write_uid IS 'Last Updated by';


--
-- Name: COLUMN snailmail_letter.model; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.model IS 'Model';


--
-- Name: COLUMN snailmail_letter.state; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.state IS 'Status';


--
-- Name: COLUMN snailmail_letter.error_code; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.error_code IS 'Error';


--
-- Name: COLUMN snailmail_letter.street; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.street IS 'Street';


--
-- Name: COLUMN snailmail_letter.street2; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.street2 IS 'Street2';


--
-- Name: COLUMN snailmail_letter.zip; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.zip IS 'Zip';


--
-- Name: COLUMN snailmail_letter.city; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.city IS 'City';


--
-- Name: COLUMN snailmail_letter.info_msg; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.info_msg IS 'Information';


--
-- Name: COLUMN snailmail_letter.color; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.color IS 'Color';


--
-- Name: COLUMN snailmail_letter.cover; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.cover IS 'Cover Page';


--
-- Name: COLUMN snailmail_letter.duplex; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.duplex IS 'Both side';


--
-- Name: COLUMN snailmail_letter.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.create_date IS 'Created on';


--
-- Name: COLUMN snailmail_letter.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.snailmail_letter.write_date IS 'Last Updated on';


--
-- Name: snailmail_letter_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: snailmail_letter_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.snailmail_letter_id_seq OWNED BY public.snailmail_letter.id;


--
-- Name: spreadsheet_cell_thread; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.spreadsheet_cell_thread (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    dashboard_id integer,
    sale_order_spreadsheet_id integer
);


--
-- Name: TABLE spreadsheet_cell_thread; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.spreadsheet_cell_thread IS 'Spreadsheet discussion thread';


--
-- Name: COLUMN spreadsheet_cell_thread.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_cell_thread.create_uid IS 'Created by';


--
-- Name: COLUMN spreadsheet_cell_thread.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_cell_thread.write_uid IS 'Last Updated by';


--
-- Name: COLUMN spreadsheet_cell_thread.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_cell_thread.create_date IS 'Created on';


--
-- Name: COLUMN spreadsheet_cell_thread.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_cell_thread.write_date IS 'Last Updated on';


--
-- Name: COLUMN spreadsheet_cell_thread.dashboard_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_cell_thread.dashboard_id IS 'Dashboard';


--
-- Name: COLUMN spreadsheet_cell_thread.sale_order_spreadsheet_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_cell_thread.sale_order_spreadsheet_id IS 'Sale Order Spreadsheet';


--
-- Name: spreadsheet_cell_thread_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: spreadsheet_cell_thread_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.spreadsheet_cell_thread_id_seq OWNED BY public.spreadsheet_cell_thread.id;


--
-- Name: spreadsheet_dashboard; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.spreadsheet_dashboard (
    id integer NOT NULL,
    dashboard_group_id integer NOT NULL,
    sequence integer,
    company_id integer,
    create_uid integer,
    write_uid integer,
    sample_dashboard_file_path character varying,
    name jsonb NOT NULL,
    is_published boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE spreadsheet_dashboard; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.spreadsheet_dashboard IS 'Spreadsheet Dashboard';


--
-- Name: COLUMN spreadsheet_dashboard.dashboard_group_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard.dashboard_group_id IS 'Dashboard Group';


--
-- Name: COLUMN spreadsheet_dashboard.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard.sequence IS 'Sequence';


--
-- Name: COLUMN spreadsheet_dashboard.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard.company_id IS 'Company';


--
-- Name: COLUMN spreadsheet_dashboard.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard.create_uid IS 'Created by';


--
-- Name: COLUMN spreadsheet_dashboard.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard.write_uid IS 'Last Updated by';


--
-- Name: COLUMN spreadsheet_dashboard.sample_dashboard_file_path; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard.sample_dashboard_file_path IS 'Sample Dashboard File Path';


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

COMMENT ON COLUMN public.spreadsheet_dashboard.name IS 'Name';


--
-- Name: COLUMN spreadsheet_dashboard.is_published; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard.is_published IS 'Is Published';


--
-- Name: COLUMN spreadsheet_dashboard.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard.create_date IS 'Created on';


--
-- Name: COLUMN spreadsheet_dashboard.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard.write_date IS 'Last Updated on';


--
-- Name: spreadsheet_dashboard_group; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.spreadsheet_dashboard_group (
    id integer NOT NULL,
    sequence integer,
    create_uid integer,
    write_uid integer,
    name jsonb NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE spreadsheet_dashboard_group; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.spreadsheet_dashboard_group IS 'Group of dashboards';


--
-- Name: COLUMN spreadsheet_dashboard_group.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard_group.sequence IS 'Sequence';


--
-- Name: COLUMN spreadsheet_dashboard_group.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard_group.create_uid IS 'Created by';


--
-- Name: COLUMN spreadsheet_dashboard_group.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard_group.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.spreadsheet_dashboard_group.name IS 'Name';


--
-- Name: COLUMN spreadsheet_dashboard_group.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard_group.create_date IS 'Created on';


--
-- Name: COLUMN spreadsheet_dashboard_group.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard_group.write_date IS 'Last Updated on';


--
-- Name: spreadsheet_dashboard_group_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: spreadsheet_dashboard_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.spreadsheet_dashboard_group_id_seq OWNED BY public.spreadsheet_dashboard_group.id;


--
-- Name: spreadsheet_dashboard_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: spreadsheet_dashboard_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.spreadsheet_dashboard_id_seq OWNED BY public.spreadsheet_dashboard.id;


--
-- Name: spreadsheet_dashboard_share; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.spreadsheet_dashboard_share (
    id integer NOT NULL,
    dashboard_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    access_token character varying NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE spreadsheet_dashboard_share; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.spreadsheet_dashboard_share IS 'Copy of a shared dashboard';


--
-- Name: COLUMN spreadsheet_dashboard_share.dashboard_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard_share.dashboard_id IS 'Dashboard';


--
-- Name: COLUMN spreadsheet_dashboard_share.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard_share.create_uid IS 'Created by';


--
-- Name: COLUMN spreadsheet_dashboard_share.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard_share.write_uid IS 'Last Updated by';


--
-- Name: COLUMN spreadsheet_dashboard_share.access_token; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard_share.access_token IS 'Access Token';


--
-- Name: COLUMN spreadsheet_dashboard_share.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard_share.create_date IS 'Created on';


--
-- Name: COLUMN spreadsheet_dashboard_share.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_dashboard_share.write_date IS 'Last Updated on';


--
-- Name: spreadsheet_dashboard_share_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: spreadsheet_dashboard_share_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.spreadsheet_dashboard_share_id_seq OWNED BY public.spreadsheet_dashboard_share.id;


--
-- Name: spreadsheet_revision; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.spreadsheet_revision (
    id integer NOT NULL,
    res_id integer NOT NULL,
    parent_revision_id integer,
    author_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name character varying,
    res_model character varying NOT NULL,
    commands character varying NOT NULL,
    revision_uuid character varying NOT NULL,
    active boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE spreadsheet_revision; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.spreadsheet_revision IS 'Collaborative spreadsheet revision';


--
-- Name: COLUMN spreadsheet_revision.res_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_revision.res_id IS 'Record id';


--
-- Name: COLUMN spreadsheet_revision.parent_revision_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_revision.parent_revision_id IS 'Parent Revision';


--
-- Name: COLUMN spreadsheet_revision.author_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_revision.author_id IS 'Author';


--
-- Name: COLUMN spreadsheet_revision.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_revision.create_uid IS 'Created by';


--
-- Name: COLUMN spreadsheet_revision.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_revision.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.spreadsheet_revision.name IS 'Revision name';


--
-- Name: COLUMN spreadsheet_revision.res_model; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_revision.res_model IS 'Model';


--
-- Name: COLUMN spreadsheet_revision.commands; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_revision.commands IS 'Commands';


--
-- Name: COLUMN spreadsheet_revision.revision_uuid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_revision.revision_uuid IS 'Revision Uuid';


--
-- Name: COLUMN spreadsheet_revision.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_revision.active IS 'Active';


--
-- Name: COLUMN spreadsheet_revision.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_revision.create_date IS 'Created on';


--
-- Name: COLUMN spreadsheet_revision.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.spreadsheet_revision.write_date IS 'Last Updated on';


--
-- Name: spreadsheet_revision_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: spreadsheet_revision_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.spreadsheet_revision_id_seq OWNED BY public.spreadsheet_revision.id;


--
-- Name: team_favorite_user_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.team_favorite_user_rel (
    team_id integer NOT NULL,
    user_id integer NOT NULL
);


--
-- Name: TABLE team_favorite_user_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.team_favorite_user_rel IS 'RELATION BETWEEN crm_team AND res_users';


--
-- Name: theme_ir_asset; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.theme_ir_asset (
    id integer NOT NULL,
    sequence integer NOT NULL,
    create_uid integer,
    write_uid integer,
    key character varying,
    name character varying NOT NULL,
    bundle character varying NOT NULL,
    directive character varying,
    path character varying NOT NULL,
    target character varying,
    active boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE theme_ir_asset; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.theme_ir_asset IS 'Theme Asset';


--
-- Name: COLUMN theme_ir_asset.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_asset.sequence IS 'Sequence';


--
-- Name: COLUMN theme_ir_asset.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_asset.create_uid IS 'Created by';


--
-- Name: COLUMN theme_ir_asset.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_asset.write_uid IS 'Last Updated by';


--
-- Name: COLUMN theme_ir_asset.key; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_asset.key IS 'Key';


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

COMMENT ON COLUMN public.theme_ir_asset.name IS 'Name';


--
-- Name: COLUMN theme_ir_asset.bundle; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_asset.bundle IS 'Bundle';


--
-- Name: COLUMN theme_ir_asset.directive; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_asset.directive IS 'Directive';


--
-- Name: COLUMN theme_ir_asset.path; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_asset.path IS 'Path';


--
-- Name: COLUMN theme_ir_asset.target; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_asset.target IS 'Target';


--
-- Name: COLUMN theme_ir_asset.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_asset.active IS 'Active';


--
-- Name: COLUMN theme_ir_asset.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_asset.create_date IS 'Created on';


--
-- Name: COLUMN theme_ir_asset.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_asset.write_date IS 'Last Updated on';


--
-- Name: theme_ir_asset_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: theme_ir_asset_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.theme_ir_asset_id_seq OWNED BY public.theme_ir_asset.id;


--
-- Name: theme_ir_attachment; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.theme_ir_attachment (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    key character varying NOT NULL,
    url character varying,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE theme_ir_attachment; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.theme_ir_attachment IS 'Theme Attachments';


--
-- Name: COLUMN theme_ir_attachment.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_attachment.create_uid IS 'Created by';


--
-- Name: COLUMN theme_ir_attachment.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_attachment.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.theme_ir_attachment.name IS 'Name';


--
-- Name: COLUMN theme_ir_attachment.key; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_attachment.key IS 'Key';


--
-- Name: COLUMN theme_ir_attachment.url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_attachment.url IS 'Url';


--
-- Name: COLUMN theme_ir_attachment.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_attachment.create_date IS 'Created on';


--
-- Name: COLUMN theme_ir_attachment.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_attachment.write_date IS 'Last Updated on';


--
-- Name: theme_ir_attachment_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: theme_ir_attachment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.theme_ir_attachment_id_seq OWNED BY public.theme_ir_attachment.id;


--
-- Name: theme_ir_ui_view; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.theme_ir_ui_view (
    id integer NOT NULL,
    priority integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    key character varying,
    type character varying,
    mode character varying,
    arch_fs character varying,
    inherit_id character varying,
    arch jsonb,
    active boolean,
    customize_show boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE theme_ir_ui_view; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.theme_ir_ui_view IS 'Theme UI View';


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

COMMENT ON COLUMN public.theme_ir_ui_view.priority IS 'Priority';


--
-- Name: COLUMN theme_ir_ui_view.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.create_uid IS 'Created by';


--
-- Name: COLUMN theme_ir_ui_view.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.theme_ir_ui_view.name IS 'Name';


--
-- Name: COLUMN theme_ir_ui_view.key; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.key IS 'Key';


--
-- Name: COLUMN theme_ir_ui_view.type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.type IS 'Type';


--
-- Name: COLUMN theme_ir_ui_view.mode; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.mode IS 'Mode';


--
-- Name: COLUMN theme_ir_ui_view.arch_fs; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.arch_fs IS 'Arch Fs';


--
-- Name: COLUMN theme_ir_ui_view.inherit_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.inherit_id IS 'Inherit';


--
-- Name: COLUMN theme_ir_ui_view.arch; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.arch IS 'Arch';


--
-- Name: COLUMN theme_ir_ui_view.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.active IS 'Active';


--
-- Name: COLUMN theme_ir_ui_view.customize_show; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.customize_show IS 'Customize Show';


--
-- Name: COLUMN theme_ir_ui_view.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.create_date IS 'Created on';


--
-- Name: COLUMN theme_ir_ui_view.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_ir_ui_view.write_date IS 'Last Updated on';


--
-- Name: theme_ir_ui_view_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: theme_ir_ui_view_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.theme_ir_ui_view_id_seq OWNED BY public.theme_ir_ui_view.id;


--
-- Name: theme_website_menu; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.theme_website_menu (
    id integer NOT NULL,
    page_id integer,
    sequence integer,
    parent_id integer,
    create_uid integer,
    write_uid integer,
    url character varying,
    mega_menu_classes character varying,
    name jsonb NOT NULL,
    mega_menu_content text,
    new_window boolean,
    use_main_menu_as_parent boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE theme_website_menu; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.theme_website_menu IS 'Website Theme Menu';


--
-- Name: COLUMN theme_website_menu.page_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.page_id IS 'Page';


--
-- Name: COLUMN theme_website_menu.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.sequence IS 'Sequence';


--
-- Name: COLUMN theme_website_menu.parent_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.parent_id IS 'Parent';


--
-- Name: COLUMN theme_website_menu.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.create_uid IS 'Created by';


--
-- Name: COLUMN theme_website_menu.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.write_uid IS 'Last Updated by';


--
-- Name: COLUMN theme_website_menu.url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.url IS 'Url';


--
-- Name: COLUMN theme_website_menu.mega_menu_classes; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.mega_menu_classes IS 'Mega Menu Classes';


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

COMMENT ON COLUMN public.theme_website_menu.name IS 'Name';


--
-- Name: COLUMN theme_website_menu.mega_menu_content; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.mega_menu_content IS 'Mega Menu Content';


--
-- Name: COLUMN theme_website_menu.new_window; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.new_window IS 'New Window';


--
-- Name: COLUMN theme_website_menu.use_main_menu_as_parent; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.use_main_menu_as_parent IS 'Use Main Menu As Parent';


--
-- Name: COLUMN theme_website_menu.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.create_date IS 'Created on';


--
-- Name: COLUMN theme_website_menu.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_menu.write_date IS 'Last Updated on';


--
-- Name: theme_website_menu_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: theme_website_menu_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.theme_website_menu_id_seq OWNED BY public.theme_website_menu.id;


--
-- Name: theme_website_page; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.theme_website_page (
    id integer NOT NULL,
    view_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    header_color character varying,
    header_text_color character varying,
    url character varying,
    header_visible boolean,
    footer_visible boolean,
    header_overlay boolean,
    website_indexed boolean,
    is_published boolean,
    is_new_page_template boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE theme_website_page; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.theme_website_page IS 'Website Theme Page';


--
-- Name: COLUMN theme_website_page.view_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.view_id IS 'View';


--
-- Name: COLUMN theme_website_page.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.create_uid IS 'Created by';


--
-- Name: COLUMN theme_website_page.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.write_uid IS 'Last Updated by';


--
-- Name: COLUMN theme_website_page.header_color; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.header_color IS 'Header Color';


--
-- Name: COLUMN theme_website_page.header_text_color; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.header_text_color IS 'Header Text Color';


--
-- Name: COLUMN theme_website_page.url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.url IS 'Url';


--
-- Name: COLUMN theme_website_page.header_visible; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.header_visible IS 'Header Visible';


--
-- Name: COLUMN theme_website_page.footer_visible; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.footer_visible IS 'Footer Visible';


--
-- Name: COLUMN theme_website_page.header_overlay; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.header_overlay IS 'Header Overlay';


--
-- Name: COLUMN theme_website_page.website_indexed; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.website_indexed IS 'Page Indexed';


--
-- Name: COLUMN theme_website_page.is_published; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.is_published IS 'Is Published';


--
-- Name: COLUMN theme_website_page.is_new_page_template; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.is_new_page_template IS 'New Page Template';


--
-- Name: COLUMN theme_website_page.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.create_date IS 'Created on';


--
-- Name: COLUMN theme_website_page.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.theme_website_page.write_date IS 'Last Updated on';


--
-- Name: theme_website_page_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: theme_website_page_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.theme_website_page_id_seq OWNED BY public.theme_website_page.id;


--
-- Name: uom_uom; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.uom_uom (
    id integer NOT NULL,
    relative_uom_id integer,
    create_uid integer,
    write_uid integer,
    parent_path character varying,
    name jsonb NOT NULL,
    relative_factor numeric NOT NULL,
    factor numeric,
    active boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    CONSTRAINT uom_uom_factor_gt_zero CHECK ((relative_factor <> (0)::numeric))
);


--
-- Name: TABLE uom_uom; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.uom_uom IS 'Product Unit of Measure';


--
-- Name: COLUMN uom_uom.relative_uom_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.uom_uom.relative_uom_id IS 'Reference Unit';


--
-- Name: COLUMN uom_uom.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.uom_uom.create_uid IS 'Created by';


--
-- Name: COLUMN uom_uom.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.uom_uom.write_uid IS 'Last Updated by';


--
-- Name: COLUMN uom_uom.parent_path; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.uom_uom.parent_path IS 'Parent Path';


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

COMMENT ON COLUMN public.uom_uom.name IS 'Unit Name';


--
-- Name: COLUMN uom_uom.relative_factor; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.uom_uom.relative_factor IS 'Contains';


--
-- Name: COLUMN uom_uom.factor; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.uom_uom.factor IS 'Absolute Quantity';


--
-- Name: COLUMN uom_uom.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.uom_uom.active IS 'Active';


--
-- Name: COLUMN uom_uom.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.uom_uom.create_date IS 'Created on';


--
-- Name: COLUMN uom_uom.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.uom_uom.write_date IS 'Last Updated on';


--
-- Name: CONSTRAINT uom_uom_factor_gt_zero ON uom_uom; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON CONSTRAINT uom_uom_factor_gt_zero ON public.uom_uom IS 'CHECK (relative_factor!=0)';


--
-- Name: uom_uom_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: uom_uom_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.uom_uom_id_seq OWNED BY public.uom_uom.id;


--
-- Name: update_product_attribute_value; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.update_product_attribute_value (
    id integer NOT NULL,
    attribute_value_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    mode character varying,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE update_product_attribute_value; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.update_product_attribute_value IS 'Update product attribute value';


--
-- Name: COLUMN update_product_attribute_value.attribute_value_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.update_product_attribute_value.attribute_value_id IS 'Attribute Value';


--
-- Name: COLUMN update_product_attribute_value.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.update_product_attribute_value.create_uid IS 'Created by';


--
-- Name: COLUMN update_product_attribute_value.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.update_product_attribute_value.write_uid IS 'Last Updated by';


--
-- Name: COLUMN update_product_attribute_value.mode; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.update_product_attribute_value.mode IS 'Mode';


--
-- Name: COLUMN update_product_attribute_value.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.update_product_attribute_value.create_date IS 'Created on';


--
-- Name: COLUMN update_product_attribute_value.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.update_product_attribute_value.write_date IS 'Last Updated on';


--
-- Name: update_product_attribute_value_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: update_product_attribute_value_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.update_product_attribute_value_id_seq OWNED BY public.update_product_attribute_value.id;


--
-- Name: utm_campaign; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.utm_campaign (
    id integer NOT NULL,
    user_id integer NOT NULL,
    stage_id integer NOT NULL,
    color integer,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    title jsonb NOT NULL,
    active boolean,
    is_auto_campaign boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    company_id integer
);


--
-- Name: TABLE utm_campaign; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.utm_campaign IS 'UTM Campaign';


--
-- Name: COLUMN utm_campaign.user_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_campaign.user_id IS 'Responsible';


--
-- Name: COLUMN utm_campaign.stage_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_campaign.stage_id IS 'Stage';


--
-- Name: COLUMN utm_campaign.color; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_campaign.color IS 'Color Index';


--
-- Name: COLUMN utm_campaign.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_campaign.create_uid IS 'Created by';


--
-- Name: COLUMN utm_campaign.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_campaign.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.utm_campaign.name IS 'Campaign Identifier';


--
-- Name: COLUMN utm_campaign.title; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_campaign.title IS 'Campaign Name';


--
-- Name: COLUMN utm_campaign.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_campaign.active IS 'Active';


--
-- Name: COLUMN utm_campaign.is_auto_campaign; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_campaign.is_auto_campaign IS 'Automatically Generated Campaign';


--
-- Name: COLUMN utm_campaign.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_campaign.create_date IS 'Created on';


--
-- Name: COLUMN utm_campaign.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_campaign.write_date IS 'Last Updated on';


--
-- Name: COLUMN utm_campaign.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_campaign.company_id IS 'Company';


--
-- Name: utm_campaign_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: utm_campaign_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.utm_campaign_id_seq OWNED BY public.utm_campaign.id;


--
-- Name: utm_medium; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.utm_medium (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    active boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE utm_medium; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.utm_medium IS 'UTM Medium';


--
-- Name: COLUMN utm_medium.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_medium.create_uid IS 'Created by';


--
-- Name: COLUMN utm_medium.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_medium.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.utm_medium.name IS 'Medium Name';


--
-- Name: COLUMN utm_medium.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_medium.active IS 'Active';


--
-- Name: COLUMN utm_medium.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_medium.create_date IS 'Created on';


--
-- Name: COLUMN utm_medium.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_medium.write_date IS 'Last Updated on';


--
-- Name: utm_medium_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: utm_medium_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.utm_medium_id_seq OWNED BY public.utm_medium.id;


--
-- Name: utm_source; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.utm_source (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE utm_source; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.utm_source IS 'UTM Source';


--
-- Name: COLUMN utm_source.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_source.create_uid IS 'Created by';


--
-- Name: COLUMN utm_source.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_source.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.utm_source.name IS 'Source Name';


--
-- Name: COLUMN utm_source.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_source.create_date IS 'Created on';


--
-- Name: COLUMN utm_source.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_source.write_date IS 'Last Updated on';


--
-- Name: utm_source_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: utm_source_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.utm_source_id_seq OWNED BY public.utm_source.id;


--
-- Name: utm_stage; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.utm_stage (
    id integer NOT NULL,
    sequence integer,
    create_uid integer,
    write_uid integer,
    name jsonb NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE utm_stage; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.utm_stage IS 'Campaign Stage';


--
-- Name: COLUMN utm_stage.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_stage.sequence IS 'Sequence';


--
-- Name: COLUMN utm_stage.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_stage.create_uid IS 'Created by';


--
-- Name: COLUMN utm_stage.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_stage.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.utm_stage.name IS 'Name';


--
-- Name: COLUMN utm_stage.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_stage.create_date IS 'Created on';


--
-- Name: COLUMN utm_stage.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_stage.write_date IS 'Last Updated on';


--
-- Name: utm_stage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: utm_stage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.utm_stage_id_seq OWNED BY public.utm_stage.id;


--
-- Name: utm_tag; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.utm_tag (
    id integer NOT NULL,
    color integer,
    create_uid integer,
    write_uid integer,
    name jsonb NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE utm_tag; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.utm_tag IS 'UTM Tag';


--
-- Name: COLUMN utm_tag.color; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_tag.color IS 'Color Index';


--
-- Name: COLUMN utm_tag.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_tag.create_uid IS 'Created by';


--
-- Name: COLUMN utm_tag.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_tag.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.utm_tag.name IS 'Name';


--
-- Name: COLUMN utm_tag.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_tag.create_date IS 'Created on';


--
-- Name: COLUMN utm_tag.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.utm_tag.write_date IS 'Last Updated on';


--
-- Name: utm_tag_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: utm_tag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.utm_tag_id_seq OWNED BY public.utm_tag.id;


--
-- Name: utm_tag_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.utm_tag_rel (
    tag_id integer NOT NULL,
    campaign_id integer NOT NULL
);


--
-- Name: TABLE utm_tag_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.utm_tag_rel IS 'RELATION BETWEEN utm_campaign AND utm_tag';


--
-- Name: validate_account_move; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.validate_account_move (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    force_post boolean,
    ignore_abnormal_date boolean,
    ignore_abnormal_amount boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE validate_account_move; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.validate_account_move IS 'Validate Account Move';


--
-- Name: COLUMN validate_account_move.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.validate_account_move.create_uid IS 'Created by';


--
-- Name: COLUMN validate_account_move.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.validate_account_move.write_uid IS 'Last Updated by';


--
-- Name: COLUMN validate_account_move.force_post; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.validate_account_move.force_post IS 'Force';


--
-- Name: COLUMN validate_account_move.ignore_abnormal_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.validate_account_move.ignore_abnormal_date IS 'Ignore Abnormal Date';


--
-- Name: COLUMN validate_account_move.ignore_abnormal_amount; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.validate_account_move.ignore_abnormal_amount IS 'Ignore Abnormal Amount';


--
-- Name: COLUMN validate_account_move.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.validate_account_move.create_date IS 'Created on';


--
-- Name: COLUMN validate_account_move.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.validate_account_move.write_date IS 'Last Updated on';


--
-- Name: validate_account_move_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: validate_account_move_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.validate_account_move_id_seq OWNED BY public.validate_account_move.id;


--
-- Name: web_editor_converter_test; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.web_editor_converter_test (
    id integer NOT NULL,
    "integer" integer,
    many2one integer,
    create_uid integer,
    write_uid integer,
    "char" character varying,
    selection_str character varying,
    date date,
    html text,
    text text,
    "numeric" numeric,
    datetime timestamp without time zone,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    "float" double precision,
    "binary" bytea
);


--
-- Name: TABLE web_editor_converter_test; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.web_editor_converter_test IS 'Web Editor Converter Test';


--
-- Name: COLUMN web_editor_converter_test."integer"; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test."integer" IS 'Integer';


--
-- Name: COLUMN web_editor_converter_test.many2one; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test.many2one IS 'Many2One';


--
-- Name: COLUMN web_editor_converter_test.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test.create_uid IS 'Created by';


--
-- Name: COLUMN web_editor_converter_test.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test.write_uid IS 'Last Updated by';


--
-- Name: COLUMN web_editor_converter_test."char"; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test."char" IS 'Char';


--
-- Name: COLUMN web_editor_converter_test.selection_str; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test.selection_str IS 'Lorsqu''un pancake prend l''avion à destination de Toronto et qu''il fait une escale technique à St Claude, on dit:';


--
-- Name: COLUMN web_editor_converter_test.date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test.date IS 'Date';


--
-- Name: COLUMN web_editor_converter_test.html; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test.html IS 'Html';


--
-- Name: COLUMN web_editor_converter_test.text; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test.text IS 'Text';


--
-- Name: COLUMN web_editor_converter_test."numeric"; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test."numeric" IS 'Numeric';


--
-- Name: COLUMN web_editor_converter_test.datetime; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test.datetime IS 'Datetime';


--
-- Name: COLUMN web_editor_converter_test.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test.create_date IS 'Created on';


--
-- Name: COLUMN web_editor_converter_test.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test.write_date IS 'Last Updated on';


--
-- Name: COLUMN web_editor_converter_test."float"; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test."float" IS 'Float';


--
-- Name: COLUMN web_editor_converter_test."binary"; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test."binary" IS 'Binary';


--
-- Name: web_editor_converter_test_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: web_editor_converter_test_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.web_editor_converter_test_id_seq OWNED BY public.web_editor_converter_test.id;


--
-- Name: web_editor_converter_test_sub; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.web_editor_converter_test_sub (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name character varying,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE web_editor_converter_test_sub; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.web_editor_converter_test_sub IS 'Web Editor Converter Subtest';


--
-- Name: COLUMN web_editor_converter_test_sub.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test_sub.create_uid IS 'Created by';


--
-- Name: COLUMN web_editor_converter_test_sub.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test_sub.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.web_editor_converter_test_sub.name IS 'Name';


--
-- Name: COLUMN web_editor_converter_test_sub.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test_sub.create_date IS 'Created on';


--
-- Name: COLUMN web_editor_converter_test_sub.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_editor_converter_test_sub.write_date IS 'Last Updated on';


--
-- Name: web_editor_converter_test_sub_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: web_editor_converter_test_sub_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.web_editor_converter_test_sub_id_seq OWNED BY public.web_editor_converter_test_sub.id;


--
-- Name: web_tour_tour; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.web_tour_tour (
    id integer NOT NULL,
    sequence integer,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    url character varying,
    rainbow_man_message jsonb,
    custom boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE web_tour_tour; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.web_tour_tour IS 'Tours';


--
-- Name: COLUMN web_tour_tour.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour.sequence IS 'Sequence';


--
-- Name: COLUMN web_tour_tour.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour.create_uid IS 'Created by';


--
-- Name: COLUMN web_tour_tour.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.web_tour_tour.name IS 'Name';


--
-- Name: COLUMN web_tour_tour.url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour.url IS 'Starting URL';


--
-- Name: COLUMN web_tour_tour.rainbow_man_message; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour.rainbow_man_message IS 'Rainbow Man Message';


--
-- Name: COLUMN web_tour_tour.custom; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour.custom IS 'Custom';


--
-- Name: COLUMN web_tour_tour.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour.create_date IS 'Created on';


--
-- Name: COLUMN web_tour_tour.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour.write_date IS 'Last Updated on';


--
-- Name: web_tour_tour_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: web_tour_tour_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.web_tour_tour_id_seq OWNED BY public.web_tour_tour.id;


--
-- Name: web_tour_tour_step; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.web_tour_tour_step (
    id integer NOT NULL,
    tour_id integer NOT NULL,
    sequence integer,
    create_uid integer,
    write_uid integer,
    trigger character varying NOT NULL,
    content character varying,
    tooltip_position character varying,
    run character varying,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE web_tour_tour_step; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.web_tour_tour_step IS 'Tour''s step';


--
-- Name: COLUMN web_tour_tour_step.tour_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour_step.tour_id IS 'Tour';


--
-- Name: COLUMN web_tour_tour_step.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour_step.sequence IS 'Sequence';


--
-- Name: COLUMN web_tour_tour_step.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour_step.create_uid IS 'Created by';


--
-- Name: COLUMN web_tour_tour_step.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour_step.write_uid IS 'Last Updated by';


--
-- Name: COLUMN web_tour_tour_step.trigger; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour_step.trigger IS 'Trigger';


--
-- Name: COLUMN web_tour_tour_step.content; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour_step.content IS 'Content';


--
-- Name: COLUMN web_tour_tour_step.tooltip_position; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour_step.tooltip_position IS 'Tooltip Position';


--
-- Name: COLUMN web_tour_tour_step.run; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour_step.run IS 'Run';


--
-- Name: COLUMN web_tour_tour_step.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour_step.create_date IS 'Created on';


--
-- Name: COLUMN web_tour_tour_step.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.web_tour_tour_step.write_date IS 'Last Updated on';


--
-- Name: web_tour_tour_step_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: web_tour_tour_step_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.web_tour_tour_step_id_seq OWNED BY public.web_tour_tour_step.id;


--
-- Name: website; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website (
    id integer NOT NULL,
    sequence integer,
    company_id integer NOT NULL,
    default_lang_id integer NOT NULL,
    user_id integer NOT NULL,
    theme_id integer,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    domain character varying,
    social_twitter character varying,
    social_facebook character varying,
    social_github character varying,
    social_linkedin character varying,
    social_youtube character varying,
    social_instagram character varying,
    social_tiktok character varying,
    social_discord character varying,
    google_analytics_key character varying,
    google_search_console character varying,
    google_maps_api_key character varying,
    plausible_shared_key character varying,
    plausible_site character varying,
    cdn_url character varying,
    homepage_url character varying,
    auth_signup_uninvited character varying,
    custom_blocked_third_party_domains text,
    cdn_filters text,
    custom_code_head text,
    custom_code_footer text,
    robots_txt text,
    auto_redirect_lang boolean,
    cookies_bar boolean,
    configurator_done boolean,
    block_third_party_domains boolean,
    has_social_default_image boolean,
    cdn_activated boolean,
    specific_user_account boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone,
    salesperson_id integer,
    salesteam_id integer,
    cart_recovery_mail_template_id integer,
    shop_ppg integer,
    shop_ppr integer,
    product_page_grid_columns integer,
    show_line_subtotals_tax_selection character varying,
    add_to_cart_action character varying,
    account_on_checkout character varying,
    shop_gap character varying,
    shop_default_sort character varying NOT NULL,
    product_page_image_layout character varying NOT NULL,
    product_page_image_width character varying NOT NULL,
    product_page_image_spacing character varying NOT NULL,
    ecommerce_access character varying NOT NULL,
    contact_us_button_url jsonb,
    enabled_portal_reorder_button boolean,
    send_abandoned_cart_email boolean,
    prevent_zero_price_sale boolean,
    enabled_gmc_src boolean,
    send_abandoned_cart_email_activation_time timestamp without time zone,
    cart_abandoned_delay double precision,
    CONSTRAINT website_check_gmc_ecommerce_access CHECK (((NOT enabled_gmc_src) OR ((ecommerce_access)::text = 'everyone'::text)))
);


--
-- Name: TABLE website; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website IS 'Website';


--
-- Name: COLUMN website.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.sequence IS 'Sequence';


--
-- Name: COLUMN website.company_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.company_id IS 'Company';


--
-- Name: COLUMN website.default_lang_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.default_lang_id IS 'Default Language';


--
-- Name: COLUMN website.user_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.user_id IS 'Public User';


--
-- Name: COLUMN website.theme_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.theme_id IS 'Theme';


--
-- Name: COLUMN website.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.create_uid IS 'Created by';


--
-- Name: COLUMN website.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.website.name IS 'Website Name';


--
-- Name: COLUMN website.domain; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.domain IS 'Website Domain';


--
-- Name: COLUMN website.social_twitter; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.social_twitter IS 'X Account';


--
-- Name: COLUMN website.social_facebook; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.social_facebook IS 'Facebook Account';


--
-- Name: COLUMN website.social_github; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.social_github IS 'GitHub Account';


--
-- Name: COLUMN website.social_linkedin; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.social_linkedin IS 'LinkedIn Account';


--
-- Name: COLUMN website.social_youtube; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.social_youtube IS 'Youtube Account';


--
-- Name: COLUMN website.social_instagram; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.social_instagram IS 'Instagram Account';


--
-- Name: COLUMN website.social_tiktok; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.social_tiktok IS 'TikTok Account';


--
-- Name: COLUMN website.social_discord; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.social_discord IS 'Discord Account';


--
-- Name: COLUMN website.google_analytics_key; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.google_analytics_key IS 'Google Analytics Key';


--
-- Name: COLUMN website.google_search_console; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.google_search_console IS 'Google Search Console';


--
-- Name: COLUMN website.google_maps_api_key; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.google_maps_api_key IS 'Google Maps API Key';


--
-- Name: COLUMN website.plausible_shared_key; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.plausible_shared_key IS 'Plausible Shared Key';


--
-- Name: COLUMN website.plausible_site; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.plausible_site IS 'Plausible Site';


--
-- Name: COLUMN website.cdn_url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.cdn_url IS 'CDN Base URL';


--
-- Name: COLUMN website.homepage_url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.homepage_url IS 'Homepage Url';


--
-- Name: COLUMN website.auth_signup_uninvited; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.auth_signup_uninvited IS 'Customer Account';


--
-- Name: COLUMN website.custom_blocked_third_party_domains; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.custom_blocked_third_party_domains IS 'User list of blocked 3rd-party domains';


--
-- Name: COLUMN website.cdn_filters; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.cdn_filters IS 'CDN Filters';


--
-- Name: COLUMN website.custom_code_head; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.custom_code_head IS 'Custom <head> code';


--
-- Name: COLUMN website.custom_code_footer; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.custom_code_footer IS 'Custom end of <body> code';


--
-- Name: COLUMN website.robots_txt; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.robots_txt IS 'Robots.txt';


--
-- Name: COLUMN website.auto_redirect_lang; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.auto_redirect_lang IS 'Autoredirect Language';


--
-- Name: COLUMN website.cookies_bar; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.cookies_bar IS 'Cookies Bar';


--
-- Name: COLUMN website.configurator_done; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.configurator_done IS 'Configurator Done';


--
-- Name: COLUMN website.block_third_party_domains; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.block_third_party_domains IS 'Block 3rd-party domains';


--
-- Name: COLUMN website.has_social_default_image; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.has_social_default_image IS 'Has Social Default Image';


--
-- Name: COLUMN website.cdn_activated; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.cdn_activated IS 'Content Delivery Network (CDN)';


--
-- Name: COLUMN website.specific_user_account; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.specific_user_account IS 'Specific User Account';


--
-- Name: COLUMN website.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.create_date IS 'Created on';


--
-- Name: COLUMN website.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.write_date IS 'Last Updated on';


--
-- Name: COLUMN website.salesperson_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.salesperson_id IS 'Salesperson';


--
-- Name: COLUMN website.salesteam_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.salesteam_id IS 'Sales Team';


--
-- Name: COLUMN website.cart_recovery_mail_template_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.cart_recovery_mail_template_id IS 'Cart Recovery Email';


--
-- Name: COLUMN website.shop_ppg; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.shop_ppg IS 'Number of products in the grid on the shop';


--
-- Name: COLUMN website.shop_ppr; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.shop_ppr IS 'Number of grid columns on the shop';


--
-- Name: COLUMN website.product_page_grid_columns; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.product_page_grid_columns IS 'Product Page Grid Columns';


--
-- Name: COLUMN website.show_line_subtotals_tax_selection; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.show_line_subtotals_tax_selection IS 'Line Subtotals Tax Display';


--
-- Name: COLUMN website.add_to_cart_action; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.add_to_cart_action IS 'Add To Cart Action';


--
-- Name: COLUMN website.account_on_checkout; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.account_on_checkout IS 'Customer Accounts';


--
-- Name: COLUMN website.shop_gap; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.shop_gap IS 'Grid-gap on the shop';


--
-- Name: COLUMN website.shop_default_sort; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.shop_default_sort IS 'Shop Default Sort';


--
-- Name: COLUMN website.product_page_image_layout; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.product_page_image_layout IS 'Product Page Image Layout';


--
-- Name: COLUMN website.product_page_image_width; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.product_page_image_width IS 'Product Page Image Width';


--
-- Name: COLUMN website.product_page_image_spacing; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.product_page_image_spacing IS 'Product Page Image Spacing';


--
-- Name: COLUMN website.ecommerce_access; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.ecommerce_access IS 'Ecommerce Access';


--
-- Name: COLUMN website.contact_us_button_url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.contact_us_button_url IS 'Contact Us Button URL';


--
-- Name: COLUMN website.enabled_portal_reorder_button; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.enabled_portal_reorder_button IS 'Re-order From Portal';


--
-- Name: COLUMN website.send_abandoned_cart_email; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.send_abandoned_cart_email IS 'Send email to customers who abandoned their cart.';


--
-- Name: COLUMN website.prevent_zero_price_sale; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.prevent_zero_price_sale IS 'Hide ''Add To Cart'' when price = 0';


--
-- Name: COLUMN website.enabled_gmc_src; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.enabled_gmc_src IS 'Google Merchant Center Data Source';


--
-- Name: COLUMN website.send_abandoned_cart_email_activation_time; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.send_abandoned_cart_email_activation_time IS 'Time when the ''Send abandoned cart email'' feature was activated.';


--
-- Name: COLUMN website.cart_abandoned_delay; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website.cart_abandoned_delay IS 'Abandoned Delay';


--
-- Name: CONSTRAINT website_check_gmc_ecommerce_access ON website; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON CONSTRAINT website_check_gmc_ecommerce_access ON public.website IS 'CHECK (NOT enabled_gmc_src OR ecommerce_access = ''everyone'')';


--
-- Name: website_base_unit; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_base_unit (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    name jsonb NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_base_unit; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_base_unit IS 'Unit of Measure for price per unit on eCommerce products.';


--
-- Name: COLUMN website_base_unit.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_base_unit.create_uid IS 'Created by';


--
-- Name: COLUMN website_base_unit.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_base_unit.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.website_base_unit.name IS 'Name';


--
-- Name: COLUMN website_base_unit.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_base_unit.create_date IS 'Created on';


--
-- Name: COLUMN website_base_unit.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_base_unit.write_date IS 'Last Updated on';


--
-- Name: website_base_unit_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_base_unit_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_base_unit_id_seq OWNED BY public.website_base_unit.id;


--
-- Name: website_checkout_step; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_checkout_step (
    id integer NOT NULL,
    website_id integer,
    sequence integer,
    create_uid integer,
    write_uid integer,
    step_href character varying NOT NULL,
    name jsonb NOT NULL,
    main_button_label jsonb,
    back_button_label jsonb,
    is_published boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_checkout_step; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_checkout_step IS 'Website Checkout Step';


--
-- Name: COLUMN website_checkout_step.website_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_checkout_step.website_id IS 'Website';


--
-- Name: COLUMN website_checkout_step.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_checkout_step.sequence IS 'Sequence';


--
-- Name: COLUMN website_checkout_step.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_checkout_step.create_uid IS 'Created by';


--
-- Name: COLUMN website_checkout_step.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_checkout_step.write_uid IS 'Last Updated by';


--
-- Name: COLUMN website_checkout_step.step_href; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_checkout_step.step_href IS 'Href';


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

COMMENT ON COLUMN public.website_checkout_step.name IS 'Name';


--
-- Name: COLUMN website_checkout_step.main_button_label; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_checkout_step.main_button_label IS 'Main Button Label';


--
-- Name: COLUMN website_checkout_step.back_button_label; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_checkout_step.back_button_label IS 'Back Button Label';


--
-- Name: COLUMN website_checkout_step.is_published; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_checkout_step.is_published IS 'Is Published';


--
-- Name: COLUMN website_checkout_step.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_checkout_step.create_date IS 'Created on';


--
-- Name: COLUMN website_checkout_step.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_checkout_step.write_date IS 'Last Updated on';


--
-- Name: website_checkout_step_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_checkout_step_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_checkout_step_id_seq OWNED BY public.website_checkout_step.id;


--
-- Name: website_configurator_feature; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_configurator_feature (
    id integer NOT NULL,
    sequence integer,
    page_view_id integer,
    module_id integer,
    menu_sequence integer,
    create_uid integer,
    write_uid integer,
    icon character varying,
    iap_page_code character varying,
    website_config_preselection character varying,
    feature_url character varying,
    name jsonb,
    description jsonb,
    menu_company boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_configurator_feature; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_configurator_feature IS 'Website Configurator Feature';


--
-- Name: COLUMN website_configurator_feature.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.sequence IS 'Sequence';


--
-- Name: COLUMN website_configurator_feature.page_view_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.page_view_id IS 'Page View';


--
-- Name: COLUMN website_configurator_feature.module_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.module_id IS 'Module';


--
-- Name: COLUMN website_configurator_feature.menu_sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.menu_sequence IS 'Menu Sequence';


--
-- Name: COLUMN website_configurator_feature.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.create_uid IS 'Created by';


--
-- Name: COLUMN website_configurator_feature.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.write_uid IS 'Last Updated by';


--
-- Name: COLUMN website_configurator_feature.icon; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.icon IS 'Icon';


--
-- Name: COLUMN website_configurator_feature.iap_page_code; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.iap_page_code IS 'Iap Page Code';


--
-- Name: COLUMN website_configurator_feature.website_config_preselection; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.website_config_preselection IS 'Website Config Preselection';


--
-- Name: COLUMN website_configurator_feature.feature_url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.feature_url IS 'Feature Url';


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

COMMENT ON COLUMN public.website_configurator_feature.name IS 'Name';


--
-- Name: COLUMN website_configurator_feature.description; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.description IS 'Description';


--
-- Name: COLUMN website_configurator_feature.menu_company; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.menu_company IS 'Menu Company';


--
-- Name: COLUMN website_configurator_feature.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.create_date IS 'Created on';


--
-- Name: COLUMN website_configurator_feature.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_configurator_feature.write_date IS 'Last Updated on';


--
-- Name: website_configurator_feature_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_configurator_feature_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_configurator_feature_id_seq OWNED BY public.website_configurator_feature.id;


--
-- Name: website_controller_page; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_controller_page (
    id integer NOT NULL,
    website_id integer,
    view_id integer NOT NULL,
    record_view_id integer,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    name_slugified character varying,
    record_domain character varying,
    default_layout character varying,
    is_published boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_controller_page; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_controller_page IS 'Model Page';


--
-- Name: COLUMN website_controller_page.website_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_controller_page.website_id IS 'Website';


--
-- Name: COLUMN website_controller_page.view_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_controller_page.view_id IS 'Listing view';


--
-- Name: COLUMN website_controller_page.record_view_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_controller_page.record_view_id IS 'Record view';


--
-- Name: COLUMN website_controller_page.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_controller_page.create_uid IS 'Created by';


--
-- Name: COLUMN website_controller_page.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_controller_page.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.website_controller_page.name IS 'The name is used to generate the URL and is shown in the browser title bar';


--
-- Name: COLUMN website_controller_page.name_slugified; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_controller_page.name_slugified IS 'URL';


--
-- Name: COLUMN website_controller_page.record_domain; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_controller_page.record_domain IS 'Domain';


--
-- Name: COLUMN website_controller_page.default_layout; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_controller_page.default_layout IS 'Default Layout';


--
-- Name: COLUMN website_controller_page.is_published; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_controller_page.is_published IS 'Is Published';


--
-- Name: COLUMN website_controller_page.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_controller_page.create_date IS 'Created on';


--
-- Name: COLUMN website_controller_page.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_controller_page.write_date IS 'Last Updated on';


--
-- Name: website_controller_page_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_controller_page_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_controller_page_id_seq OWNED BY public.website_controller_page.id;


--
-- Name: website_custom_blocked_third_party_domains; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_custom_blocked_third_party_domains (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    content text,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_custom_blocked_third_party_domains; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_custom_blocked_third_party_domains IS 'User list of blocked 3rd-party domains';


--
-- Name: COLUMN website_custom_blocked_third_party_domains.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_custom_blocked_third_party_domains.create_uid IS 'Created by';


--
-- Name: COLUMN website_custom_blocked_third_party_domains.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_custom_blocked_third_party_domains.write_uid IS 'Last Updated by';


--
-- Name: COLUMN website_custom_blocked_third_party_domains.content; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_custom_blocked_third_party_domains.content IS 'Content';


--
-- Name: COLUMN website_custom_blocked_third_party_domains.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_custom_blocked_third_party_domains.create_date IS 'Created on';


--
-- Name: COLUMN website_custom_blocked_third_party_domains.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_custom_blocked_third_party_domains.write_date IS 'Last Updated on';


--
-- Name: website_custom_blocked_third_party_domains_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_custom_blocked_third_party_domains_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_custom_blocked_third_party_domains_id_seq OWNED BY public.website_custom_blocked_third_party_domains.id;


--
-- Name: website_event_menu; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_event_menu (
    id integer NOT NULL,
    menu_id integer,
    event_id integer,
    view_id integer,
    create_uid integer,
    write_uid integer,
    website_meta_og_img character varying,
    menu_type character varying NOT NULL,
    website_meta_title jsonb,
    website_meta_description jsonb,
    website_meta_keywords jsonb,
    seo_name jsonb,
    is_seo_optimized boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_event_menu; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_event_menu IS 'Website Event Menu';


--
-- Name: COLUMN website_event_menu.menu_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.menu_id IS 'Menu';


--
-- Name: COLUMN website_event_menu.event_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.event_id IS 'Event';


--
-- Name: COLUMN website_event_menu.view_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.view_id IS 'View';


--
-- Name: COLUMN website_event_menu.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.create_uid IS 'Created by';


--
-- Name: COLUMN website_event_menu.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.write_uid IS 'Last Updated by';


--
-- Name: COLUMN website_event_menu.website_meta_og_img; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.website_meta_og_img IS 'Website opengraph image';


--
-- Name: COLUMN website_event_menu.menu_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.menu_type IS 'Menu Type';


--
-- Name: COLUMN website_event_menu.website_meta_title; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.website_meta_title IS 'Website meta title';


--
-- Name: COLUMN website_event_menu.website_meta_description; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.website_meta_description IS 'Website meta description';


--
-- Name: COLUMN website_event_menu.website_meta_keywords; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.website_meta_keywords IS 'Website meta keywords';


--
-- Name: COLUMN website_event_menu.seo_name; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.seo_name IS 'Seo name';


--
-- Name: COLUMN website_event_menu.is_seo_optimized; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.is_seo_optimized IS 'SEO optimized';


--
-- Name: COLUMN website_event_menu.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.create_date IS 'Created on';


--
-- Name: COLUMN website_event_menu.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_event_menu.write_date IS 'Last Updated on';


--
-- Name: website_event_menu_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_event_menu_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_event_menu_id_seq OWNED BY public.website_event_menu.id;


--
-- Name: website_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_id_seq OWNED BY public.website.id;


--
-- Name: website_lang_rel; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_lang_rel (
    website_id integer NOT NULL,
    lang_id integer NOT NULL
);


--
-- Name: TABLE website_lang_rel; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_lang_rel IS 'RELATION BETWEEN website AND res_lang';


--
-- Name: website_menu; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_menu (
    id integer NOT NULL,
    page_id integer,
    controller_page_id integer,
    sequence integer,
    website_id integer,
    parent_id integer,
    create_uid integer,
    write_uid integer,
    theme_template_id integer,
    url character varying NOT NULL,
    parent_path character varying,
    mega_menu_classes character varying,
    name jsonb NOT NULL,
    mega_menu_content jsonb,
    new_window boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_menu; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_menu IS 'Website Menu';


--
-- Name: COLUMN website_menu.page_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.page_id IS 'Related Page';


--
-- Name: COLUMN website_menu.controller_page_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.controller_page_id IS 'Related Model Page';


--
-- Name: COLUMN website_menu.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.sequence IS 'Sequence';


--
-- Name: COLUMN website_menu.website_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.website_id IS 'Website';


--
-- Name: COLUMN website_menu.parent_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.parent_id IS 'Parent Menu';


--
-- Name: COLUMN website_menu.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.create_uid IS 'Created by';


--
-- Name: COLUMN website_menu.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.write_uid IS 'Last Updated by';


--
-- Name: COLUMN website_menu.theme_template_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.theme_template_id IS 'Theme Template';


--
-- Name: COLUMN website_menu.url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.url IS 'Url';


--
-- Name: COLUMN website_menu.parent_path; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.parent_path IS 'Parent Path';


--
-- Name: COLUMN website_menu.mega_menu_classes; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.mega_menu_classes IS 'Mega Menu Classes';


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

COMMENT ON COLUMN public.website_menu.name IS 'Menu';


--
-- Name: COLUMN website_menu.mega_menu_content; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.mega_menu_content IS 'Mega Menu Content';


--
-- Name: COLUMN website_menu.new_window; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.new_window IS 'New Window';


--
-- Name: COLUMN website_menu.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.create_date IS 'Created on';


--
-- Name: COLUMN website_menu.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_menu.write_date IS 'Last Updated on';


--
-- Name: website_menu_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_menu_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_menu_id_seq OWNED BY public.website_menu.id;


--
-- Name: website_page; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_page (
    id integer NOT NULL,
    website_id integer,
    view_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    theme_template_id integer,
    header_color character varying,
    header_text_color character varying,
    url character varying NOT NULL,
    header_visible boolean,
    footer_visible boolean,
    header_overlay boolean,
    is_published boolean,
    website_indexed boolean,
    is_new_page_template boolean,
    date_publish timestamp without time zone,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_page; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_page IS 'Page';


--
-- Name: COLUMN website_page.website_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.website_id IS 'Website';


--
-- Name: COLUMN website_page.view_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.view_id IS 'View';


--
-- Name: COLUMN website_page.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.create_uid IS 'Created by';


--
-- Name: COLUMN website_page.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.write_uid IS 'Last Updated by';


--
-- Name: COLUMN website_page.theme_template_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.theme_template_id IS 'Theme Template';


--
-- Name: COLUMN website_page.header_color; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.header_color IS 'Header Color';


--
-- Name: COLUMN website_page.header_text_color; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.header_text_color IS 'Header Text Color';


--
-- Name: COLUMN website_page.url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.url IS 'Page URL';


--
-- Name: COLUMN website_page.header_visible; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.header_visible IS 'Header Visible';


--
-- Name: COLUMN website_page.footer_visible; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.footer_visible IS 'Footer Visible';


--
-- Name: COLUMN website_page.header_overlay; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.header_overlay IS 'Header Overlay';


--
-- Name: COLUMN website_page.is_published; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.is_published IS 'Is Published';


--
-- Name: COLUMN website_page.website_indexed; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.website_indexed IS 'Is Indexed';


--
-- Name: COLUMN website_page.is_new_page_template; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.is_new_page_template IS 'New Page Template';


--
-- Name: COLUMN website_page.date_publish; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.date_publish IS 'Publishing Date';


--
-- Name: COLUMN website_page.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.create_date IS 'Created on';


--
-- Name: COLUMN website_page.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page.write_date IS 'Last Updated on';


--
-- Name: website_page_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_page_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_page_id_seq OWNED BY public.website_page.id;


--
-- Name: website_page_properties; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_page_properties (
    id integer NOT NULL,
    target_model_id integer,
    website_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    old_url character varying,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_page_properties; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_page_properties IS 'Page Properties';


--
-- Name: COLUMN website_page_properties.target_model_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties.target_model_id IS 'Target Model';


--
-- Name: COLUMN website_page_properties.website_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties.website_id IS 'Website';


--
-- Name: COLUMN website_page_properties.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties.create_uid IS 'Created by';


--
-- Name: COLUMN website_page_properties.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties.write_uid IS 'Last Updated by';


--
-- Name: COLUMN website_page_properties.old_url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties.old_url IS 'Old Url';


--
-- Name: COLUMN website_page_properties.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties.create_date IS 'Created on';


--
-- Name: COLUMN website_page_properties.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties.write_date IS 'Last Updated on';


--
-- Name: website_page_properties_base; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_page_properties_base (
    id integer NOT NULL,
    website_id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    target_model_id character varying NOT NULL,
    url character varying NOT NULL,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_page_properties_base; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_page_properties_base IS 'Page Properties Base';


--
-- Name: COLUMN website_page_properties_base.website_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties_base.website_id IS 'Website';


--
-- Name: COLUMN website_page_properties_base.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties_base.create_uid IS 'Created by';


--
-- Name: COLUMN website_page_properties_base.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties_base.write_uid IS 'Last Updated by';


--
-- Name: COLUMN website_page_properties_base.target_model_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties_base.target_model_id IS 'Target Model';


--
-- Name: COLUMN website_page_properties_base.url; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties_base.url IS 'Url';


--
-- Name: COLUMN website_page_properties_base.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties_base.create_date IS 'Created on';


--
-- Name: COLUMN website_page_properties_base.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_page_properties_base.write_date IS 'Last Updated on';


--
-- Name: website_page_properties_base_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_page_properties_base_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_page_properties_base_id_seq OWNED BY public.website_page_properties_base.id;


--
-- Name: website_page_properties_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_page_properties_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_page_properties_id_seq OWNED BY public.website_page_properties.id;


--
-- Name: website_rewrite; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_rewrite (
    id integer NOT NULL,
    website_id integer,
    route_id integer,
    sequence integer,
    create_uid integer,
    write_uid integer,
    name character varying NOT NULL,
    url_from character varying,
    url_to character varying,
    redirect_type character varying,
    active boolean,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_rewrite; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_rewrite IS 'Website rewrite';


--
-- Name: COLUMN website_rewrite.website_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_rewrite.website_id IS 'Website';


--
-- Name: COLUMN website_rewrite.route_id; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_rewrite.route_id IS 'Route';


--
-- Name: COLUMN website_rewrite.sequence; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_rewrite.sequence IS 'Sequence';


--
-- Name: COLUMN website_rewrite.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_rewrite.create_uid IS 'Created by';


--
-- Name: COLUMN website_rewrite.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_rewrite.write_uid IS 'Last Updated by';


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

COMMENT ON COLUMN public.website_rewrite.name IS 'Name';


--
-- Name: COLUMN website_rewrite.url_from; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_rewrite.url_from IS 'URL from';


--
-- Name: COLUMN website_rewrite.url_to; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_rewrite.url_to IS 'URL to';


--
-- Name: COLUMN website_rewrite.redirect_type; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_rewrite.redirect_type IS 'Action';


--
-- Name: COLUMN website_rewrite.active; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_rewrite.active IS 'Active';


--
-- Name: COLUMN website_rewrite.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_rewrite.create_date IS 'Created on';


--
-- Name: COLUMN website_rewrite.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_rewrite.write_date IS 'Last Updated on';


--
-- Name: website_rewrite_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_rewrite_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_rewrite_id_seq OWNED BY public.website_rewrite.id;


--
-- Name: website_robots; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_robots (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    content text,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_robots; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_robots IS 'Robots.txt Editor';


--
-- Name: COLUMN website_robots.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_robots.create_uid IS 'Created by';


--
-- Name: COLUMN website_robots.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_robots.write_uid IS 'Last Updated by';


--
-- Name: COLUMN website_robots.content; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_robots.content IS 'Content';


--
-- Name: COLUMN website_robots.create_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_robots.create_date IS 'Created on';


--
-- Name: COLUMN website_robots.write_date; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_robots.write_date IS 'Last Updated on';


--
-- Name: website_robots_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: website_robots_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.website_robots_id_seq OWNED BY public.website_robots.id;


--
-- Name: website_route; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.website_route (
    id integer NOT NULL,
    create_uid integer,
    write_uid integer,
    path character varying,
    create_date timestamp without time zone,
    write_date timestamp without time zone
);


--
-- Name: TABLE website_route; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON TABLE public.website_route IS 'All Website Route';


--
-- Name: COLUMN website_route.create_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_route.create_uid IS 'Created by';


--
-- Name: COLUMN website_route.write_uid; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_route.write_uid IS 'Last Updated by';


--
-- Name: COLUMN website_route.path; Type: COMMENT; Schema: public; Owner: -
--

COMMENT ON COLUMN public.website_route.path IS 'Route';


--
