Rabit

Tables (12)

comment

  • id — bitint(20) — Primary key — NOT NULL
  • author_id — bigint(20) — NOT NULL
  • type — byte(4) — NOT NULL — comment of goal, log, comment
  • parent_id — bigint(20) — NOT NULL
  • parent_type — byte(4) — NOT NULL
  • content — longtext
  • create_date — datetime — NOT NULL
  • last_updated — datetime
  • status — byte(4) — NOT NULL — default 0

content

  • id — bitint(20) — Primary key — NOT NULL
  • goal_id — bigint(20) — Foreign key → goal.id — NOT NULL
  • type — byte(4) — NOT NULL
  • content — longtext
  • create_date — datetime — NOT NULL
  • last_updated — datetime
  • status — byte(4) — NOT NULL — default 0

content_file

  • content_id — bitint(20) — Foreign key → content.id — NOT NULL
  • file_id — bigint(20) — Foreign key → file.id — NOT NULL

daily_log

  • id — bitint(20) — Primary key — NOT NULL
  • goal_id — bigint(20) — Foreign key → goal.id — NOT NULL
  • type — byte(4) — NOT NULL
  • content — longtext
  • create_date — datetime — NOT NULL
  • last_updated — datetime
  • status — byte(4) — NOT NULL — default 0

file

  • id — bigint(20) — Primary key — NOT NULL
  • size — int(11) — NOT NULL
  • name — varchar(255) — NOT NULL
  • org_name — varchar(255) — NOT NULL
  • extension — varchar(10) — NOT NULL

follow

  • id — bigint(20) — Primary key — NOT NULL
  • follower_id — bigint(20) — Foreign key → user.id — NOT NULL
  • following_id — bigint(20) — Foreign key → user.id — NOT NULL
  • create_date — datetime
  • last_updated — datetime
  • status — byte(4) — NOT NULL — default 0

goal

  • id — bigint(20) — Primary key — NOT NULL
  • author_id — bigint(20) — Foreign key → user.id — NOT NULL
  • parent_id — bigint(20) — Foreign key → goal.id — NOT NULL
  • type — byte(4) — NOT NULL
  • content — longtext
  • start_date — datetime
  • end_date — datetime
  • create_date — datetime — NOT NULL
  • last_updated — datetime
  • selected_days — int(7) — NOT NULL — bitwise selected days of week
  • status — byte(4) — NOT NULL — default 0

profile

  • id — bigint(20) — Primary key — NOT NULL
  • user_id — bigint(20) — Foreign key → user.id — NOT NULL
  • create_date — datetime
  • last_updated — datetime

profile_file

  • profile_id — bigint(20) — Foreign key → profile.id — NOT NULL
  • file_id — bigint(20) — Foreign key → file.id — NOT NULL

role

  • id — int(11) — Primary key — NOT NULL
  • role_name — varchar(30)

user

  • id — bigint(20) — Primary key — NOT NULL
  • email — varchar(50) — NOT NULL
  • password — varchar(255) — NOT NULL
  • username — varchar(20) — NOT NULL
  • name — varchar(30) — NOT NULL
  • phone — varchar(20)
  • birth — date
  • create_date — datetime
  • last_updated — datetime
  • status — byte(4) — NOT NULL — default 0

user_role

  • user_id — bigint(20) — Foreign key → user.id — NOT NULL
  • role_id — int(11) — Foreign key → role.id — NOT NULL