fix:分享
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
DROP TABLE IF EXISTS `outfit_share_receivers`;
|
||||
DROP TABLE IF EXISTS `outfit_shares`;
|
||||
@@ -0,0 +1,31 @@
|
||||
CREATE TABLE `outfit_shares` (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`created_at` BIGINT NOT NULL DEFAULT 0 COMMENT '创建时间',
|
||||
`updated_at` BIGINT NOT NULL DEFAULT 0 COMMENT '更新时间',
|
||||
`deleted_at` BIGINT NOT NULL DEFAULT 0 COMMENT '删除时间(0 表示未删除)',
|
||||
`created_by` BIGINT NOT NULL DEFAULT 0 COMMENT '创建人',
|
||||
`updated_by` BIGINT NOT NULL DEFAULT 0 COMMENT '更新人',
|
||||
`deleted_by` BIGINT NOT NULL DEFAULT 0 COMMENT '删除人',
|
||||
`share_uuid` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '分享UUID',
|
||||
`user_id` BIGINT NOT NULL DEFAULT 0 COMMENT '所属用户ID',
|
||||
`outfit_id` BIGINT NOT NULL DEFAULT 0 COMMENT '穿搭ID',
|
||||
`status` TINYINT NOT NULL DEFAULT 0 COMMENT '分享状态 1=正常 2=用户取消',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_outfit_shares_uuid` (`share_uuid`),
|
||||
KEY `idx_outfit_shares_user_status` (`user_id`, `status`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '穿搭分享表';
|
||||
|
||||
CREATE TABLE `outfit_share_receivers` (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`created_at` BIGINT NOT NULL DEFAULT 0 COMMENT '创建时间',
|
||||
`updated_at` BIGINT NOT NULL DEFAULT 0 COMMENT '更新时间',
|
||||
`deleted_at` BIGINT NOT NULL DEFAULT 0 COMMENT '删除时间(0 表示未删除)',
|
||||
`created_by` BIGINT NOT NULL DEFAULT 0 COMMENT '创建人',
|
||||
`updated_by` BIGINT NOT NULL DEFAULT 0 COMMENT '更新人',
|
||||
`deleted_by` BIGINT NOT NULL DEFAULT 0 COMMENT '删除人',
|
||||
`share_uuid` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '分享UUID',
|
||||
`receiver_user_id` BIGINT NOT NULL DEFAULT 0 COMMENT '接收人用户ID',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_outfit_share_receiver` (`share_uuid`, `receiver_user_id`),
|
||||
KEY `idx_outfit_share_receivers_user` (`receiver_user_id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '穿搭分享接收人关联表';
|
||||
Reference in New Issue
Block a user