Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

초기 설계 #5

Open
daehwan2da opened this issue Nov 12, 2023 · 1 comment
Open

초기 설계 #5

daehwan2da opened this issue Nov 12, 2023 · 1 comment

Comments

@daehwan2da
Copy link
Contributor

daehwan2da commented Nov 12, 2023

질문 거리

  • nickname 초기 세팅에 대한 정책이 있는지?
    • 랜덤이라면 어떤 값을 넣어주어야할지?
  • image upload 방식 변경 가능할지?
    • multi part -> octet-stream
  • client 에서 사진에 대한 가로-세로 정보는 어떤 식으로 판단하는지?
  • index 는 차후 고려

account

CREATE TABLE account (
  no  bigint auto_increment primary key,
  social  varchar(10) not null,
  social_id varchar(100) not null,
  refresh_token  varchar(500) ,
  user_no bigint,

  unique (social, social_id)
);

fillin_user

CREATE TABLE filiin_user (
 no bigint auto_increment primary key,
 nickname  varchar not null,
 profile_image_path varchar(500),
 status varchar(10) not null
);

studio

  • 정규화시킬지?
    • 시키게 되면 기존 데이터 보고 어떻게 마이그레이션 할지도 고민해야함
CREATE TABLE studio (
 no  bigint auto_increment primary key,
 name varchar(50) not null,
 address varchar (500) ,
 tel varchar(50),
 latitude double,
 longitude double,
 etc text,
 status varchar(10) not null,
 site varchar(500),
);

studio_price

CREATE TABLE price (
 no bigint auto_increment primary key,
 studio_no bigint not null,
 name varchar(100),
 amount int,
);

studio_running_time

CREATE TABLE running_time (
 no bigint auto_increment primary key,
 studio_no bigint not null,
 day_of_week enum('MON', 'TUE', 'WED', 'THR', 'FRI', 'SAT', 'SUN') not null,
 start_at datetime,
 end_at datetime
);

film

CREATE TABLE film (
 no bigint auto_increment primary key,
 name varchar(100) not null,
 type_no bigint not null,
 company_no bigint not null
);
CREATE TABLE film_type (
 no bigint auto_increment primary key,
 name varchar(50) not null
);

company

CREATE TABLE company (
 no bigint auto_increment primary key,
 name varchar(50) not null
);

photo

  • meta data 는 추후에 필요시 테이블 확장
  • like count 는 Redis 로 확장
CREATE TABLE photo (
 no bigint auto_increment primary key,
 user_no bigint not null,
 studio_no bigint not null,
 film_no bigint not null,
 image_path varchar(500) not null,
 status varchar(10) not null,
 created_at datetime,
 update_at datetime
);

reaction_history

CREATE TABLE reaction_history (
  no bigint auto_increment primary key,
  user_no bigint not null,
  target_type varchar(50) not null,
  target_no bigint not null,
  created_at datetime
 
  unique (user_no, target_type, target_no)
);
@daehwan2da
Copy link
Contributor Author

  • User
    • oauth + 내정보
  • studio
    • 위도/경도
    • 검색
  • photo
    • 업로드 (stream)
    • 다운로드 ( domain + path )
  • film
  • reaction
    • photo like
    • bookmark

This was referenced Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant