docs(home): 홈 추천 신규 테이블 SQL 설명을 보강한다
This commit is contained in:
@@ -1,27 +1,27 @@
|
|||||||
create table recommendation_snapshot (
|
create table recommendation_snapshot (
|
||||||
id bigint not null auto_increment,
|
id bigint not null auto_increment comment 'ID',
|
||||||
created_at datetime(6) null,
|
section_type varchar(50) not null comment '섹션 타입',
|
||||||
updated_at datetime(6) null,
|
target_id bigint not null comment '대상 ID',
|
||||||
section_type varchar(50) not null,
|
score double not null comment '점수',
|
||||||
target_id bigint not null,
|
snapshot_at TIMESTAMP not null comment '스냅샷 시각',
|
||||||
score double not null,
|
random_tie_breaker double not null comment '랜덤 타이 브레이커',
|
||||||
snapshot_at datetime(6) not null,
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '생성 시각',
|
||||||
random_tie_breaker double not null,
|
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '수정 시각',
|
||||||
primary key (id),
|
primary key (id),
|
||||||
index idx_recommendation_snapshot_latest (section_type, snapshot_at, score, random_tie_breaker),
|
index idx_recommendation_snapshot_latest (section_type, snapshot_at, score, random_tie_breaker),
|
||||||
index idx_recommendation_snapshot_target (section_type, target_id)
|
index idx_recommendation_snapshot_target (section_type, target_id)
|
||||||
);
|
) comment '추천 스냅샷';
|
||||||
|
|
||||||
create table creator_content_view_history (
|
create table creator_content_view_history (
|
||||||
id bigint not null auto_increment,
|
id bigint not null auto_increment comment 'ID',
|
||||||
created_at datetime(6) null,
|
member_id bigint not null comment '회원 ID',
|
||||||
updated_at datetime(6) null,
|
content_id bigint not null comment '콘텐츠 ID',
|
||||||
member_id bigint not null,
|
genre_id bigint not null comment '장르 ID',
|
||||||
content_id bigint not null,
|
viewed_at TIMESTAMP not null comment '시청 시각',
|
||||||
genre_id bigint not null,
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '생성 시각',
|
||||||
viewed_at datetime(6) not null,
|
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '수정 시각',
|
||||||
primary key (id),
|
primary key (id),
|
||||||
index idx_creator_content_view_history_member_viewed (member_id, viewed_at),
|
index idx_creator_content_view_history_member_viewed (member_id, viewed_at),
|
||||||
index idx_creator_content_view_history_content (content_id),
|
index idx_creator_content_view_history_content (content_id),
|
||||||
index idx_creator_content_view_history_genre (genre_id)
|
index idx_creator_content_view_history_genre (genre_id)
|
||||||
);
|
) comment '크리에이터 콘텐츠 시청 이력';
|
||||||
|
|||||||
Reference in New Issue
Block a user