20260703173210
This commit is contained in:
1 parent
d0f7f0d3d8
commit
3556d5e8c1
15 files changed
+853
-143
No files matched your search
@@ -1,7 +1,6 @@
|
||||
drop table if exists b_clothing_tag_relation;
|
||||
drop table if exists b_clothing_outfit_clothes;
|
||||
drop table if exists b_clothing_tag;
|
||||
drop table if exists b_clothing_tag_group;
|
||||
drop table if exists b_clothing_category;
|
||||
drop table if exists b_clothing_outfit;
|
||||
drop table if exists b_clothing_clothes;
|
||||
@@ -12,6 +11,7 @@ create table b_clothing_clothes (
|
||||
name varchar(64) not null,
|
||||
image_file_key varchar(512) not null,
|
||||
category_id bigint,
|
||||
owner_id bigint,
|
||||
brand varchar(64) default '',
|
||||
remark varchar(512) default '',
|
||||
sort_number int not null default 0,
|
||||
@@ -29,6 +29,7 @@ create table b_clothing_outfit (
|
||||
cover_file_key varchar(512) default '',
|
||||
layout_json jsonb,
|
||||
category_id bigint,
|
||||
owner_id bigint,
|
||||
remark varchar(512) default '',
|
||||
sort_number int not null default 0,
|
||||
status smallint not null default 1,
|
||||
@@ -68,23 +69,10 @@ create table b_clothing_category (
|
||||
update_by bigint
|
||||
);
|
||||
|
||||
create table b_clothing_tag_group (
|
||||
id bigint primary key,
|
||||
family_id bigint not null,
|
||||
name varchar(32) not null,
|
||||
type smallint not null,
|
||||
sort_number int not null default 0,
|
||||
status smallint not null default 1,
|
||||
create_time timestamp,
|
||||
update_time timestamp,
|
||||
create_by bigint,
|
||||
update_by bigint
|
||||
);
|
||||
|
||||
create table b_clothing_tag (
|
||||
id bigint primary key,
|
||||
family_id bigint not null,
|
||||
tag_group_id bigint not null,
|
||||
parent_id bigint not null default 0,
|
||||
name varchar(32) not null,
|
||||
type smallint not null,
|
||||
color varchar(7) default '',
|
||||
@@ -111,9 +99,15 @@ create table b_clothing_tag_relation (
|
||||
create index idx_b_clothing_clothes_family_status_category
|
||||
on b_clothing_clothes (family_id, status, category_id, sort_number, id);
|
||||
|
||||
create index idx_b_clothing_clothes_family_owner
|
||||
on b_clothing_clothes (family_id, owner_id, id);
|
||||
|
||||
create index idx_b_clothing_outfit_family_status_category
|
||||
on b_clothing_outfit (family_id, status, category_id, sort_number, id);
|
||||
|
||||
create index idx_b_clothing_outfit_family_owner
|
||||
on b_clothing_outfit (family_id, owner_id, id);
|
||||
|
||||
create index idx_b_clothing_outfit_clothes_outfit
|
||||
on b_clothing_outfit_clothes (outfit_id, z_index, sort_number, id);
|
||||
|
||||
@@ -123,11 +117,8 @@ create index idx_b_clothing_outfit_clothes_clothes
|
||||
create index idx_b_clothing_category_family_type
|
||||
on b_clothing_category (family_id, status, type, sort_number, id);
|
||||
|
||||
create index idx_b_clothing_tag_group_family_type
|
||||
on b_clothing_tag_group (family_id, status, type, sort_number, id);
|
||||
|
||||
create index idx_b_clothing_tag_family_group
|
||||
on b_clothing_tag (family_id, status, type, tag_group_id, sort_number, id);
|
||||
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);
|
||||
|
||||
Reference in new issue
Block a user