-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c8305b
commit 61c10c4
Showing
5 changed files
with
189 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-- 문의하기 | ||
CREATE TABLE `discussion` | ||
( | ||
`id` bigint NOT NULL AUTO_INCREMENT, | ||
`uid` bigint NOT NULL COMMENT 'uid', | ||
`type` varchar(32) NOT NULL COMMENT '문의하기 유형', | ||
`title` varchar(512) NOT NULL COMMENT '문의하기 제목', | ||
`content` text NOT NULL COMMENT '문의하기 본문', | ||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '생성일', | ||
`modified_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '수정일', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=200000 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | ||
CREATE INDEX idx__uid ON discussion (uid); | ||
|
||
-- 문의하기 답변 | ||
CREATE TABLE `discussion_comment` | ||
( | ||
`id` bigint NOT NULL AUTO_INCREMENT, | ||
`uid` bigint NOT NULL COMMENT 'uid', | ||
`discussion_id` bigint NOT NULL COMMENT 'discussion_id', | ||
`title` varchar(512) NOT NULL COMMENT '답변 제목', | ||
`content` text NOT NULL COMMENT '답변 본문', | ||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '생성일', | ||
`modified_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '수정일', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=200000 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | ||
CREATE INDEX idx__discussion_id ON discussion_comment (discussion_id); | ||
CREATE INDEX idx__uid ON discussion_comment (uid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
-- 그룹 | ||
CREATE TABLE `group` | ||
( | ||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'group id', | ||
`name` varchar(32) NOT NULL COMMENT '그룹명', | ||
`description` varchar(512) DEFAULT NULL COMMENT '그룹 설명', | ||
`owner_uid` bigint NOT NULL COMMENT 'owner uid', | ||
`is_hidden` tinyint NOT NULL DEFAULT 0 COMMENT '숨김 여부', | ||
`join_code` varchar(128) DEFAULT NULL COMMENT '참여코드', | ||
`user_count` int NOT NULL DEFAULT 1 COMMENT '그룹원 수', | ||
`user_capacity` int NOT NULL DEFAULT 0 COMMENT '그룹원 정원', | ||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '생성일', | ||
`modified_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '수정일', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=200000 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='그룹'; | ||
|
||
CREATE UNIQUE INDEX uidx__name ON `group` (name); | ||
CREATE INDEX idx__owner_uid ON `group` (owner_uid); | ||
CREATE INDEX idx__join_code ON `group` (join_code); | ||
|
||
-- 그룹 유저 | ||
CREATE TABLE `group_user` | ||
( | ||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'group user id', | ||
`group_id` bigint NOT NULL COMMENT 'group id', | ||
`uid` bigint NOT NULL COMMENT 'uid', | ||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '생성일', | ||
`modified_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '수정일', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=200000 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='그룹 유저'; | ||
CREATE UNIQUE INDEX uidx__group_id__uid ON group_user (group_id, uid); | ||
CREATE INDEX idx__uid ON group_user (uid); | ||
|
||
-- 그룹 유저 스코어 | ||
CREATE TABLE `group_user_score` | ||
( | ||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'group user score id', | ||
`group_id` bigint NOT NULL COMMENT 'group id', | ||
`group_user_id` bigint NOT NULL COMMENT 'group user id', | ||
`uid` bigint NOT NULL COMMENT 'uid', | ||
`score` int DEFAULT NULL COMMENT '스코어', | ||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '생성일', | ||
`modified_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '수정일', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=200000 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='그룹 유저 스코어'; | ||
CREATE UNIQUE INDEX uidx__group_user_id ON group_user_score (group_user_id); | ||
CREATE INDEX idx__group_id__group_user_id ON group_user_score (group_id, group_user_id); | ||
CREATE INDEX idx__uid ON group_user_score (uid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
-- 포즈 스냅샵 | ||
CREATE TABLE `pose_snapshot` | ||
( | ||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'pose snapshot id', | ||
`uid` bigint NOT NULL COMMENT 'uid', | ||
`score` DECIMAL(20, 16) NOT NULL COMMENT '포즈 신뢰도 종합', | ||
`type` VARCHAR(32) NOT NULL COMMENT '포즈 타입', | ||
`image_url` VARCHAR(512) NOT NULL COMMENT '포즈 이미지 url', | ||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '생성일', | ||
`modified_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '수정일', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='포즈 스냅샷'; | ||
CREATE INDEX idx__uid ON pose_snapshot (uid); | ||
CREATE INDEX idx__created_at ON pose_snapshot (created_at); | ||
|
||
-- 포즈 key point 스냅샷 | ||
CREATE TABLE `pose_key_point_snapshot` | ||
( | ||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'pose key point snapshot id', | ||
`pose_snapshot_id` bigint NOT NULL COMMENT 'post snapshot id', | ||
`position` VARCHAR(32) NOT NULL COMMENT '스냅샷 위치', | ||
`x` DECIMAL(20, 16) NOT NULL COMMENT 'x 좌표', | ||
`y` DECIMAL(20, 16) NOT NULL COMMENT 'y 좌표', | ||
`confidence` DECIMAL(20, 16) NOT NULL COMMENT '신뢰도' | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='포즈 key point'; | ||
CREATE INDEX uidx__pose_snapshot_id__position ON pose_key_point_snapshot (pose_snapshot_id, position); | ||
|
||
-- 포즈 카운트 집계 | ||
CREATE TABLE `pose_count` | ||
( | ||
`id` bigint NOT NULL AUTO_INCREMENT, | ||
`uid` bigint NOT NULL COMMENT 'uid', | ||
`total_count` text NOT NULL COMMENT '집계 데이터', | ||
`date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '기준 날짜', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; | ||
CREATE INDEX idx__uid__date ON pose_count (uid, date); | ||
CREATE INDEX idx__date ON pose_count (date); | ||
|
||
-- 자세 알림 | ||
CREATE TABLE `pose_noti` | ||
( | ||
`id` bigint NOT NULL AUTO_INCREMENT, | ||
`uid` bigint NOT NULL COMMENT 'uid', | ||
`is_active` tinyint NOT NULL DEFAULT 0 COMMENT '활성화 여부', | ||
`duration` varchar(32) NOT NULL COMMENT '알림 주기', | ||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '생성일', | ||
`modified_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '수정일', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT '자세 알림'; | ||
CREATE INDEX uidx__uid ON pose_noti (uid); | ||
|
||
-- 포즈 레이아웃 | ||
CREATE TABLE `pose_layout` | ||
( | ||
`id` bigint NOT NULL AUTO_INCREMENT, | ||
`uid` bigint NOT NULL COMMENT 'uid', | ||
`created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '생성일', | ||
`modified_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '수정일', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT '포즈 레이아웃'; | ||
CREATE INDEX idx__uid ON pose_layout (uid); | ||
|
||
-- 포즈 레이아웃 포인트 | ||
CREATE TABLE `pose_layout_point` | ||
( | ||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'pose key point snapshot id', | ||
`pose_layout_id` bigint NOT NULL COMMENT 'pose layout id', | ||
`position` VARCHAR(32) NOT NULL COMMENT '스냅샷 위치', | ||
`x` DECIMAL(20, 16) NOT NULL COMMENT 'x 좌표', | ||
`y` DECIMAL(20, 16) NOT NULL COMMENT 'y 좌표', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='포즈 레이아웃 point'; | ||
CREATE INDEX uidx__pose_snapshot_id__position ON pose_layout_point (pose_layout_id, position); |
Oops, something went wrong.