• 티스토리 홈
  • 프로필사진
    Song hyun
  • 방명록
  • 공지사항
  • 태그
  • 블로그 관리
  • 글 작성
Song hyun
  • 프로필사진
    Song hyun
    • 분류 전체보기 (780)
      • 백준 (0)
      • 영어 (2)
        • Diary (0)
        • Toast Masters (2)
      • 메모 (13)
      • 설치 메뉴얼 (30)
      • Java (178)
      • MySQL (60)
      • JSP (67)
      • Springboot (46)
      • HTML,CSS, JS (71)
        • HTML (8)
        • CSS (12)
        • JavaScript (37)
        • HTML&CSS 스터디 (13)
      • C++ (7)
      • Linux (7)
      • JPA (34)
      • Kotlin (2)
      • Flutter (42)
      • Error Note (39)
      • 디자인 패턴 (12)
      • 디지털논리회로 (4)
      • 데이터베이스 시스템 (8)
      • 알고리즘 (7)
      • 운영체제 (3)
      • 이산수학 (3)
      • 인공지능 (1)
      • 자료 구조 (14)
        • 기본 개념 (14)
        • 자료구조 스터디 (0)
      • 💡My project (76)
        • 팩맨 : Java Swing 게임 제작 프로젝트 (6)
        • 네이트톡 : Java 소켓 통신 프로젝트 (4)
        • 포켓옥션 : HikariCP&JDBC CRUD 프.. (3)
        • 이지 부산 : BDIA-Devton 2024 프로.. (20)
        • 그린 유니버시티 : JSP를 사용한 학사관리 프로.. (1)
        • 애드 포커 : 웹 소켓과 Spring을 사용한 카.. (1)
        • 셸위 : 게임 친구 매칭 사이트 (21)
        • 다모아 : 개발자 중개 플랫폼 (20)
      • 📗스터디 (13)
        • CNN : 웹개발 스터디 (10)
        • Node&React로 유튜브 사이트 만들기 (3)
      • 📙독서 및 강연 기록 (36)
        • 강연 (14)
        • 독서 (22)
  • 방문자 수
    • 전체:
    • 오늘:
    • 어제:
  • 최근 댓글
      등록된 댓글이 없습니다.
    • 최근 공지
        등록된 공지가 없습니다.
      # Home
      # 공지사항
      #
      # 태그
      # 검색결과
      # 방명록
      • [셸위:게임 친구 매칭 사이트] 6. 1차 기능 구현(2) - 2024.08.26
        2024년 08월 26일
        • Song hyun
        • 작성자
        • 2024.08.26.:33
        728x90
        반응형

        [셸위:게임 친구 매칭 사이트] 6. 1차 기능 구현(2) - 2024.08.26

        1. DB 테이블 쿼리 삽입 완료

        DB 스키마

        더보기
        -- create database shallwe_db;
        -- use shallwe_db;
        -- 관리자 테이블
        create table admin_tb(
        	user_id int primary key auto_increment not null,
            username varchar(20) not null,
            id varchar(20) unique key not null,
            password varchar(20) not null,
            email varchar(50) unique key not null,
            phone_number varchar(20) unique key not null,
            created_at timestamp default now(),
            status int not null -- 0 회원 가입 유지, 1 탈퇴
        );
        
        -- 사용자 테이블
        create table user_tb(
        	user_id int primary key auto_increment not null,
            role_id int not null, -- 직함 id
            username varchar(20) not null,
            id varchar(20) unique key not null,
            password varchar(20) not null,
            nickname varchar(20) not null unique key, 
            birth_date date not null,
            email varchar(50) unique key not null,
            phone_number varchar(20) unique key not null,
            origin_file_name varchar(200) not null,
            upload_file_name varchar(200) not null,
            current_cash bigint not null default 200, -- 캐시, 가입 시 200점
            challenge_point bigint not null default 200, -- 내기 포인트, 가입시 200점 
            created_at timestamp default now(),
            status int not null -- 0 회원 가입 유지, 1 탈퇴
        );
        
        -- mbti 테이블
        create table mbti_tb(
        	id int primary key auto_increment not null,
            name varchar(10) not null,  -- mbti 명
            nickname varchar(20) not null, -- 직업
            content text not null -- mbti 설명
        );
        
        -- mbti-user 테이블
        create table mbti_user_tb(
        	id int primary key auto_increment not null,
            user_id int not null,
            mbti_id int not null
        );
        
        -- 신고 테이블
        create table report_tb(
        	id int primary key not null auto_increment,
            type int not null, -- 어디서 신고했는지
            reason varchar(200) not null, -- 이유
            sender_id int not null, -- 신고한 사람
            reciever_id int not null, -- 신고당한 사람
            created_at timestamp default now() -- 신고 시간
        );
        
        -- 장르 테이블
        create table genre_tb(
        	id int auto_increment primary key,
            genre_name varchar(20)
        );
        
        -- 게임 카테고리 테이블
        create table game_tb(
        	id int primary key not null auto_increment,
            game_name varchar(20) not null,
            genre_id int not null
        );
        
        -- 신고 타입 테이블
        create table report_type_tb(
        	id int primary key not null auto_increment,
            type varchar(20) -- 어디서 신고했는지(유저, 게시글, 댓글, 강의)
        );
        
        -- 캐시 사용 타입 테이블
        create table cash_type_tb(
        	id int primary key auto_increment not null,
            type varchar(10) not null
        );
        
        -- 사용자-캐시 히스토리 테이블
        create table user_cash_history_tb(
        	id int primary key auto_increment not null,
            user_id int not null,
            charge_amount bigint,
            spend_amount bigint,
            created_at Timestamp default now()
        );
        
        -- 강의 테이블
        create table class_tb(
        	id int primary key auto_increment not null,
            title varchar(20) not null,
            content text not null,
            limit_num int,
            current_num int,
            price bigint,
            total_num int,
            status int,
            created_at timestamp default now()
        );
        
        -- 강의-강사 테이블
        create table class_instructor_tb(
        	id int primary key auto_increment not null,
            class_id int,
            instructor_id int
        );
        
        -- 강의-수강생 테이블
        create table class_student_tb(
        	id int primary key auto_increment not null,
            class_id int,
            student_id int,
            num int
        );
        
        -- 강의-리뷰 테이블
        create table class_review_tb(
        	id int primary key auto_increment not null,
            class_id int,
            author_id int,
            comment text,
            grade int,
            created_at timestamp default now()
        );
        
        -- 공지사항 테이블
        create table notice_tb(
        	id int primary key auto_increment not null,
            title varchar(20) not null,
            content text not null,
            author_id int not null,
            created_at timestamp default now()
        );
        
        -- 이벤트 테이블
        create table event_tb(
        	id int primary key auto_increment not null,
            title varchar(20) not null,
            content text not null,
            author_id int not null,
            created_at timestamp default now()
        );
        
        -- Q&A 테이블 (질문-유저)
        create table qna_question_tb(
        	id int primary key auto_increment not null,
            title varchar(20) not null,
            content text not null,
            author_id int not null,
            answer_id int not null,
            created_at timestamp default now()
        );
        
        -- Q&A 테이블 (답변-관리자)
        create table qna_answer_tb(
        	id int primary key auto_increment not null,
            content text not null,
            author_id int not null,
            created_at timestamp default now()
        );
        
        
        -- 커뮤니티 게시판 테이블
        create table board_tb (
        	id int primary key auto_increment not null,
            category_id int not null,
            title varchar(20) not null,
            content text not null,
            author int not null,
            view_num int default 0,
            good int default 0,
            created_at timestamp default current_timestamp
        );
        -- 댓글 테이블
        create table comment_tb (
        	id int primary key auto_increment not null,
            post_id int not null,
            content text not null,
            author int not null,
            created_at timestamp default current_timestamp
        );
        
        -- 채팅방 테이블
        create table chat_room_tb(
        	id int primary key auto_increment not null,
            user_id_1 int not null,
            user_id_2 int not null,
            created_at timestamp default now()
        );
        
        -- 광고 테이블
        create table advertise_tb(
        	id int primary key auto_increment not null,
            place_id int not null,
            title varchar(20),
            customer_id int,
            link text,
            origin_file_name varchar(200),
            upload_file_name varchar(200),
            created_at timestamp default now(),
            start_date timestamp,
            end_date timestamp,
            status int
        );
        
        -- 광고 위치 테이블
        create table ad_place_tb(
        	id int primary key auto_increment not null,
            title varchar(20),
            image_name varchar(200)
        );
        
        -- 업적 테이블
        create table quest_tb(
        	id int primary key auto_increment not null,
            title varchar(50) not null,
            type_id int, -- ex: 게시글 0, 댓글 1
            achievement_num int, -- ex: 달성 조건 = 게시글 30개 (achievement=30)
            title_id int
        );
        
        -- 유저-업적 테이블
        create table user_quest_tb(
        	id int primary key auto_increment not null,
            user_id int not null,
            quest_id int not null,
            current_achievement int
        );
        
        -- 칭호 테이블
        create table title_tb(
        	id int primary key auto_increment not null,
            title varchar(20),
            content text
        );
        
        -- 유저-칭호 테이블
        create table user_title_tb(
        	id int primary key auto_increment not null,
            title_id int,
            user_id int
        );
        
        -- 친구 테이블
        create table friend_tb(
        	id int primary key auto_increment not null,
            user_id int,
            friend_id int
        );
        
        -- 명성치 테이블
        create table fame_tb(
        	id int primary key auto_increment not null,
            sender_id int,
            reciever_id int
        );

         

        2. 회의

        (1) DB 테이블 스키마 설계

        -기존: 한 로그인 페이지에서 아이디/비밀번호/role_id(직함)에 따라 메인 페이지/대쉬보드로 나뉨

        -변경 시안: 각자 별개의 로그인 페이지에서 아이디/비밀번호 로그인.

        로그인 로직이 변경되면서 role_id로 구분짓는 것이 아닌, 처음부터 각자 일반 유저/관리자 테이블에 따로 접근하는 방식으로 변경되었다.

         

        (2)  dev1 브랜치 merge 및 새로운 개인 브랜치 생성하기

        -오류 없이 수정 완료

        +비상용 백업을 위해 직전의 개인 브랜치 1개는 남겨두기로!

         

        (3) 각자 작업 진도 이야기하기

        -도준영: 로그인 50%

        -송원석: 1:1 채팅 기능 70%

        -이건우: 대쉬보드 50%

        -엄송현: 메인 페이지 배치 완료

        -최이제: 게시판 50%

         

        (4) 각자의 목표(8.26-8.30)

        -도준영: 일반/소셜 로그인 기능 완성

        -송원석: 1:1 채팅 기능, 친구 매칭 기능 완성

        -이건우: 대쉬보드 완성

        -엄송현: 메인 페이지, Mbti 테스트 완성

        -최이제: 커뮤니티 게시판 기능 완성

         

        728x90
        반응형

        '💡My project > 셸위 : 게임 친구 매칭 사이트' 카테고리의 다른 글

        [셸위:게임 친구 매칭 사이트] MBTI 테스트 구현 (2) - 테스트 로직  (1) 2024.09.02
        [셸위:게임 친구 매칭 사이트] MBTI 테스트(1) - 프론트  (0) 2024.09.02
        [셸위:게임 친구 매칭 사이트] 6. 1차 기능 구현(1) - 2024.08.23  (0) 2024.08.24
        [셸위:게임 친구 매칭 사이트] 5. 기능 명세서 및 역할 분담, 프로젝트 세팅 - 2024.08.22  (0) 2024.08.23
        [셸위:게임 친구 매칭 사이트] 4. DB 및 와이어 프레임 구상하기 - 2024.08.21  (0) 2024.08.21
        다음글
        다음 글이 없습니다.
        이전글
        이전 글이 없습니다.
        댓글
      조회된 결과가 없습니다.
      스킨 업데이트 안내
      현재 이용하고 계신 스킨의 버전보다 더 높은 최신 버전이 감지 되었습니다. 최신버전 스킨 파일을 다운로드 받을 수 있는 페이지로 이동하시겠습니까?
      ("아니오" 를 선택할 시 30일 동안 최신 버전이 감지되어도 모달 창이 표시되지 않습니다.)
      목차
      표시할 목차가 없습니다.
        • 안녕하세요
        • 감사해요
        • 잘있어요

        티스토리툴바