ASSU

테이블 (14)

계약서 (paper)

  • PK (id) — bigint — 기본 키 — NOT NULL
  • 생성 일자 (created_at) — datetime(6) — NOT NULL
  • 수정 일자 (updated_at) — datetime(6) — NOT NULL
  • 제휴 기간 (partnership_period) — string — NOT NULL
  • 관리자ID (admin_id) — bigint — 외래 키 → 관리자.관리자ID — NOT NULL
  • 업체ID (partner_id) — bigint — 외래 키 → 제휴업체.업체ID — NOT NULL

공통 소속 (belonging)

  • PK (id) — bigint — 기본 키 — NOT NULL
  • 학교 (university) — string — NOT NULL
  • 단과대 (college) — string — NOT NULL
  • 학부 (major) — string — NOT NULL
  • 회원ID (id2) — bigint — 외래 키 → 회원.회원ID — NOT NULL
  • 관리자ID (id3) — bigint — 외래 키 → 관리자.관리자ID — NOT NULL

관리자 (admin)

  • 관리자ID (id) — bigint — 기본 키 — NOT NULL
  • 전화번호 (phone_number) — string — NOT NULL
  • 이메일 (email) — string — NOT NULL
  • 비밀번호 (password) — string — NOT NULL
  • 관리단체 명 (name) — string
  • 주소 (address) — string — NOT NULL
  • 인감 (seal) — url — NOT NULL
  • 회원 상태 (status) — enum — NOT NULL — active, pending, inactive
  • 비활성 상태 일자 (inactive_at) — datetime(6) — NOT NULL
  • 생성 일자 (created_at) — datetime(6) — NOT NULL
  • 수정 일자 (updated_at) — datetime(6) — NOT NULL

리뷰 (review)

  • 리뷰 id (id) — bigint — 기본 키 — NOT NULL
  • 별점 (star) — int — NOT NULL
  • 리뷰 내용 (content) — string — NOT NULL
  • 생성 일자 (created_at) — datetime(6) — NOT NULL
  • 수정 일자 (updated_at) — datetime(6) — NOT NULL
  • 제휴내역 id (partnership_id) — bigint — 외래 키 → 제휴 내역.제휴내역 id — NOT NULL
  • 업체ID (id2) — bigint — 외래 키 → 제휴업체.업체ID — NOT NULL

리뷰 사진 (review_photo)

  • 리뷰 사진 id (id) — bigint — 기본 키 — NOT NULL
  • 사진 (photo) — url
  • 생성 일자 (created_at) — datetime(6) — NOT NULL
  • 수정 일자 (updated_at) — datetime(6) — NOT NULL
  • 리뷰 id (review_id) — bigint — 외래 키 → 리뷰.리뷰 id — NOT NULL
  • Field

메시지 (message)

  • PK (id) — bigint — 기본 키 — NOT NULL
  • 메시지 타입 (type) — enum — NOT NULL
  • 메시지 내용 (content) — string — NOT NULL
  • 관리자ID (id2) — bigint — 외래 키 → 채팅 참여.관리자ID — NOT NULL
  • 업체ID (id22) — bigint — 외래 키 → 채팅 참여.업체ID — NOT NULL
  • PK (id3) — bigint — 외래 키 → 채팅 참여.PK — NOT NULL
  • 보낸 시간 (send_time) — datetime(6) — NOT NULL
  • 읽은 시간 (read_time) — datetime(6) — NOT NULL
  • 확인 여부 (is_read) — boolean — NOT NULL

제휴 건의함 (suggestion)

  • 제휴 건의 id (id) — bigint — 기본 키 — NOT NULL
  • 회원ID (member_id) — bigint — 외래 키 → 회원.회원ID — NOT NULL
  • 관리자ID (admin_id) — bigint — 외래 키 → 관리자.관리자ID — NOT NULL
  • 건의 대상 (suggest_admin) — string — NOT NULL
  • 제휴 가게 (suggest_partner) — string — NOT NULL
  • 제휴 내용 (content) — string — NOT NULL
  • 생성 일자 (created_at) — datetime(6) — NOT NULL
  • 수정 일자 (updated_at) — datetime(6) — NOT NULL

제휴 내역 (Untitled)

  • 제휴내역 id (id) — bigint — 기본 키 — NOT NULL
  • 업체 이름 (place) — string — NOT NULL
  • 제휴 날짜 (date) — datetime(6) — NOT NULL
  • 제휴 내역 (partnership_content) — string — NOT NULL
  • 제휴 금액 (discount) — int — NOT NULL
  • 리뷰 작성 여부 (is_reviewed) — boolean — NOT NULL
  • 회원ID (member_id) — bigint — 외래 키 → 회원.회원ID — NOT NULL
  • 생성 일자 (created_at) — datetime(6) — NOT NULL
  • 수정 일자 (updated_at) — datetime(6) — NOT NULL

제휴업체 (partner)

  • 업체ID (id) — bigint — 기본 키 — NOT NULL
  • 전화번호 (phone_number) — string — NOT NULL
  • 이메일 (email) — string — NOT NULL
  • 비밀번호 (password) — string — NOT NULL
  • 업체명 (name) — string
  • 주소 (address) — string — NOT NULL
  • 인감 (seal) — url — NOT NULL
  • 사업자 등록증 (buisiness_register_certificate) — url — NOT NULL
  • 제휴 건수 (partnership_count) — int — NOT NULL
  • 회원 상태 (status) — enum — NOT NULL — active, pending, inactive
  • 비활성 상태 일자 (inactive_at) — datetime(6) — NOT NULL
  • 생성 일자 (created_at) — datetime(6) — NOT NULL
  • 수정 일자 (updated_at) — datetime(6) — NOT NULL

채팅 참여 (chatpart)

  • 관리자ID (id) — bigint — 외래 키 → 관리자.관리자ID — NOT NULL
  • 업체ID (id2) — bigint — 외래 키 → 제휴업체.업체ID — NOT NULL
  • PK (id3) — bigint — 외래 키 → 채팅방.PK — NOT NULL

채팅방 (chattingroom)

  • PK (id) — bigint — 기본 키 — NOT NULL
  • 채팅방 이름 (name) — string — NOT NULL
  • 채팅방 상태 (status) — string — NOT NULL

혜택 (content)

  • PK (id) — bigint — 기본 키 — NOT NULL
  • PK (paper_id) — bigint — 외래 키 → 계약서.PK — NOT NULL
  • 종류 (type) — enum — NOT NULL — 명수 || 소속 || 금액
  • 인원 (people) — int
  • 소속 (belonging) — string
  • 금액 (cost) — int
  • 할인 제휴 (discount) — int
  • 상품 제휴 (goods) — string

회원 (Member)

  • 회원ID (id) — bigint — 기본 키 — NOT NULL
  • 이름 (name) — string
  • 프로필 사진 (profile_image) — url
  • 닉네임 (nickname) — string
  • 전화번호 (phone_number) — string — NOT NULL
  • 이메일 (email) — string — NOT NULL
  • 비밀번호 (password) — string — NOT NULL
  • 학교 (university) — string — NOT NULL
  • 단과대 (Field) — string — NOT NULL
  • 학부 (major) — string — NOT NULL
  • 학번 (student_id) — string — NOT NULL
  • 스탬프 (stamp) — int — NOT NULL
  • 회원 상태 (status) — enum — NOT NULL — active, pending, inactive
  • 비활성 상태 일자 (inactive_at) — datetime(6) — NOT NULL
  • 생성 일자 (created_at) — datetime(6) — NOT NULL
  • 수정 일자 (updated_at) — datetime(6) — NOT NULL

회원-업체 (member-partner)

  • PK (id) — bigint — 기본 키 — NOT NULL
  • 회원ID (member_id) — bigint — 외래 키 → 회원.회원ID — NOT NULL
  • 업체ID (partner_id) — bigint — 외래 키 → 제휴업체.업체ID — NOT NULL
  • 생성 일자 (created_at) — datetime(6) — NOT NULL
  • 수정 일자 (updated_at) — datetime(6) — NOT NULL