balance-system.v1

Tables (8)

Ad (Untitled3)

  • ad_id (Key) — BIGINT — Primary key — NOT NULL

AdHistory (Untitled5)

  • ad_history_id (Key) — Primary key — NOT NULL
  • ad_id (Key2) — BIGINT — Foreign key → Ad.ad_id — NOT NULL
  • user_id (Key3) — BIGINT — Foreign key → User.user_id — NOT NULL
  • video_id (Key4) — BIGINT — Foreign key → Video.video_id — NOT NULL
  • view_date (Field2) — LocalDateTime

PlayHistory (Untitled4)

  • history_id (Key) — BIGINT — Primary key — NOT NULL
  • last_played_at (Field) — INT
  • completed (Field2) — BOOLEAN
  • user_id (Key2) — BIGINT — Foreign key → User.user_id — NOT NULL
  • video_id (Key3) — BIGINT — Foreign key → Video.video_id — NOT NULL
  • play_time (Field3) — BIGINT
  • view_date (Field4) — BIGINT

RevenueRate (Untitled9)

  • revenue_rate_id (Key) — BIGINT — Primary key — NOT NULL
  • min_views (Field) — BIGINT
  • max_views (Field2) — BIGINT
  • rate (Field3) — DECIMAL
  • type (Field4) — ENUM

User (Untitled)

  • user_id (Key) — BIGINT — Primary key — NOT NULL
  • username (Field) — VARCHAR
  • password (Field2) — VARCHAR
  • role (Field3) — ENUM

Video (Untitled2)

  • video_id (Key) — BIGINT — Primary key — NOT NULL
  • title (Field) — VARCHAR
  • view_count (Field2) — INT
  • duration (Field3) — INT
  • owner_id (Key2) — BIGINT — Foreign key → User.user_id — NOT NULL
  • ad_view_count (Field4) — BIGINT

VideoRevenue (Untitled7)

  • revenue_id (Key) — BIGINT — Primary key — NOT NULL
  • ad_revenue (Field) — DEMICAL
  • video_id (Key2) — BIGINT — Foreign key → Video.video_id — NOT NULL
  • view_revenue (Field2) — DECIMAL
  • total_revenue (Field3) — DECIMAL
  • date (Field4) — DATE

VideoStatistics (Untitled8)

  • statistic_id (Key) — BIGint — Primary key — NOT NULL
  • date (Field) — DATE
  • total_play_time (Field3) — BIGINT
  • view_count (Field4) — BIGINT
  • video_id (Key2) — BIGINT — Foreign key → Video.video_id — NOT NULL
  • ad_view_count (Field5) — BIGINT