20260706170339

This commit is contained in:
oneao committed 2026-07-06 17:03:39 +08:00
1 parent ae99f50f6d
commit 4d1e6c8b8f
50 files changed
+3045 -2249

No files matched your search

+38 -21
View File
@@ -1,4 +1,5 @@
drop table if exists b_clothing_tag_relation;
drop table if exists b_clothing_clothes_tag;
drop table if exists b_clothing_outfit_tag;
drop table if exists b_clothing_outfit_clothes;
drop table if exists b_clothing_tag;
drop table if exists b_clothing_category;
@@ -16,8 +17,8 @@ create table b_clothing_clothes (
remark varchar(512) default '',
sort_number int not null default 0,
status smallint not null default 1,
create_time timestamp,
update_time timestamp,
create_time timestamptz,
update_time timestamptz,
create_by bigint,
update_by bigint
);
@@ -33,8 +34,8 @@ create table b_clothing_outfit (
remark varchar(512) default '',
sort_number int not null default 0,
status smallint not null default 1,
create_time timestamp,
update_time timestamp,
create_time timestamptz,
update_time timestamptz,
create_by bigint,
update_by bigint
);
@@ -50,8 +51,8 @@ create table b_clothing_outfit_clothes (
height numeric(8, 6) not null default 0,
z_index int not null default 0,
sort_number int not null default 0,
create_time timestamp,
update_time timestamp,
create_time timestamptz,
update_time timestamptz,
create_by bigint,
update_by bigint
);
@@ -63,8 +64,8 @@ create table b_clothing_category (
type smallint not null,
sort_number int not null default 0,
status smallint not null default 1,
create_time timestamp,
update_time timestamp,
create_time timestamptz,
update_time timestamptz,
create_by bigint,
update_by bigint
);
@@ -72,26 +73,36 @@ create table b_clothing_category (
create table b_clothing_tag (
id bigint primary key,
family_id bigint not null,
parent_id bigint not null default 0,
parent_id bigint,
name varchar(32) not null,
type smallint not null,
color varchar(7) default '',
sort_number int not null default 0,
status smallint not null default 1,
create_time timestamp,
update_time timestamp,
create_time timestamptz,
update_time timestamptz,
create_by bigint,
update_by bigint
);
create table b_clothing_tag_relation (
create table b_clothing_clothes_tag (
id bigint primary key,
family_id bigint not null,
target_type smallint not null,
target_id bigint not null,
clothes_id bigint not null,
tag_id bigint not null,
create_time timestamp,
update_time timestamp,
create_time timestamptz,
update_time timestamptz,
create_by bigint,
update_by bigint
);
create table b_clothing_outfit_tag (
id bigint primary key,
family_id bigint not null,
outfit_id bigint not null,
tag_id bigint not null,
create_time timestamptz,
update_time timestamptz,
create_by bigint,
update_by bigint
);
@@ -120,8 +131,14 @@ create index idx_b_clothing_category_family_type
create index idx_b_clothing_tag_family_parent
on b_clothing_tag (family_id, status, type, parent_id, sort_number, id);
create index idx_b_clothing_tag_relation_target
on b_clothing_tag_relation (family_id, target_type, target_id, tag_id);
create index idx_b_clothing_clothes_tag_clothes
on b_clothing_clothes_tag (family_id, clothes_id, tag_id);
create index idx_b_clothing_tag_relation_tag
on b_clothing_tag_relation (family_id, tag_id, target_type, target_id);
create index idx_b_clothing_clothes_tag_tag
on b_clothing_clothes_tag (family_id, tag_id, clothes_id);
create index idx_b_clothing_outfit_tag_outfit
on b_clothing_outfit_tag (family_id, outfit_id, tag_id);
create index idx_b_clothing_outfit_tag_tag
on b_clothing_outfit_tag (family_id, tag_id, outfit_id);