Photo Parking
Tables (8)
discount_policy (할인 정책)
- discount_policy_id (할인 정책 id) — BIGINT — Primary key — NOT NULL
- parking_lot_id (주차장 id) — BIGINT — Foreign key → parking_lot.parking_lot_id — NOT NULL
- discount_name (할인 명) — VARCHAR(100) — NOT NULL — e.g., Electric Vehicle, Large Family, Disabled
- discount_type (할인 타입) — ENUM('PERCENTAGE', 'AMOUNT') — NOT NULL — PERCENTAGE: % discount, AMOUNT: KRW discount, TIME_DEDUCTION: minute deduction
- discount_amount (할인 값) — INT — NOT NULL — PERCENTAGE: %, AMOUNT: KRW, TIME_DEDUCTION: minutes
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
fee_policy (요금 정책)
- fee_policy_id (요금 정책 id) — BIGINT — Primary key — NOT NULL
- parking_lot_id (주차장 id) — BIGINT — Foreign key → parking_lot.parking_lot_id — NOT NULL
- fee_policy_name (요금정책 이름) — varchar(255)
- base_fee (기본요금) — INT
- base_time (기본 시간) — INT
- additional_time_unit (추가시간 단위) — INT
- additional_unit_fee (추가시간당 요금) — INT
- is_active (활성화 여부) — TINYINT
monthly_pass_vehicle (월차)
- monthly_pass_id (월차 id) — BIGINT — Primary key — NOT NULL
- parking_lot_id (주차장 id) — BIGINT — Foreign key → parking_lot.parking_lot_id — NOT NULL
- vehicle_number (차량 번호) — VARCHAR(255) — NOT NULL
- start_date (시작일) — TIMESTAMP — NOT NULL
- end_date (종료일) — TIMESTAMP — NOT NULL
- contact_number (연락처) — VARCHAR(20)
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- monthly_pass_vehicle_status (월차 상태) — ENUM('ACTIVE', 'EXPIRED', 'CANCELLED')
monthly_pass_vehicle_fee (Untitled)
- monthly_pass_vehicle_fee_id (Key) — BIGINT — Primary key — NOT NULL
- parking_lot_id (주차장 id) — BIGINT — Foreign key → parking_lot.parking_lot_id — NOT NULL
- fee (요금) — INTEGER — NOT NULL
- created_at (생성일) — DATETIME — NOT NULL
- updated_at (수정일) — DATETIME — NOT NULL
parking_lot (주차장)
- parking_lot_id (주차장 id) — BIGINT — Primary key — NOT NULL
- user_id (사용자 아이디) — BIGINT — Foreign key → user.user_id — NOT NULL
- parking_lot_name (주차장 이름) — VARCHAR(255) — NOT NULL
- created_at (생성일) — TIMESTAMP — NOT NULL
- updated_at (수정일) — TIMESTAMP — NOT NULL
- address (Field) — VARCHAR(255)
parking_session (주차 기록)
- parking_session_id (주차 세션 id) — BIGINT — Primary key — NOT NULL
- parking_lot_id (주차장 id) — BIGINT — Foreign key → parking_lot.parking_lot_id — NOT NULL
- vehicle_number (차량 번호) — VARCHAR(20) — NOT NULL — e.g., 12가3456
- entry_time (입차 시간) — TIMESTAMP — NOT NULL
- exit_time (출차 시간) — TIMESTAMP
- parking_status (주차 상태) — ENUM('IN_PROGRESS', 'COMPLETED') — NOT NULL — IN_PROGRESS: Parking, COMPLETED: Exited
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
payment (결제)
- payment_id (결제 id) — BIGINT — Primary key — NOT NULL
- parking_session_id (주차 세션 id) — BIGINT — Foreign key → parking_session.parking_session_id — NOT NULL
- payment_amount (결제 금액) — INT — NOT NULL — Unit: KRW
- original_amount (할인 전 결제 금액) — INT — NOT NULL — Amount before discount, Unit: KRW
- discounted_amount (할인된 금액) — INT — NOT NULL — Total discount amount, Unit: KRW
- payment_method (결제 방법) — ENUM('CARD', 'CASH', 'TRANSFER') — NOT NULL — CARD: Card, CASH: Cash, TRANSFER: Bank Transfer
- payment_status (결제 상태) — ENUM('PENDING', 'COMPLETED') — NOT NULL — PENDING: Waiting, COMPLETED: Completed, CANCELLED: Cancelled
- payment_date (결제일) — TIMESTAMP — Actual payment completion time
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
user (사용자)
- user_id (사용자 아이디) — BIGINT — Primary key — NOT NULL
- kakao_id (카카오 아이디) — BIGINT — NOT NULL — Kakao OAuth ID
- user_name (사용자 이름) — VARCHAR(100) — NOT NULL
- created_at (생성일) — TIMESTAMP — NOT NULL
- updated_at (수정일) — TIMESTAMP — NOT NULL
- refresh_token (jwt refresh token) — VARCHAR(255)