3892 lines
195 KiB
SQL
3892 lines
195 KiB
SQL
--
|
||
-- PostgreSQL database dump
|
||
--
|
||
|
||
\restrict qy7tTjoVIORd7vs81jEgGX6wUmYwfBrjR2hEfC0xOsibuObwE3rGsnQOGsO6aqU
|
||
|
||
-- Dumped from database version 15.18 (Debian 15.18-1.pgdg13+1)
|
||
-- Dumped by pg_dump version 15.18 (Debian 15.18-1.pgdg13+1)
|
||
|
||
SET statement_timeout = 0;
|
||
SET lock_timeout = 0;
|
||
SET idle_in_transaction_session_timeout = 0;
|
||
SET client_encoding = 'UTF8';
|
||
SET standard_conforming_strings = on;
|
||
SELECT pg_catalog.set_config('search_path', '', false);
|
||
SET check_function_bodies = false;
|
||
SET xmloption = content;
|
||
SET client_min_messages = warning;
|
||
SET row_security = off;
|
||
|
||
SET default_tablespace = '';
|
||
|
||
SET default_table_access_method = heap;
|
||
|
||
--
|
||
-- Name: abilities; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.abilities (
|
||
"group" character varying(64) NOT NULL,
|
||
model character varying(255) NOT NULL,
|
||
channel_id bigint NOT NULL,
|
||
enabled boolean,
|
||
priority bigint DEFAULT 0,
|
||
weight bigint DEFAULT 0,
|
||
tag text
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: aff_funnel_daily; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.aff_funnel_daily (
|
||
id bigint NOT NULL,
|
||
inviter_id bigint NOT NULL,
|
||
stat_date character varying(10) NOT NULL,
|
||
short_link_clicks bigint DEFAULT 0 NOT NULL,
|
||
register_page_views bigint DEFAULT 0 NOT NULL
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: aff_funnel_daily_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.aff_funnel_daily_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: aff_funnel_daily_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.aff_funnel_daily_id_seq OWNED BY public.aff_funnel_daily.id;
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_commission_logs; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.aff_invite_commission_logs (
|
||
id bigint NOT NULL,
|
||
inviter_id bigint NOT NULL,
|
||
invitee_user_id bigint NOT NULL,
|
||
invitee_quota_added bigint NOT NULL,
|
||
commission_bps bigint NOT NULL,
|
||
reward_quota bigint NOT NULL,
|
||
created_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_commission_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.aff_invite_commission_logs_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_commission_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.aff_invite_commission_logs_id_seq OWNED BY public.aff_invite_commission_logs.id;
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_profit_share_logs; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.aff_invite_profit_share_logs (
|
||
id bigint NOT NULL,
|
||
inviter_id bigint NOT NULL,
|
||
invitee_user_id bigint NOT NULL,
|
||
channel_id bigint NOT NULL,
|
||
model_name character varying(255) DEFAULT ''::character varying NOT NULL,
|
||
user_quota_charged bigint NOT NULL,
|
||
markup_slice_quota bigint NOT NULL,
|
||
reward_quota bigint NOT NULL,
|
||
commission_bps bigint DEFAULT 0 NOT NULL,
|
||
created_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_profit_share_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.aff_invite_profit_share_logs_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_profit_share_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.aff_invite_profit_share_logs_id_seq OWNED BY public.aff_invite_profit_share_logs.id;
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_relations; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.aff_invite_relations (
|
||
id bigint NOT NULL,
|
||
inviter_id bigint NOT NULL,
|
||
invitee_user_id bigint NOT NULL,
|
||
commission_ratio_bps bigint DEFAULT 0 NOT NULL,
|
||
commission_earned_quota bigint DEFAULT 0 NOT NULL,
|
||
profit_share_earned_quota bigint DEFAULT 0 NOT NULL,
|
||
model_markup_discount_rate text,
|
||
created_at bigint,
|
||
updated_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: COLUMN aff_invite_relations.model_markup_discount_rate; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.aff_invite_relations.model_markup_discount_rate IS '被邀请用户模型加价折扣率(JSON数组)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN aff_invite_relations.created_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.aff_invite_relations.created_at IS '创建时间';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN aff_invite_relations.updated_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.aff_invite_relations.updated_at IS '更新时间';
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_relations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.aff_invite_relations_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_relations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.aff_invite_relations_id_seq OWNED BY public.aff_invite_relations.id;
|
||
|
||
|
||
--
|
||
-- Name: channels; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.channels (
|
||
id bigint NOT NULL,
|
||
type bigint DEFAULT 0,
|
||
company_logo_url character varying(1024) DEFAULT ''::character varying NOT NULL,
|
||
supplier_type character varying(64) DEFAULT ''::character varying NOT NULL,
|
||
key text NOT NULL,
|
||
open_ai_organization text,
|
||
test_model text,
|
||
status bigint DEFAULT 1,
|
||
name text,
|
||
weight bigint DEFAULT 0,
|
||
created_time bigint,
|
||
test_time bigint,
|
||
response_time bigint,
|
||
base_url text DEFAULT ''::text,
|
||
other text,
|
||
balance numeric,
|
||
balance_updated_time bigint,
|
||
models text,
|
||
"group" character varying(64) DEFAULT 'default'::character varying,
|
||
used_quota bigint DEFAULT 0,
|
||
model_mapping text,
|
||
status_code_mapping character varying(1024) DEFAULT ''::character varying,
|
||
priority bigint DEFAULT 0,
|
||
auto_ban bigint DEFAULT 1,
|
||
other_info text,
|
||
tag text,
|
||
setting text,
|
||
param_override text,
|
||
header_override text,
|
||
remark character varying(255),
|
||
channel_info json,
|
||
settings text,
|
||
owner_user_id bigint DEFAULT 0,
|
||
supplier_application_id bigint DEFAULT 0,
|
||
channel_no character varying(32) DEFAULT ''::character varying,
|
||
route_slug character varying(32) DEFAULT ''::character varying NOT NULL,
|
||
price_discount_percent double precision DEFAULT 100,
|
||
markup_discount_rate double precision DEFAULT 0
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: COLUMN channels.company_logo_url; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.channels.company_logo_url IS '企业Logo图片URL';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN channels.supplier_type; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.channels.supplier_type IS '供应商类型';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN channels.channel_no; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.channels.channel_no IS '供应商渠道编号 c1,c2 递增';
|
||
|
||
|
||
--
|
||
-- Name: channels_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.channels_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: channels_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.channels_id_seq OWNED BY public.channels.id;
|
||
|
||
|
||
--
|
||
-- Name: checkins; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.checkins (
|
||
id bigint NOT NULL,
|
||
user_id bigint NOT NULL,
|
||
checkin_date character varying(10) NOT NULL,
|
||
quota_awarded bigint NOT NULL,
|
||
created_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: checkins_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.checkins_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: checkins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.checkins_id_seq OWNED BY public.checkins.id;
|
||
|
||
|
||
--
|
||
-- Name: custom_oauth_providers; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.custom_oauth_providers (
|
||
id bigint NOT NULL,
|
||
name character varying(64) NOT NULL,
|
||
slug character varying(64) NOT NULL,
|
||
icon character varying(128) DEFAULT ''::character varying,
|
||
enabled boolean DEFAULT false,
|
||
client_id character varying(256),
|
||
client_secret character varying(512),
|
||
authorization_endpoint character varying(512),
|
||
token_endpoint character varying(512),
|
||
user_info_endpoint character varying(512),
|
||
scopes character varying(256) DEFAULT 'openid profile email'::character varying,
|
||
user_id_field character varying(128) DEFAULT 'sub'::character varying,
|
||
username_field character varying(128) DEFAULT 'preferred_username'::character varying,
|
||
display_name_field character varying(128) DEFAULT 'name'::character varying,
|
||
email_field character varying(128) DEFAULT 'email'::character varying,
|
||
well_known character varying(512),
|
||
auth_style bigint DEFAULT 0,
|
||
access_policy text,
|
||
access_denied_message character varying(512),
|
||
created_at timestamp with time zone,
|
||
updated_at timestamp with time zone
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: custom_oauth_providers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.custom_oauth_providers_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: custom_oauth_providers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.custom_oauth_providers_id_seq OWNED BY public.custom_oauth_providers.id;
|
||
|
||
|
||
--
|
||
-- Name: distributor_applications; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.distributor_applications (
|
||
id bigint NOT NULL,
|
||
user_id bigint NOT NULL,
|
||
apply_type bigint DEFAULT 1 NOT NULL,
|
||
real_name character varying(64) NOT NULL,
|
||
id_card_no character varying(32) NOT NULL,
|
||
qualification_urls text NOT NULL,
|
||
contact character varying(128) NOT NULL,
|
||
status bigint DEFAULT 1 NOT NULL,
|
||
reject_reason character varying(512),
|
||
reviewer_id bigint,
|
||
reviewed_at bigint,
|
||
created_at bigint,
|
||
updated_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: distributor_applications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.distributor_applications_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: distributor_applications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.distributor_applications_id_seq OWNED BY public.distributor_applications.id;
|
||
|
||
|
||
--
|
||
-- Name: distributor_withdrawals; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.distributor_withdrawals (
|
||
id bigint NOT NULL,
|
||
user_id bigint NOT NULL,
|
||
account_type bigint DEFAULT 1 NOT NULL,
|
||
real_name character varying(64) NOT NULL,
|
||
bank_name character varying(128) NOT NULL,
|
||
bank_account character varying(64) NOT NULL,
|
||
profile_data text,
|
||
voucher_urls text,
|
||
withdraw_month character varying(16) NOT NULL,
|
||
quota_amount bigint NOT NULL,
|
||
status bigint DEFAULT 1 NOT NULL,
|
||
reject_reason character varying(512),
|
||
reviewer_id bigint,
|
||
reviewed_at bigint,
|
||
cancelled_at bigint,
|
||
created_at bigint,
|
||
updated_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: distributor_withdrawals_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.distributor_withdrawals_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: distributor_withdrawals_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.distributor_withdrawals_id_seq OWNED BY public.distributor_withdrawals.id;
|
||
|
||
|
||
--
|
||
-- Name: logs; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.logs (
|
||
id bigint NOT NULL,
|
||
user_id bigint,
|
||
created_at bigint,
|
||
type bigint,
|
||
content text,
|
||
username text DEFAULT ''::text,
|
||
token_name text DEFAULT ''::text,
|
||
model_name text DEFAULT ''::text,
|
||
quota bigint DEFAULT 0,
|
||
prompt_tokens bigint DEFAULT 0,
|
||
completion_tokens bigint DEFAULT 0,
|
||
use_time bigint DEFAULT 0,
|
||
is_stream boolean,
|
||
channel_id bigint,
|
||
channel_name text,
|
||
token_id bigint DEFAULT 0,
|
||
"group" text,
|
||
ip text DEFAULT ''::text,
|
||
request_id character varying(64) DEFAULT ''::character varying,
|
||
other text
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.logs_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.logs_id_seq OWNED BY public.logs.id;
|
||
|
||
|
||
--
|
||
-- Name: midjourneys; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.midjourneys (
|
||
id bigint NOT NULL,
|
||
code bigint,
|
||
user_id bigint,
|
||
action character varying(40),
|
||
mj_id text,
|
||
prompt text,
|
||
prompt_en text,
|
||
description text,
|
||
state text,
|
||
submit_time bigint,
|
||
start_time bigint,
|
||
finish_time bigint,
|
||
image_url text,
|
||
video_url text,
|
||
video_urls text,
|
||
status character varying(20),
|
||
progress character varying(30),
|
||
fail_reason text,
|
||
channel_id bigint,
|
||
quota bigint,
|
||
buttons text,
|
||
properties text
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: midjourneys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.midjourneys_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: midjourneys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.midjourneys_id_seq OWNED BY public.midjourneys.id;
|
||
|
||
|
||
--
|
||
-- Name: model_tags; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.model_tags (
|
||
id bigint NOT NULL,
|
||
name character varying(64) NOT NULL,
|
||
note character varying(255)
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: model_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.model_tags_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: model_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.model_tags_id_seq OWNED BY public.model_tags.id;
|
||
|
||
|
||
--
|
||
-- Name: model_test_results; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.model_test_results (
|
||
channel_id integer NOT NULL,
|
||
model_name character varying(255) NOT NULL,
|
||
last_test_success boolean DEFAULT false,
|
||
last_test_time bigint DEFAULT 0,
|
||
last_response_time integer DEFAULT 0,
|
||
last_test_message text,
|
||
test_count_success integer DEFAULT 0,
|
||
test_count_fail integer DEFAULT 0,
|
||
manual_display_response_time integer DEFAULT 0,
|
||
manual_stability_grade integer DEFAULT 0
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: COLUMN model_test_results.channel_id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.model_test_results.channel_id IS '渠道ID(联合主键)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN model_test_results.model_name; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.model_test_results.model_name IS '模型名称(联合主键)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN model_test_results.last_test_success; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.model_test_results.last_test_success IS '最近一次测试是否成功';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN model_test_results.last_test_time; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.model_test_results.last_test_time IS '最近一次测试时间(Unix秒)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN model_test_results.last_response_time; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.model_test_results.last_response_time IS '最近一次测试响应耗时(毫秒)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN model_test_results.last_test_message; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.model_test_results.last_test_message IS '最近一次测试错误信息';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN model_test_results.test_count_success; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.model_test_results.test_count_success IS '累计测试成功次数';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN model_test_results.test_count_fail; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.model_test_results.test_count_fail IS '累计测试失败次数';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN model_test_results.manual_display_response_time; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.model_test_results.manual_display_response_time IS '运营展示用响应耗时(毫秒) 0=不覆盖';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN model_test_results.manual_stability_grade; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.model_test_results.manual_stability_grade IS '运营展示用稳定性等级1-5 0=不覆盖';
|
||
|
||
|
||
--
|
||
-- Name: models; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.models (
|
||
id bigint NOT NULL,
|
||
model_name character varying(128) NOT NULL,
|
||
description text,
|
||
doc_introduction text,
|
||
api_docs text,
|
||
icon character varying(128),
|
||
tags character varying(255),
|
||
vendor_id bigint,
|
||
endpoints text,
|
||
status bigint DEFAULT 1,
|
||
sync_official bigint DEFAULT 1,
|
||
created_time bigint,
|
||
updated_time bigint,
|
||
deleted_at timestamp with time zone,
|
||
name_rule bigint DEFAULT 0,
|
||
owner_user_id bigint DEFAULT 0,
|
||
supplier_application_id bigint DEFAULT 0,
|
||
sort_weight numeric DEFAULT 1,
|
||
manual_base_req_count bigint DEFAULT 0
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: models_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.models_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: models_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.models_id_seq OWNED BY public.models.id;
|
||
|
||
|
||
--
|
||
-- Name: operation_logs; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.operation_logs (
|
||
id bigint NOT NULL,
|
||
user_id bigint,
|
||
username text DEFAULT ''::text,
|
||
created_at bigint,
|
||
action character varying(32),
|
||
target_type character varying(64) DEFAULT ''::character varying,
|
||
target_id bigint DEFAULT 0,
|
||
target_name character varying(255) DEFAULT ''::character varying,
|
||
content text,
|
||
ip text DEFAULT ''::text,
|
||
request_body text,
|
||
user_role bigint DEFAULT 0
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: operation_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.operation_logs_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: operation_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.operation_logs_id_seq OWNED BY public.operation_logs.id;
|
||
|
||
|
||
--
|
||
-- Name: options; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.options (
|
||
key text NOT NULL,
|
||
value text
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: passkey_credentials; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.passkey_credentials (
|
||
id bigint NOT NULL,
|
||
user_id bigint NOT NULL,
|
||
credential_id character varying(512) NOT NULL,
|
||
public_key text NOT NULL,
|
||
attestation_type character varying(255),
|
||
aa_guid character varying(512),
|
||
sign_count bigint DEFAULT 0,
|
||
clone_warning boolean,
|
||
user_present boolean,
|
||
user_verified boolean,
|
||
backup_eligible boolean,
|
||
backup_state boolean,
|
||
transports text,
|
||
attachment character varying(32),
|
||
last_used_at timestamp with time zone,
|
||
created_at timestamp with time zone,
|
||
updated_at timestamp with time zone,
|
||
deleted_at timestamp with time zone
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: passkey_credentials_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.passkey_credentials_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: passkey_credentials_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.passkey_credentials_id_seq OWNED BY public.passkey_credentials.id;
|
||
|
||
|
||
--
|
||
-- Name: prefill_groups; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.prefill_groups (
|
||
id bigint NOT NULL,
|
||
name character varying(64) NOT NULL,
|
||
type character varying(32) NOT NULL,
|
||
items json,
|
||
description character varying(255),
|
||
created_time bigint,
|
||
updated_time bigint,
|
||
deleted_at timestamp with time zone
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: prefill_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.prefill_groups_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: prefill_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.prefill_groups_id_seq OWNED BY public.prefill_groups.id;
|
||
|
||
|
||
--
|
||
-- Name: quota_data; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.quota_data (
|
||
id bigint NOT NULL,
|
||
user_id bigint,
|
||
username character varying(64) DEFAULT ''::character varying,
|
||
model_name character varying(64) DEFAULT ''::character varying,
|
||
created_at bigint,
|
||
token_used bigint DEFAULT 0,
|
||
count bigint DEFAULT 0,
|
||
quota bigint DEFAULT 0
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: quota_data_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.quota_data_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: quota_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.quota_data_id_seq OWNED BY public.quota_data.id;
|
||
|
||
|
||
--
|
||
-- Name: redemptions; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.redemptions (
|
||
id bigint NOT NULL,
|
||
user_id bigint,
|
||
key character(32),
|
||
status bigint DEFAULT 1,
|
||
name text,
|
||
quota bigint DEFAULT 100,
|
||
created_time bigint,
|
||
redeemed_time bigint,
|
||
used_user_id bigint,
|
||
deleted_at timestamp with time zone,
|
||
expired_time bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: redemptions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.redemptions_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: redemptions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.redemptions_id_seq OWNED BY public.redemptions.id;
|
||
|
||
|
||
--
|
||
-- Name: setups; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.setups (
|
||
id bigint NOT NULL,
|
||
version character varying(50) NOT NULL,
|
||
initialized_at bigint NOT NULL
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: setups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.setups_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: setups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.setups_id_seq OWNED BY public.setups.id;
|
||
|
||
|
||
--
|
||
-- Name: subscription_orders; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.subscription_orders (
|
||
id bigint NOT NULL,
|
||
user_id bigint,
|
||
plan_id bigint,
|
||
money numeric,
|
||
trade_no character varying(255),
|
||
payment_method character varying(50),
|
||
status text,
|
||
create_time bigint,
|
||
complete_time bigint,
|
||
provider_payload text
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: subscription_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.subscription_orders_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: subscription_orders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.subscription_orders_id_seq OWNED BY public.subscription_orders.id;
|
||
|
||
|
||
--
|
||
-- Name: subscription_plans; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.subscription_plans (
|
||
id bigint NOT NULL,
|
||
title character varying(128) NOT NULL,
|
||
subtitle character varying(255) DEFAULT ''::character varying,
|
||
price_amount numeric(10,6) DEFAULT 0 NOT NULL,
|
||
currency character varying(8) DEFAULT 'USD'::character varying NOT NULL,
|
||
duration_unit character varying(16) DEFAULT 'month'::character varying NOT NULL,
|
||
duration_value bigint DEFAULT 1 NOT NULL,
|
||
custom_seconds bigint DEFAULT 0 NOT NULL,
|
||
enabled boolean DEFAULT true,
|
||
sort_order bigint DEFAULT 0,
|
||
stripe_price_id character varying(128) DEFAULT ''::character varying,
|
||
creem_product_id character varying(128) DEFAULT ''::character varying,
|
||
max_purchase_per_user bigint DEFAULT 0,
|
||
upgrade_group character varying(64) DEFAULT ''::character varying,
|
||
total_amount bigint DEFAULT 0 NOT NULL,
|
||
quota_reset_period character varying(16) DEFAULT 'never'::character varying,
|
||
quota_reset_custom_seconds bigint DEFAULT 0,
|
||
created_at bigint,
|
||
updated_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: subscription_plans_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.subscription_plans_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: subscription_plans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.subscription_plans_id_seq OWNED BY public.subscription_plans.id;
|
||
|
||
|
||
--
|
||
-- Name: subscription_pre_consume_records; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.subscription_pre_consume_records (
|
||
id bigint NOT NULL,
|
||
request_id character varying(64),
|
||
user_id bigint,
|
||
user_subscription_id bigint,
|
||
pre_consumed bigint DEFAULT 0 NOT NULL,
|
||
status character varying(32),
|
||
created_at bigint,
|
||
updated_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: subscription_pre_consume_records_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.subscription_pre_consume_records_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: subscription_pre_consume_records_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.subscription_pre_consume_records_id_seq OWNED BY public.subscription_pre_consume_records.id;
|
||
|
||
|
||
--
|
||
-- Name: supplier_application_audits; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.supplier_application_audits (
|
||
id bigint NOT NULL,
|
||
application_id bigint NOT NULL,
|
||
operator_user_id bigint NOT NULL,
|
||
action bigint NOT NULL,
|
||
from_status bigint NOT NULL,
|
||
to_status bigint NOT NULL,
|
||
reason text,
|
||
created_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_application_audits.id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_application_audits.id IS '主键ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_application_audits.application_id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_application_audits.application_id IS '供应商申请ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_application_audits.operator_user_id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_application_audits.operator_user_id IS '操作人用户ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_application_audits.action; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_application_audits.action IS '操作类型 0提交 1通过 2驳回';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_application_audits.from_status; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_application_audits.from_status IS '变更前状态';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_application_audits.to_status; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_application_audits.to_status IS '变更后状态';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_application_audits.reason; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_application_audits.reason IS '审核备注或驳回原因';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_application_audits.created_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_application_audits.created_at IS '创建时间戳';
|
||
|
||
|
||
--
|
||
-- Name: supplier_application_audits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.supplier_application_audits_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: supplier_application_audits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.supplier_application_audits_id_seq OWNED BY public.supplier_application_audits.id;
|
||
|
||
|
||
--
|
||
-- Name: supplier_applications; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.supplier_applications (
|
||
id bigint NOT NULL,
|
||
applicant_user_id bigint NOT NULL,
|
||
applicant_username text,
|
||
applicant_quota bigint,
|
||
applicant_used_quota bigint,
|
||
company_name character varying(255) NOT NULL,
|
||
credit_code character varying(32) NOT NULL,
|
||
business_license_url character varying(1024) NOT NULL,
|
||
business_license_file character varying(255) DEFAULT ''::character varying NOT NULL,
|
||
company_logo_url character varying(1024) DEFAULT ''::character varying NOT NULL,
|
||
supplier_type character varying(64) DEFAULT ''::character varying NOT NULL,
|
||
legal_representative character varying(128) NOT NULL,
|
||
company_size character varying(64),
|
||
contact_name character varying(128) NOT NULL,
|
||
contact_mobile character varying(32) NOT NULL,
|
||
contact_wechat character varying(128) NOT NULL,
|
||
supplier_alias character varying(128),
|
||
status bigint DEFAULT 0 NOT NULL,
|
||
review_reason text,
|
||
reviewed_by bigint DEFAULT 0,
|
||
reviewed_at bigint DEFAULT 0,
|
||
created_at bigint,
|
||
updated_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.id IS '主键ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.applicant_user_id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.applicant_user_id IS '申请人用户ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.applicant_username; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.applicant_username IS '申请人用户名(关联 users.username)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.applicant_quota; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.applicant_quota IS '申请人账户剩余额度(列表联表回填)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.applicant_used_quota; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.applicant_used_quota IS '申请人历史累计已用额度(列表联表回填)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.company_name; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.company_name IS '企业或主体名称';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.credit_code; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.credit_code IS '统一社会信用代码';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.business_license_url; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.business_license_url IS '营业执照文件URL';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.business_license_file; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.business_license_file IS '营业执照文件名称';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.company_logo_url; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.company_logo_url IS '企业Logo图片URL';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.supplier_type; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.supplier_type IS '供应商类型';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.legal_representative; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.legal_representative IS '法人或经营者姓名';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.company_size; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.company_size IS '企业规模';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.contact_name; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.contact_name IS '对接人姓名';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.contact_mobile; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.contact_mobile IS '对接人手机号';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.contact_wechat; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.contact_wechat IS '对接人微信或企业微信';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.supplier_alias; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.supplier_alias IS '供应商别名,创建时默认 P+主键 id,可修改';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.status; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.status IS '审核状态 0待审核 1已通过 2已驳回 3已注销';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.review_reason; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.review_reason IS '审核备注或驳回原因';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.reviewed_by; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.reviewed_by IS '审核人用户ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.reviewed_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.reviewed_at IS '审核时间戳';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.created_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.created_at IS '创建时间戳';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_applications.updated_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_applications.updated_at IS '更新时间戳';
|
||
|
||
|
||
--
|
||
-- Name: supplier_applications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.supplier_applications_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: supplier_applications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.supplier_applications_id_seq OWNED BY public.supplier_applications.id;
|
||
|
||
|
||
--
|
||
-- Name: supplier_capabilities; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.supplier_capabilities (
|
||
id bigint NOT NULL,
|
||
supplier_application_id bigint NOT NULL,
|
||
core_service_types text,
|
||
supported_models text,
|
||
supported_model_notes text,
|
||
supported_api_endpoints text,
|
||
supported_api_endpoint_extra text,
|
||
supported_params text,
|
||
supported_params_extra text,
|
||
streaming_supported boolean DEFAULT false,
|
||
streaming_notes text,
|
||
structured_output_supported boolean DEFAULT false,
|
||
structured_output_notes text,
|
||
multimodal_types text,
|
||
multimodal_extra text,
|
||
pricing_modes text,
|
||
reference_input_price character varying(64),
|
||
reference_output_price character varying(64),
|
||
failure_billing_mode character varying(32),
|
||
failure_billing_notes text,
|
||
api_base_urls text,
|
||
open_ai_compatible boolean DEFAULT false,
|
||
truth_commitment_confirmed boolean DEFAULT false,
|
||
created_at bigint,
|
||
updated_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.id IS '主键ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.supplier_application_id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.supplier_application_id IS '供应商申请ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.core_service_types; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.core_service_types IS '核心服务类型(JSON数组)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.supported_models; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.supported_models IS '支持的模型(JSON数组)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.supported_model_notes; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.supported_model_notes IS '支持模型补充说明';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.supported_api_endpoints; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.supported_api_endpoints IS '支持的API接口(JSON数组)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.supported_api_endpoint_extra; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.supported_api_endpoint_extra IS 'API接口补充说明';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.supported_params; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.supported_params IS '支持参数配置(JSON数组)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.supported_params_extra; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.supported_params_extra IS '参数配置补充说明';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.streaming_supported; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.streaming_supported IS '是否支持流式响应';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.streaming_notes; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.streaming_notes IS '流式响应说明';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.structured_output_supported; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.structured_output_supported IS '是否支持结构化输出';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.structured_output_notes; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.structured_output_notes IS '结构化输出说明';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.multimodal_types; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.multimodal_types IS '多模态支持类型(JSON数组)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.multimodal_extra; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.multimodal_extra IS '多模态补充说明';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.pricing_modes; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.pricing_modes IS '定价模式(JSON数组)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.reference_input_price; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.reference_input_price IS '参考输入单价(USD/1K Token)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.reference_output_price; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.reference_output_price IS '参考输出单价(USD/1K Token)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.failure_billing_mode; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.failure_billing_mode IS '故障计费规则(bill/no_bill)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.failure_billing_notes; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.failure_billing_notes IS '故障计费说明';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.api_base_urls; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.api_base_urls IS 'API接口地址(JSON数组)';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.open_ai_compatible; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.open_ai_compatible IS '是否兼容OpenAI规范';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.truth_commitment_confirmed; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.truth_commitment_confirmed IS '信息真实性承诺';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.created_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.created_at IS '创建时间戳';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN supplier_capabilities.updated_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.supplier_capabilities.updated_at IS '更新时间戳';
|
||
|
||
|
||
--
|
||
-- Name: supplier_capabilities_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.supplier_capabilities_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: supplier_capabilities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.supplier_capabilities_id_seq OWNED BY public.supplier_capabilities.id;
|
||
|
||
|
||
--
|
||
-- Name: tasks; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.tasks (
|
||
id bigint NOT NULL,
|
||
created_at bigint,
|
||
updated_at bigint,
|
||
task_id character varying(191),
|
||
platform character varying(30),
|
||
user_id bigint,
|
||
"group" character varying(50),
|
||
channel_id bigint,
|
||
quota bigint,
|
||
action character varying(40),
|
||
status character varying(20),
|
||
fail_reason text,
|
||
submit_time bigint,
|
||
start_time bigint,
|
||
finish_time bigint,
|
||
progress character varying(20),
|
||
properties json,
|
||
private_data json,
|
||
data json
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.tasks_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.tasks_id_seq OWNED BY public.tasks.id;
|
||
|
||
|
||
--
|
||
-- Name: tokens; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.tokens (
|
||
id bigint NOT NULL,
|
||
user_id bigint,
|
||
key character(48),
|
||
status bigint DEFAULT 1,
|
||
name text,
|
||
created_time bigint,
|
||
accessed_time bigint,
|
||
expired_time bigint DEFAULT '-1'::integer,
|
||
remain_quota bigint DEFAULT 0,
|
||
unlimited_quota boolean,
|
||
model_limits_enabled boolean,
|
||
model_limits text,
|
||
allow_ips text DEFAULT ''::text,
|
||
used_quota bigint DEFAULT 0,
|
||
"group" text DEFAULT ''::text,
|
||
cross_group_retry boolean,
|
||
deleted_at timestamp with time zone
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.tokens_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.tokens_id_seq OWNED BY public.tokens.id;
|
||
|
||
|
||
--
|
||
-- Name: top_ups; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.top_ups (
|
||
id bigint NOT NULL,
|
||
user_id bigint,
|
||
amount bigint,
|
||
money numeric,
|
||
trade_no character varying(255),
|
||
payment_method character varying(50),
|
||
create_time bigint,
|
||
complete_time bigint,
|
||
status text
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: top_ups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.top_ups_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: top_ups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.top_ups_id_seq OWNED BY public.top_ups.id;
|
||
|
||
|
||
--
|
||
-- Name: two_fa_backup_codes; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.two_fa_backup_codes (
|
||
id bigint NOT NULL,
|
||
user_id bigint NOT NULL,
|
||
code_hash character varying(255) NOT NULL,
|
||
is_used boolean,
|
||
used_at timestamp with time zone,
|
||
created_at timestamp with time zone,
|
||
deleted_at timestamp with time zone
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: two_fa_backup_codes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.two_fa_backup_codes_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: two_fa_backup_codes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.two_fa_backup_codes_id_seq OWNED BY public.two_fa_backup_codes.id;
|
||
|
||
|
||
--
|
||
-- Name: two_fas; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.two_fas (
|
||
id bigint NOT NULL,
|
||
user_id bigint NOT NULL,
|
||
secret character varying(255) NOT NULL,
|
||
is_enabled boolean,
|
||
failed_attempts bigint DEFAULT 0,
|
||
locked_until timestamp with time zone,
|
||
last_used_at timestamp with time zone,
|
||
created_at timestamp with time zone,
|
||
updated_at timestamp with time zone,
|
||
deleted_at timestamp with time zone
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: two_fas_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.two_fas_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: two_fas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.two_fas_id_seq OWNED BY public.two_fas.id;
|
||
|
||
|
||
--
|
||
-- Name: user_message_reads; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.user_message_reads (
|
||
id bigint NOT NULL,
|
||
user_id bigint NOT NULL,
|
||
message_id bigint NOT NULL,
|
||
read_at bigint DEFAULT 0 NOT NULL,
|
||
created_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_message_reads.id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_message_reads.id IS '主键ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_message_reads.user_id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_message_reads.user_id IS '用户ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_message_reads.message_id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_message_reads.message_id IS '消息ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_message_reads.read_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_message_reads.read_at IS '已读时间戳';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_message_reads.created_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_message_reads.created_at IS '创建时间戳';
|
||
|
||
|
||
--
|
||
-- Name: user_message_reads_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.user_message_reads_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: user_message_reads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.user_message_reads_id_seq OWNED BY public.user_message_reads.id;
|
||
|
||
|
||
--
|
||
-- Name: user_messages; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.user_messages (
|
||
id bigint NOT NULL,
|
||
receiver_user_id bigint DEFAULT 0,
|
||
receiver_min_role bigint DEFAULT 0,
|
||
type character varying(64),
|
||
title character varying(255) NOT NULL,
|
||
content text NOT NULL,
|
||
biz_type character varying(64),
|
||
biz_id bigint DEFAULT 0,
|
||
is_read boolean DEFAULT false,
|
||
read_at bigint DEFAULT 0,
|
||
created_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_messages.id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_messages.id IS '主键ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_messages.receiver_user_id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_messages.receiver_user_id IS '接收用户ID 0表示广播';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_messages.receiver_min_role; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_messages.receiver_min_role IS '广播最小角色门槛';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_messages.type; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_messages.type IS '消息类型';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_messages.title; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_messages.title IS '消息标题';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_messages.content; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_messages.content IS '消息内容';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_messages.biz_type; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_messages.biz_type IS '业务类型';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_messages.biz_id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_messages.biz_id IS '业务ID';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_messages.is_read; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_messages.is_read IS '是否已读';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_messages.read_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_messages.read_at IS '已读时间戳';
|
||
|
||
|
||
--
|
||
-- Name: COLUMN user_messages.created_at; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.user_messages.created_at IS '创建时间戳';
|
||
|
||
|
||
--
|
||
-- Name: user_messages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.user_messages_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: user_messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.user_messages_id_seq OWNED BY public.user_messages.id;
|
||
|
||
|
||
--
|
||
-- Name: user_oauth_bindings; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.user_oauth_bindings (
|
||
id bigint NOT NULL,
|
||
user_id bigint NOT NULL,
|
||
provider_id bigint NOT NULL,
|
||
provider_user_id character varying(256) NOT NULL,
|
||
created_at timestamp with time zone
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: user_oauth_bindings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.user_oauth_bindings_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: user_oauth_bindings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.user_oauth_bindings_id_seq OWNED BY public.user_oauth_bindings.id;
|
||
|
||
|
||
--
|
||
-- Name: user_subscriptions; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.user_subscriptions (
|
||
id bigint NOT NULL,
|
||
user_id bigint,
|
||
plan_id bigint,
|
||
amount_total bigint DEFAULT 0 NOT NULL,
|
||
amount_used bigint DEFAULT 0 NOT NULL,
|
||
start_time bigint,
|
||
end_time bigint,
|
||
status character varying(32),
|
||
source character varying(32) DEFAULT 'order'::character varying,
|
||
last_reset_time bigint DEFAULT 0,
|
||
next_reset_time bigint DEFAULT 0,
|
||
upgrade_group character varying(64) DEFAULT ''::character varying,
|
||
prev_user_group character varying(64) DEFAULT ''::character varying,
|
||
created_at bigint,
|
||
updated_at bigint
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: user_subscriptions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.user_subscriptions_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: user_subscriptions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.user_subscriptions_id_seq OWNED BY public.user_subscriptions.id;
|
||
|
||
|
||
--
|
||
-- Name: user_tags; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.user_tags (
|
||
id bigint NOT NULL,
|
||
name character varying(64) NOT NULL,
|
||
note character varying(255)
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: user_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.user_tags_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: user_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.user_tags_id_seq OWNED BY public.user_tags.id;
|
||
|
||
|
||
--
|
||
-- Name: users; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.users (
|
||
id bigint NOT NULL,
|
||
created_at timestamp with time zone,
|
||
updated_at timestamp with time zone,
|
||
last_login_at timestamp with time zone,
|
||
created_by character varying(32),
|
||
username text,
|
||
password text NOT NULL,
|
||
display_name text,
|
||
role bigint DEFAULT 1,
|
||
status bigint DEFAULT 1,
|
||
email text,
|
||
phone character varying(20),
|
||
github_id text,
|
||
discord_id text,
|
||
oidc_id text,
|
||
wechat_id text,
|
||
telegram_id text,
|
||
access_token character(32),
|
||
quota bigint DEFAULT 0,
|
||
used_quota bigint DEFAULT 0,
|
||
request_count bigint DEFAULT 0,
|
||
"group" character varying(64) DEFAULT 'default'::character varying,
|
||
aff_code character varying(32),
|
||
aff_count bigint DEFAULT 0,
|
||
aff_quota bigint DEFAULT 0,
|
||
aff_history bigint DEFAULT 0,
|
||
inviter_id bigint,
|
||
distributor_commission_bps bigint DEFAULT 0,
|
||
is_distributor integer DEFAULT 0,
|
||
is_student integer DEFAULT 0,
|
||
student_status integer DEFAULT 0,
|
||
student_applied_at timestamp with time zone,
|
||
student_approved_at timestamp with time zone,
|
||
student_approved_by bigint DEFAULT 0,
|
||
deleted_at timestamp with time zone,
|
||
linux_do_id text,
|
||
setting text,
|
||
remark character varying(255),
|
||
tags character varying(255),
|
||
stripe_customer character varying(64),
|
||
supplier_id bigint DEFAULT 0,
|
||
admin_initial_setup_completed boolean DEFAULT true NOT NULL
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: COLUMN users.supplier_id; Type: COMMENT; Schema: public; Owner: -
|
||
--
|
||
|
||
COMMENT ON COLUMN public.users.supplier_id IS '供应商申请ID 0表示非供应商';
|
||
|
||
|
||
--
|
||
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.users_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
|
||
|
||
|
||
--
|
||
-- Name: vendors; Type: TABLE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE TABLE public.vendors (
|
||
id bigint NOT NULL,
|
||
name character varying(128) NOT NULL,
|
||
description text,
|
||
icon character varying(128),
|
||
status bigint DEFAULT 1,
|
||
created_time bigint,
|
||
updated_time bigint,
|
||
deleted_at timestamp with time zone
|
||
);
|
||
|
||
|
||
--
|
||
-- Name: vendors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE SEQUENCE public.vendors_id_seq
|
||
START WITH 1
|
||
INCREMENT BY 1
|
||
NO MINVALUE
|
||
NO MAXVALUE
|
||
CACHE 1;
|
||
|
||
|
||
--
|
||
-- Name: vendors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER SEQUENCE public.vendors_id_seq OWNED BY public.vendors.id;
|
||
|
||
|
||
--
|
||
-- Name: aff_funnel_daily id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.aff_funnel_daily ALTER COLUMN id SET DEFAULT nextval('public.aff_funnel_daily_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_commission_logs id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.aff_invite_commission_logs ALTER COLUMN id SET DEFAULT nextval('public.aff_invite_commission_logs_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_profit_share_logs id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.aff_invite_profit_share_logs ALTER COLUMN id SET DEFAULT nextval('public.aff_invite_profit_share_logs_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_relations id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.aff_invite_relations ALTER COLUMN id SET DEFAULT nextval('public.aff_invite_relations_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: channels id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.channels ALTER COLUMN id SET DEFAULT nextval('public.channels_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: checkins id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.checkins ALTER COLUMN id SET DEFAULT nextval('public.checkins_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: custom_oauth_providers id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.custom_oauth_providers ALTER COLUMN id SET DEFAULT nextval('public.custom_oauth_providers_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: distributor_applications id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.distributor_applications ALTER COLUMN id SET DEFAULT nextval('public.distributor_applications_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: distributor_withdrawals id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.distributor_withdrawals ALTER COLUMN id SET DEFAULT nextval('public.distributor_withdrawals_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: logs id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.logs ALTER COLUMN id SET DEFAULT nextval('public.logs_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: midjourneys id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.midjourneys ALTER COLUMN id SET DEFAULT nextval('public.midjourneys_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: model_tags id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.model_tags ALTER COLUMN id SET DEFAULT nextval('public.model_tags_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: models id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.models ALTER COLUMN id SET DEFAULT nextval('public.models_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: operation_logs id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.operation_logs ALTER COLUMN id SET DEFAULT nextval('public.operation_logs_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: passkey_credentials id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.passkey_credentials ALTER COLUMN id SET DEFAULT nextval('public.passkey_credentials_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: prefill_groups id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.prefill_groups ALTER COLUMN id SET DEFAULT nextval('public.prefill_groups_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: quota_data id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.quota_data ALTER COLUMN id SET DEFAULT nextval('public.quota_data_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: redemptions id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.redemptions ALTER COLUMN id SET DEFAULT nextval('public.redemptions_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: setups id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.setups ALTER COLUMN id SET DEFAULT nextval('public.setups_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: subscription_orders id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.subscription_orders ALTER COLUMN id SET DEFAULT nextval('public.subscription_orders_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: subscription_plans id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.subscription_plans ALTER COLUMN id SET DEFAULT nextval('public.subscription_plans_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: subscription_pre_consume_records id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.subscription_pre_consume_records ALTER COLUMN id SET DEFAULT nextval('public.subscription_pre_consume_records_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: supplier_application_audits id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.supplier_application_audits ALTER COLUMN id SET DEFAULT nextval('public.supplier_application_audits_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: supplier_applications id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.supplier_applications ALTER COLUMN id SET DEFAULT nextval('public.supplier_applications_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: supplier_capabilities id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.supplier_capabilities ALTER COLUMN id SET DEFAULT nextval('public.supplier_capabilities_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: tasks id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.tasks ALTER COLUMN id SET DEFAULT nextval('public.tasks_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: tokens id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.tokens ALTER COLUMN id SET DEFAULT nextval('public.tokens_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: top_ups id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.top_ups ALTER COLUMN id SET DEFAULT nextval('public.top_ups_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: two_fa_backup_codes id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.two_fa_backup_codes ALTER COLUMN id SET DEFAULT nextval('public.two_fa_backup_codes_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: two_fas id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.two_fas ALTER COLUMN id SET DEFAULT nextval('public.two_fas_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: user_message_reads id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.user_message_reads ALTER COLUMN id SET DEFAULT nextval('public.user_message_reads_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: user_messages id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.user_messages ALTER COLUMN id SET DEFAULT nextval('public.user_messages_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: user_oauth_bindings id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.user_oauth_bindings ALTER COLUMN id SET DEFAULT nextval('public.user_oauth_bindings_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: user_subscriptions id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.user_subscriptions ALTER COLUMN id SET DEFAULT nextval('public.user_subscriptions_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: user_tags id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.user_tags ALTER COLUMN id SET DEFAULT nextval('public.user_tags_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: users id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: vendors id; Type: DEFAULT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.vendors ALTER COLUMN id SET DEFAULT nextval('public.vendors_id_seq'::regclass);
|
||
|
||
|
||
--
|
||
-- Name: abilities abilities_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.abilities
|
||
ADD CONSTRAINT abilities_pkey PRIMARY KEY ("group", model, channel_id);
|
||
|
||
|
||
--
|
||
-- Name: aff_funnel_daily aff_funnel_daily_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.aff_funnel_daily
|
||
ADD CONSTRAINT aff_funnel_daily_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_commission_logs aff_invite_commission_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.aff_invite_commission_logs
|
||
ADD CONSTRAINT aff_invite_commission_logs_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_profit_share_logs aff_invite_profit_share_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.aff_invite_profit_share_logs
|
||
ADD CONSTRAINT aff_invite_profit_share_logs_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: aff_invite_relations aff_invite_relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.aff_invite_relations
|
||
ADD CONSTRAINT aff_invite_relations_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: channels channels_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.channels
|
||
ADD CONSTRAINT channels_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: checkins checkins_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.checkins
|
||
ADD CONSTRAINT checkins_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: custom_oauth_providers custom_oauth_providers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.custom_oauth_providers
|
||
ADD CONSTRAINT custom_oauth_providers_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: distributor_applications distributor_applications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.distributor_applications
|
||
ADD CONSTRAINT distributor_applications_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: distributor_withdrawals distributor_withdrawals_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.distributor_withdrawals
|
||
ADD CONSTRAINT distributor_withdrawals_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: logs logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.logs
|
||
ADD CONSTRAINT logs_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: midjourneys midjourneys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.midjourneys
|
||
ADD CONSTRAINT midjourneys_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: model_tags model_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.model_tags
|
||
ADD CONSTRAINT model_tags_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: model_test_results model_test_results_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.model_test_results
|
||
ADD CONSTRAINT model_test_results_pkey PRIMARY KEY (channel_id, model_name);
|
||
|
||
|
||
--
|
||
-- Name: models models_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.models
|
||
ADD CONSTRAINT models_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: operation_logs operation_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.operation_logs
|
||
ADD CONSTRAINT operation_logs_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: options options_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.options
|
||
ADD CONSTRAINT options_pkey PRIMARY KEY (key);
|
||
|
||
|
||
--
|
||
-- Name: passkey_credentials passkey_credentials_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.passkey_credentials
|
||
ADD CONSTRAINT passkey_credentials_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: prefill_groups prefill_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.prefill_groups
|
||
ADD CONSTRAINT prefill_groups_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: quota_data quota_data_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.quota_data
|
||
ADD CONSTRAINT quota_data_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: redemptions redemptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.redemptions
|
||
ADD CONSTRAINT redemptions_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: setups setups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.setups
|
||
ADD CONSTRAINT setups_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: subscription_orders subscription_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.subscription_orders
|
||
ADD CONSTRAINT subscription_orders_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: subscription_plans subscription_plans_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.subscription_plans
|
||
ADD CONSTRAINT subscription_plans_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: subscription_pre_consume_records subscription_pre_consume_records_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.subscription_pre_consume_records
|
||
ADD CONSTRAINT subscription_pre_consume_records_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: supplier_application_audits supplier_application_audits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.supplier_application_audits
|
||
ADD CONSTRAINT supplier_application_audits_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: supplier_applications supplier_applications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.supplier_applications
|
||
ADD CONSTRAINT supplier_applications_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: supplier_capabilities supplier_capabilities_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.supplier_capabilities
|
||
ADD CONSTRAINT supplier_capabilities_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: tasks tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.tasks
|
||
ADD CONSTRAINT tasks_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: tokens tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.tokens
|
||
ADD CONSTRAINT tokens_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: top_ups top_ups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.top_ups
|
||
ADD CONSTRAINT top_ups_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: two_fa_backup_codes two_fa_backup_codes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.two_fa_backup_codes
|
||
ADD CONSTRAINT two_fa_backup_codes_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: two_fas two_fas_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.two_fas
|
||
ADD CONSTRAINT two_fas_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: subscription_orders uni_subscription_orders_trade_no; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.subscription_orders
|
||
ADD CONSTRAINT uni_subscription_orders_trade_no UNIQUE (trade_no);
|
||
|
||
|
||
--
|
||
-- Name: top_ups uni_top_ups_trade_no; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.top_ups
|
||
ADD CONSTRAINT uni_top_ups_trade_no UNIQUE (trade_no);
|
||
|
||
|
||
--
|
||
-- Name: two_fas uni_two_fas_user_id; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.two_fas
|
||
ADD CONSTRAINT uni_two_fas_user_id UNIQUE (user_id);
|
||
|
||
|
||
--
|
||
-- Name: users uni_users_username; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.users
|
||
ADD CONSTRAINT uni_users_username UNIQUE (username);
|
||
|
||
|
||
--
|
||
-- Name: user_message_reads user_message_reads_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.user_message_reads
|
||
ADD CONSTRAINT user_message_reads_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: user_messages user_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.user_messages
|
||
ADD CONSTRAINT user_messages_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: user_oauth_bindings user_oauth_bindings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.user_oauth_bindings
|
||
ADD CONSTRAINT user_oauth_bindings_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: user_subscriptions user_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.user_subscriptions
|
||
ADD CONSTRAINT user_subscriptions_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: user_tags user_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.user_tags
|
||
ADD CONSTRAINT user_tags_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.users
|
||
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: vendors vendors_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
--
|
||
|
||
ALTER TABLE ONLY public.vendors
|
||
ADD CONSTRAINT vendors_pkey PRIMARY KEY (id);
|
||
|
||
|
||
--
|
||
-- Name: idx_abilities_channel_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_abilities_channel_id ON public.abilities USING btree (channel_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_abilities_priority; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_abilities_priority ON public.abilities USING btree (priority);
|
||
|
||
|
||
--
|
||
-- Name: idx_abilities_tag; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_abilities_tag ON public.abilities USING btree (tag);
|
||
|
||
|
||
--
|
||
-- Name: idx_abilities_weight; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_abilities_weight ON public.abilities USING btree (weight);
|
||
|
||
|
||
--
|
||
-- Name: idx_aff_comm_inv_inv; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_aff_comm_inv_inv ON public.aff_invite_commission_logs USING btree (inviter_id, invitee_user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_aff_funnel_inv_date; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_aff_funnel_inv_date ON public.aff_funnel_daily USING btree (inviter_id, stat_date);
|
||
|
||
|
||
--
|
||
-- Name: idx_aff_funnel_inv_day; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_aff_funnel_inv_day ON public.aff_funnel_daily USING btree (inviter_id, stat_date);
|
||
|
||
|
||
--
|
||
-- Name: idx_aff_inv_pair; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_aff_inv_pair ON public.aff_invite_relations USING btree (inviter_id, invitee_user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_aff_invite_commission_logs_created_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_aff_invite_commission_logs_created_at ON public.aff_invite_commission_logs USING btree (created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_aff_invite_commission_logs_invitee_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_aff_invite_commission_logs_invitee_user_id ON public.aff_invite_commission_logs USING btree (invitee_user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_aff_invite_profit_share_logs_created_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_aff_invite_profit_share_logs_created_at ON public.aff_invite_profit_share_logs USING btree (created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_aff_invite_profit_share_logs_invitee_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_aff_invite_profit_share_logs_invitee_user_id ON public.aff_invite_profit_share_logs USING btree (invitee_user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_aff_ps_inv_inv; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_aff_ps_inv_inv ON public.aff_invite_profit_share_logs USING btree (inviter_id, invitee_user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_channels_channel_no; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_channels_channel_no ON public.channels USING btree (channel_no);
|
||
|
||
|
||
--
|
||
-- Name: idx_channels_name; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_channels_name ON public.channels USING btree (name);
|
||
|
||
|
||
--
|
||
-- Name: idx_channels_owner_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_channels_owner_user_id ON public.channels USING btree (owner_user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_channels_route_slug; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_channels_route_slug ON public.channels USING btree (route_slug);
|
||
|
||
|
||
--
|
||
-- Name: idx_channels_supplier_application_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_channels_supplier_application_id ON public.channels USING btree (supplier_application_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_channels_tag; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_channels_tag ON public.channels USING btree (tag);
|
||
|
||
|
||
--
|
||
-- Name: idx_created_at_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_created_at_id ON public.logs USING btree (id, created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_created_at_type; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_created_at_type ON public.logs USING btree (created_at, type);
|
||
|
||
|
||
--
|
||
-- Name: idx_custom_oauth_providers_slug; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_custom_oauth_providers_slug ON public.custom_oauth_providers USING btree (slug);
|
||
|
||
|
||
--
|
||
-- Name: idx_dist_app_status; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_dist_app_status ON public.distributor_applications USING btree (status);
|
||
|
||
|
||
--
|
||
-- Name: idx_dist_app_user; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_dist_app_user ON public.distributor_applications USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_dist_wd_status; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_dist_wd_status ON public.distributor_withdrawals USING btree (status);
|
||
|
||
|
||
--
|
||
-- Name: idx_dist_wd_user; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_dist_wd_user ON public.distributor_withdrawals USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_distributor_withdrawals_created_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_distributor_withdrawals_created_at ON public.distributor_withdrawals USING btree (created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_logs_channel_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_logs_channel_id ON public.logs USING btree (channel_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_logs_group; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_logs_group ON public.logs USING btree ("group");
|
||
|
||
|
||
--
|
||
-- Name: idx_logs_ip; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_logs_ip ON public.logs USING btree (ip);
|
||
|
||
|
||
--
|
||
-- Name: idx_logs_model_name; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_logs_model_name ON public.logs USING btree (model_name);
|
||
|
||
|
||
--
|
||
-- Name: idx_logs_request_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_logs_request_id ON public.logs USING btree (request_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_logs_token_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_logs_token_id ON public.logs USING btree (token_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_logs_token_name; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_logs_token_name ON public.logs USING btree (token_name);
|
||
|
||
|
||
--
|
||
-- Name: idx_logs_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_logs_user_id ON public.logs USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_logs_username; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_logs_username ON public.logs USING btree (username);
|
||
|
||
|
||
--
|
||
-- Name: idx_midjourneys_action; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_midjourneys_action ON public.midjourneys USING btree (action);
|
||
|
||
|
||
--
|
||
-- Name: idx_midjourneys_finish_time; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_midjourneys_finish_time ON public.midjourneys USING btree (finish_time);
|
||
|
||
|
||
--
|
||
-- Name: idx_midjourneys_mj_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_midjourneys_mj_id ON public.midjourneys USING btree (mj_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_midjourneys_progress; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_midjourneys_progress ON public.midjourneys USING btree (progress);
|
||
|
||
|
||
--
|
||
-- Name: idx_midjourneys_start_time; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_midjourneys_start_time ON public.midjourneys USING btree (start_time);
|
||
|
||
|
||
--
|
||
-- Name: idx_midjourneys_status; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_midjourneys_status ON public.midjourneys USING btree (status);
|
||
|
||
|
||
--
|
||
-- Name: idx_midjourneys_submit_time; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_midjourneys_submit_time ON public.midjourneys USING btree (submit_time);
|
||
|
||
|
||
--
|
||
-- Name: idx_midjourneys_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_midjourneys_user_id ON public.midjourneys USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_models_deleted_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_models_deleted_at ON public.models USING btree (deleted_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_models_owner_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_models_owner_user_id ON public.models USING btree (owner_user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_models_supplier_application_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_models_supplier_application_id ON public.models USING btree (supplier_application_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_models_vendor_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_models_vendor_id ON public.models USING btree (vendor_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_mtr_channel_model; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_mtr_channel_model ON public.model_test_results USING btree (channel_id, model_name);
|
||
|
||
|
||
--
|
||
-- Name: idx_operation_logs_action; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_operation_logs_action ON public.operation_logs USING btree (action);
|
||
|
||
|
||
--
|
||
-- Name: idx_operation_logs_ip; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_operation_logs_ip ON public.operation_logs USING btree (ip);
|
||
|
||
|
||
--
|
||
-- Name: idx_operation_logs_target_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_operation_logs_target_id ON public.operation_logs USING btree (target_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_operation_logs_target_type; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_operation_logs_target_type ON public.operation_logs USING btree (target_type);
|
||
|
||
|
||
--
|
||
-- Name: idx_operation_logs_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_operation_logs_user_id ON public.operation_logs USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_operation_logs_username; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_operation_logs_username ON public.operation_logs USING btree (username);
|
||
|
||
|
||
--
|
||
-- Name: idx_oplog_created_at_action; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_oplog_created_at_action ON public.operation_logs USING btree (created_at, action);
|
||
|
||
|
||
--
|
||
-- Name: idx_oplog_created_at_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_oplog_created_at_id ON public.operation_logs USING btree (id, created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_oplog_user_id_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_oplog_user_id_id ON public.operation_logs USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_passkey_credentials_credential_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_passkey_credentials_credential_id ON public.passkey_credentials USING btree (credential_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_passkey_credentials_deleted_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_passkey_credentials_deleted_at ON public.passkey_credentials USING btree (deleted_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_passkey_credentials_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_passkey_credentials_user_id ON public.passkey_credentials USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_prefill_groups_deleted_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_prefill_groups_deleted_at ON public.prefill_groups USING btree (deleted_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_prefill_groups_type; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_prefill_groups_type ON public.prefill_groups USING btree (type);
|
||
|
||
|
||
--
|
||
-- Name: idx_qdt_created_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_qdt_created_at ON public.quota_data USING btree (created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_qdt_model_user_name; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_qdt_model_user_name ON public.quota_data USING btree (model_name, username);
|
||
|
||
|
||
--
|
||
-- Name: idx_quota_data_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_quota_data_user_id ON public.quota_data USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_redemptions_deleted_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_redemptions_deleted_at ON public.redemptions USING btree (deleted_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_redemptions_key; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_redemptions_key ON public.redemptions USING btree (key);
|
||
|
||
|
||
--
|
||
-- Name: idx_redemptions_name; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_redemptions_name ON public.redemptions USING btree (name);
|
||
|
||
|
||
--
|
||
-- Name: idx_subscription_orders_plan_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_subscription_orders_plan_id ON public.subscription_orders USING btree (plan_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_subscription_orders_trade_no; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_subscription_orders_trade_no ON public.subscription_orders USING btree (trade_no);
|
||
|
||
|
||
--
|
||
-- Name: idx_subscription_orders_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_subscription_orders_user_id ON public.subscription_orders USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_subscription_pre_consume_records_request_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_subscription_pre_consume_records_request_id ON public.subscription_pre_consume_records USING btree (request_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_subscription_pre_consume_records_status; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_subscription_pre_consume_records_status ON public.subscription_pre_consume_records USING btree (status);
|
||
|
||
|
||
--
|
||
-- Name: idx_subscription_pre_consume_records_updated_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_subscription_pre_consume_records_updated_at ON public.subscription_pre_consume_records USING btree (updated_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_subscription_pre_consume_records_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_subscription_pre_consume_records_user_id ON public.subscription_pre_consume_records USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_subscription_pre_consume_records_user_subscription_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_subscription_pre_consume_records_user_subscription_id ON public.subscription_pre_consume_records USING btree (user_subscription_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_application_audits_action; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_supplier_application_audits_action ON public.supplier_application_audits USING btree (action);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_application_audits_application_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_supplier_application_audits_application_id ON public.supplier_application_audits USING btree (application_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_application_audits_created_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_supplier_application_audits_created_at ON public.supplier_application_audits USING btree (created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_application_audits_operator_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_supplier_application_audits_operator_user_id ON public.supplier_application_audits USING btree (operator_user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_applications_applicant_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_supplier_applications_applicant_user_id ON public.supplier_applications USING btree (applicant_user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_applications_created_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_supplier_applications_created_at ON public.supplier_applications USING btree (created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_applications_credit_code; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_supplier_applications_credit_code ON public.supplier_applications USING btree (credit_code);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_applications_reviewed_by; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_supplier_applications_reviewed_by ON public.supplier_applications USING btree (reviewed_by);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_applications_status; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_supplier_applications_status ON public.supplier_applications USING btree (status);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_applications_supplier_alias; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_supplier_applications_supplier_alias ON public.supplier_applications USING btree (supplier_alias);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_capabilities_created_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_supplier_capabilities_created_at ON public.supplier_capabilities USING btree (created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_supplier_capabilities_supplier_application_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_supplier_capabilities_supplier_application_id ON public.supplier_capabilities USING btree (supplier_application_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_tasks_action; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tasks_action ON public.tasks USING btree (action);
|
||
|
||
|
||
--
|
||
-- Name: idx_tasks_channel_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tasks_channel_id ON public.tasks USING btree (channel_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_tasks_created_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tasks_created_at ON public.tasks USING btree (created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_tasks_finish_time; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tasks_finish_time ON public.tasks USING btree (finish_time);
|
||
|
||
|
||
--
|
||
-- Name: idx_tasks_platform; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tasks_platform ON public.tasks USING btree (platform);
|
||
|
||
|
||
--
|
||
-- Name: idx_tasks_progress; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tasks_progress ON public.tasks USING btree (progress);
|
||
|
||
|
||
--
|
||
-- Name: idx_tasks_start_time; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tasks_start_time ON public.tasks USING btree (start_time);
|
||
|
||
|
||
--
|
||
-- Name: idx_tasks_status; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tasks_status ON public.tasks USING btree (status);
|
||
|
||
|
||
--
|
||
-- Name: idx_tasks_submit_time; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tasks_submit_time ON public.tasks USING btree (submit_time);
|
||
|
||
|
||
--
|
||
-- Name: idx_tasks_task_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tasks_task_id ON public.tasks USING btree (task_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_tasks_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tasks_user_id ON public.tasks USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_tokens_deleted_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tokens_deleted_at ON public.tokens USING btree (deleted_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_tokens_key; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_tokens_key ON public.tokens USING btree (key);
|
||
|
||
|
||
--
|
||
-- Name: idx_tokens_name; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tokens_name ON public.tokens USING btree (name);
|
||
|
||
|
||
--
|
||
-- Name: idx_tokens_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_tokens_user_id ON public.tokens USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_top_ups_trade_no; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_top_ups_trade_no ON public.top_ups USING btree (trade_no);
|
||
|
||
|
||
--
|
||
-- Name: idx_top_ups_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_top_ups_user_id ON public.top_ups USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_two_fa_backup_codes_deleted_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_two_fa_backup_codes_deleted_at ON public.two_fa_backup_codes USING btree (deleted_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_two_fa_backup_codes_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_two_fa_backup_codes_user_id ON public.two_fa_backup_codes USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_two_fas_deleted_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_two_fas_deleted_at ON public.two_fas USING btree (deleted_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_two_fas_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_two_fas_user_id ON public.two_fas USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_checkin_date; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_user_checkin_date ON public.checkins USING btree (user_id, checkin_date);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_id_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_id_id ON public.logs USING btree (user_id, id);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_message_reads_created_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_message_reads_created_at ON public.user_message_reads USING btree (created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_message_reads_user_message; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_user_message_reads_user_message ON public.user_message_reads USING btree (user_id, message_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_messages_biz_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_messages_biz_id ON public.user_messages USING btree (biz_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_messages_biz_type; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_messages_biz_type ON public.user_messages USING btree (biz_type);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_messages_created_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_messages_created_at ON public.user_messages USING btree (created_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_messages_is_read; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_messages_is_read ON public.user_messages USING btree (is_read);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_messages_receiver_min_role; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_messages_receiver_min_role ON public.user_messages USING btree (receiver_min_role);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_messages_receiver_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_messages_receiver_user_id ON public.user_messages USING btree (receiver_user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_messages_type; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_messages_type ON public.user_messages USING btree (type);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_sub_active; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_sub_active ON public.user_subscriptions USING btree (user_id, status, end_time);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_subscriptions_end_time; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_subscriptions_end_time ON public.user_subscriptions USING btree (end_time);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_subscriptions_next_reset_time; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_subscriptions_next_reset_time ON public.user_subscriptions USING btree (next_reset_time);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_subscriptions_plan_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_subscriptions_plan_id ON public.user_subscriptions USING btree (plan_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_subscriptions_status; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_subscriptions_status ON public.user_subscriptions USING btree (status);
|
||
|
||
|
||
--
|
||
-- Name: idx_user_subscriptions_user_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_user_subscriptions_user_id ON public.user_subscriptions USING btree (user_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_access_token; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_users_access_token ON public.users USING btree (access_token);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_aff_code; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX idx_users_aff_code ON public.users USING btree (aff_code);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_deleted_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_deleted_at ON public.users USING btree (deleted_at);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_discord_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_discord_id ON public.users USING btree (discord_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_display_name; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_display_name ON public.users USING btree (display_name);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_email; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_email ON public.users USING btree (email);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_git_hub_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_git_hub_id ON public.users USING btree (github_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_inviter_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_inviter_id ON public.users USING btree (inviter_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_is_distributor; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_is_distributor ON public.users USING btree (is_distributor);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_is_student; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_is_student ON public.users USING btree (is_student);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_linux_do_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_linux_do_id ON public.users USING btree (linux_do_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_oidc_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_oidc_id ON public.users USING btree (oidc_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_phone; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_phone ON public.users USING btree (phone);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_stripe_customer; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_stripe_customer ON public.users USING btree (stripe_customer);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_student_approved_by; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_student_approved_by ON public.users USING btree (student_approved_by);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_student_status; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_student_status ON public.users USING btree (student_status);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_supplier_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_supplier_id ON public.users USING btree (supplier_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_telegram_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_telegram_id ON public.users USING btree (telegram_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_username; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_username ON public.users USING btree (username);
|
||
|
||
|
||
--
|
||
-- Name: idx_users_we_chat_id; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_users_we_chat_id ON public.users USING btree (wechat_id);
|
||
|
||
|
||
--
|
||
-- Name: idx_vendors_deleted_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX idx_vendors_deleted_at ON public.vendors USING btree (deleted_at);
|
||
|
||
|
||
--
|
||
-- Name: index_username_model_name; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE INDEX index_username_model_name ON public.logs USING btree (model_name, username);
|
||
|
||
|
||
--
|
||
-- Name: uk_model_name_delete_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX uk_model_name_delete_at ON public.models USING btree (model_name, deleted_at);
|
||
|
||
|
||
--
|
||
-- Name: uk_model_tag_name; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX uk_model_tag_name ON public.model_tags USING btree (name);
|
||
|
||
|
||
--
|
||
-- Name: uk_prefill_name; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX uk_prefill_name ON public.prefill_groups USING btree (name) WHERE (deleted_at IS NULL);
|
||
|
||
|
||
--
|
||
-- Name: uk_user_tag_name; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX uk_user_tag_name ON public.user_tags USING btree (name);
|
||
|
||
|
||
--
|
||
-- Name: uk_vendor_name_delete_at; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX uk_vendor_name_delete_at ON public.vendors USING btree (name, deleted_at);
|
||
|
||
|
||
--
|
||
-- Name: ux_provider_userid; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX ux_provider_userid ON public.user_oauth_bindings USING btree (provider_id, provider_user_id);
|
||
|
||
|
||
--
|
||
-- Name: ux_user_provider; Type: INDEX; Schema: public; Owner: -
|
||
--
|
||
|
||
CREATE UNIQUE INDEX ux_user_provider ON public.user_oauth_bindings USING btree (user_id, provider_id);
|
||
|
||
|
||
--
|
||
-- PostgreSQL database dump complete
|
||
--
|
||
|
||
\unrestrict qy7tTjoVIORd7vs81jEgGX6wUmYwfBrjR2hEfC0xOsibuObwE3rGsnQOGsO6aqU
|
||
|