-
Notifications
You must be signed in to change notification settings - Fork 8
DB 명세서
SeongJongHo edited this page May 29, 2024
·
2 revisions
-
ERD
-
db diagram 코드
Table user_profiles { email varchar [primary key, note: "이메일"] nickname varchar [not null, note: "닉네임"] gender int [not null, note: "성별"] profile_image_path varchar [not null, default: "default.jpg", note: "프로필 사진"] feed_count int [not null, default: 0, note: "보유중인 피드 개수"] created_at timestamp [not null, default: "now()", note: "유저 생성 일자"] deleted_at timestamp [null, note: "유저 탈퇴 일자"] } Table profile_images { image_path varchar [not null, note: "닉네임"] } Table weathers { temperature decimal [not null, note: "기온"] time_temperature timestamp [not null, note: "시각"] code int [not null, note: "날씨 코드"] } Table locations { lat decimal [not null, note: "위도"] lng decimal [not null, note: "경도"] city varchar [not null, note: "도시명, 지역명"] created_at timestamp [not null, note: "위치 기록 일자"] } Table feeds { image_path varchar [note: '이미지'] user_email varchar [not null, note: "이메일"] description varchar [not null, note: "작성글"] weather weather [not null, note: "날씨"] season_code int [not null, note: "계절"] location location [not null, note: "위치"] created_at varchar [not null, default: "now()", note: "유저 생성 일자"] deleted_at varchar [null, note: "유저 탈퇴 일자"] } Table user_auths { email varchar [primary key, note: "이메일"] password varchar [not null, note: "비밀번호"] } Table weather_background_images { image_path varchar [note: '이미지'] } Ref: "feeds"."user_email" < "user_profiles"."email" Ref: "user_profiles"."email" < "user_auths"."email"
-
ERD
-
db diagram 코드
Table user_profiles { email varchar [primary key, note: "이메일"] nickname varchar [not null, note: "닉네임"] gender int [not null, note: "성별"] profile_image_path varchar [not null, default: "default.jpg", note: "프로필 사진"] feed_count int [not null, default: 0, note: "보유중인 피드 개수"] created_at timestamp [not null, default: "now()", note: "유저 생성 일자"] deleted_at timestamp [null, note: "유저 탈퇴 일자"] } Table feeds { id integer [primary key] image_path varchar [note: '이미지'] user_email varchar [not null, note: "이메일"] description varchar [not null, note: "작성글"] weather weather [not null, note: "날씨"] season_code int [not null, note: "계절"] location location [not null, note: "위치"] created_at varchar [not null, default: "now()", note: "유저 생성 일자"] deleted_at varchar [null, note: "유저 탈퇴 일자"] } Table weathers { temperature decimal [not null, note: "기온"] time_temperature timestamp [not null, note: "시각"] code int [not null, note: "날씨 코드"] } Table daily_location_weathers { high_temperature decimal [not null, note: "최고 기온"] low_temperature decimal [not null, note: "최저 기온"] weatherList weather[] [not null, note: "날씨"] location location [not null, note: "위치"] } Table locations { lat decimal [not null, note: "위도"] lng decimal [not null, note: "경도"] city varchar [not null, note: "도시명, 지역명"] created_at timestamp [not null, note: "위치 기록 일자"] } Ref: "feeds"."user_email" < "user_profiles"."email"