SBW_project_main
Tables (15)
academy (학원)
- id (학원 아이디) — Primary key — NOT NULL
- name (지점이름)
- address (주소)
- phone (학원번호)
- status (영업상태)
account (계정)
- id (계정 아이디) — Primary key — NOT NULL
- email (unique) (이메일)
- password (비밀번호)
- name (이름)
- phone (전화번호)
- status (ACTIVE / INACTIVE / BLOCKED) (상태) — enum
- last_login_at (마지막 로그인)
auth_role (역할)
- id (역할 아이디) — Primary key — NOT NULL
auth_role_permission (역할 권한)
- id (역할권한 아이디) — Primary key — NOT NULL
- id (역할 아이디) — Foreign key → auth_role.id — NOT NULL
- id (권한 아이디) — Foreign key → permission.id — NOT NULL
board (게시판)
- id (게시판 아이디) — Primary key — NOT NULL
- id (학원 아이디) — Foreign key → academy.id — NOT NULL
booking (예약)
- id (예약 아이디) — Primary key — NOT NULL
- room_id (예약룸 아이디) — Foreign key → room.id — NOT NULL
- account_id (계정 아이디) — Foreign key → account.id — NOT NULL
- start_time (예약 시작)
- end_time (예약 끝)
- status (사용 상태)
course (과정)
- id (과정 아이디) — Primary key — NOT NULL
- id (학원 아이디) — Foreign key → academy.id — NOT NULL
course_staff (과정 직원)
- id (과정직원 아이디) — Primary key — NOT NULL
- id (과정 아이디) — Foreign key → course.id — NOT NULL
- id (직원 아이디) — Foreign key → staff.id — NOT NULL
course_student (과정 학생)
- id (과정학생 아이디) — Primary key — NOT NULL
- id (과정 아이디) — Foreign key → course.id — NOT NULL
- id (학생 아이디) — Foreign key → student.id — NOT NULL
permission (권한)
- id (권한 아이디) — Primary key — NOT NULL
post (게시글)
- id (게시글 아이디) — Primary key — NOT NULL
- id (게시판 아이디) — Foreign key → board.id — NOT NULL
- id (계정 아이디) — Foreign key → account.id — NOT NULL
room (예약룸)
- id (예약룸 아이디) — Primary key — NOT NULL
- id (학원 아이디) — Foreign key → academy.id — NOT NULL
staff (직원)
- id (직원 아이디) — Primary key — NOT NULL
- id (계정 아이디) — Foreign key → account.id — NOT NULL
- id (학원 아이디) — Foreign key → academy.id — NOT NULL
staff_auth_role (직원 역할)
- id (직원역할 아이디) — Primary key — NOT NULL
- id (직원 아이디) — Foreign key → staff.id — NOT NULL
- id (역할 아이디) — Foreign key → auth_role.id — NOT NULL
student (학생)
- id (학생 아이디) — Primary key — NOT NULL
- id (계정 아이디) — Foreign key → account.id — NOT NULL
- id (학원 아이디) — Foreign key → academy.id — NOT NULL