viits_erd_v2

Tables (12)

User (유저)

  • id (int) — Primary key — NOT NULL
  • public_id (UUID) — Primary key — NOT NULL
  • email (str)
  • username (Field)
  • password (Field2)
  • is_superuser(F) (Field6)
  • is_active(T) (Field7)
  • agreed_terms(F) (Field3)
  • agreed_privacy(F) (Field4)
  • agreed_marketing(F) (Field8)
  • created_at (Field9)
  • updated_at (Field10)

Workspace (워크스페이스)

  • id (int) — Primary key — NOT NULL
  • public_id (Key) — Primary key — NOT NULL
  • name (Field)
  • created_at (Field2)
  • updated_at (Field4)

Camera (Untitled3)

  • id (Key) — Primary key — NOT NULL
  • public_id (UUID) — Primary key — NOT NULL
  • tank_id (Key2) — Foreign key → Tank.public_id — NOT NULL
  • name (str)
  • rtsp_url (rtsp://admin:[email protected]:3111)
  • anomaly_detection_enabled (bool)
  • biometric_analysis_enabled (bool1)
  • ai_type_list (스트리밍 서버에서 사용하기 때문에 만듦)
  • created_at (Field)
  • updated_at (Field2)
  • is_deleted (Field3)

Location (장소)

  • id (int) — Primary key — NOT NULL
  • public_id (UUID) — Primary key — NOT NULL
  • workspace_id (Key) — Foreign key → Workspace.public_id — NOT NULL
  • name (양식동 식별(생산 1동))
  • latitude (decimal(위도))
  • longitude (decimal(경도))
  • created_at (Field2)
  • updated_at (Field3)
  • is_deleted (Field)

Media (미디어)

  • id (Key) — Primary key — NOT NULL
  • public_id (Key2) — Primary key — NOT NULL
  • user_id (UUID) — Foreign key → User.id — NOT NULL
  • s3_key (Field2)
  • original_filename (Field3)
  • content_type (Field4)
  • ai_model_type (Field5)
  • fish_type (Field6)
  • media_size (Field7)
  • created_at (Field)
  • updated_at (Field8)

MediaAnalysisResult (미디어 추론 결과)

  • id (Key) — Primary key — NOT NULL
  • media_id (Key2) — Foreign key → Media.id — NOT NULL
  • status (Field)
  • predicted_class_name_list (Field2)
  • inference_result (Field3)
  • error_message (Field4)

Project (프로젝트)

  • id (int) — Primary key — NOT NULL
  • public_id (UUID) — Primary key — NOT NULL
  • workspace_id (Key) — Foreign key → Workspace.public_id — NOT NULL
  • name (Field2)
  • created_by_user_id (User FK)
  • created_at (Field3)
  • updated_at (Field4)
  • is_deleted (Field)

Project_Tank (프로젝트-수조 중개테이블)

  • id (int) — Primary key — NOT NULL
  • project_tank_id (UUID) — Primary key — NOT NULL
  • tank_id (Key2) — Foreign key → Tank.public_id — NOT NULL
  • project_id (Key22) — Foreign key → Project.public_id — NOT NULL
  • farming_method (정수식/유수식/가두리/순환여과식/방류재포식/기타)
  • fish_purpose (부화지/치어지/양성지/친어지/산란지)
  • water_type (담수/기수/해수)
  • species (연어/넙치/참돔)
  • feeding_date (입식일 date)
  • hatching_date (부화일 date)
  • tank_capacity (수조 용량)
  • feeding_amount (입식량 int)
  • created_at (Field)
  • updated_at (Field2)
  • is_deleted (Field3)

Project_Tank_Journal (PT 일지)

  • public_id (Key) — Primary key — NOT NULL
  • id (Key3) — Primary key — NOT NULL
  • project_tank_id (UUID) — Foreign key → Project_Tank.project_tank_id — NOT NULL
  • created_by_user_id (UUID2) — Foreign key → User.public_id — NOT NULL
  • category (Field2)
  • value (Field3)
  • extra (jsno)
  • written_at(utc) (Field5)

Tank (수조)

  • id (int) — Primary key — NOT NULL
  • public_id (UUID) — Primary key — NOT NULL
  • location_id (Key22) — Foreign key → Location.public_id — NOT NULL
  • name (수조 이름(1번 수조))
  • created_at (Field4)
  • updated_at (Field)
  • is_deleted (Field2)

Workspace_User(N:N) (워크스페이스-유저 중개테이블)

  • id (int) — Primary key — NOT NULL
  • workspace_id (Key2) — Foreign key → Workspace.public_id — NOT NULL
  • user_id (Key3) — Foreign key → User.public_id — NOT NULL
  • role (viewer, creator, editor)
  • joined_at (datetime)

verification (이메일 인증)

  • id (int) — Primary key — NOT NULL
  • public_id (UUID) — Primary key — NOT NULL
  • email (str)
  • token (Field2)
  • is_verified (bool)
  • expires_at (datetime)
  • created_at (Field)
  • updated_at (Field3)