범죄안전귀가(safe_zone)

테이블 (12)

CCTV (Cctv)

  • CCTV 고유 아이디 (id) — number — 기본 키 — NOT NULL
  • 위도 (lat) — Float
  • 경도 (lon) — Float
  • 생성일 (createdAt) — DateTime

Enum (Category)

  • 문의 (inquiry) — string
  • 자유 (free) — string
  • 제보 (report) — string

Enum (VerificationPurpose)

  • 회원가입 (signup) — string
  • 비밀번호 변경 (reset_password) — string

가로등 (Light)

  • 가로등 고유 아이디 (id) — number — 기본 키 — NOT NULL
  • 위도 (lat) — Float
  • 경도 (lon) — Float
  • 생성일 (createdAt) — DateTime

게시판 (bord)

  • 커뮤니티 고유 아이디 (id) — number — 기본 키 — NOT NULL
  • 유저 고유 아이디 (userId) — number — 외래 키 → 사용자.유저 고유 아이디 — NOT NULL
  • 제목 (title) — string
  • 내용 (content) — string
  • 카테고리 (category) — Category
  • 생성일 (createdAt) — DateTime
  • 수정일 (updatedAt) — DateTime
  • 검색용 제목 (searchTitle) — string
  • 검색용 내용 (searchContent) — string

댓글 (comment)

  • 댓글 고유 아이디 (id) — number — 기본 키 — NOT NULL
  • 유저 고유 아이디 (userId) — number — 외래 키 → 사용자.유저 고유 아이디 — NOT NULL
  • 커뮤니티 고유 아이디 (bordId) — number — 외래 키 → 게시판.커뮤니티 고유 아이디 — NOT NULL
  • 내용 (content) — string
  • 생성일 (createdAt) — DateTime
  • 수정일 (updatedAt) — DateTime
  • 대댓글 (parentId) — comment?

범죄데이터 (CrimeData)

  • 범죄데이터 고유 아이디 (id) — number — 기본 키 — NOT NULL
  • 구/행정구역 (district) — String
  • 상세 주소 (address) — String
  • 사건 발생 위치 위도 (latitude) — Float
  • 사건 발생 위치 경도 (longitude) — Float
  • 범죄유형 (type) — String
  • 범죄 발생일 (date) — DateTime
  • 생성일 (createdAt) — DateTime

비상연락처 (EmergencyContact)

  • 비상연락처 고유 아이디 (id) — number — 기본 키 — NOT NULL
  • 유저 고유 아이디 (userId) — number — 외래 키 → 사용자.유저 고유 아이디 — NOT NULL
  • 이름 (name) — string
  • 휴대폰 번호 (phone) — string
  • 생성일 (createdAt) — DateTime
  • 수정일 (updatedAt) — Datetime

사용자 (User)

  • 유저 고유 아이디 (id) — number — 기본 키 — NOT NULL
  • 이름 (name) — string
  • 닉네임 (nicname) — string
  • 비밀번호 (password) — string
  • 이메일 (email) — string
  • 휴대폰 번호 (phone) — string
  • 리프레시토큰 (refreshToken) — string?
  • 생성일 (createdAt) — DateTime
  • 수정일 (updatedAt) — DateTime

사용자 실시간 위치 (UserLocation)

  • 위치 고유 아이디 (id) — number — 기본 키 — NOT NULL
  • 유저 고유 아이디 (userId) — number — 외래 키 → 사용자.유저 고유 아이디 — NOT NULL
  • 위도 (latitude) — number
  • 경도 (longitude) — number
  • 위치 갱신일 (updatedAt) — DateTime

안전경로점수 (PathHistory)

  • 안전경로점수 고유 아이디 (id) — number — 기본 키 — NOT NULL
  • 유저 고유 아이디 (userId) — number — 외래 키 → 사용자.유저 고유 아이디 — NOT NULL
  • 출발지 (startName) — String
  • 목적지 (endName) — String
  • 안전 점수 (score) — number
  • 생성일 (createdAt) — DateTime

이메일전송 (EmailVerification)

  • 이메일전송 고유 아이디 (id) — number — 기본 키 — NOT NULL
  • 이메일 (email) — string
  • 이메일인증 코드 (code) — string
  • 이메일 인증 사용처 (purpose) — VerificationPurpose
  • 이메일 인증 여부 (isVerified) — boolean
  • 인증 만료 시간 (expiresAt) — DateTime
  • 생성일 (createdAt) — DateTime