MARSAI

Tables (8)

alembic_version

  • version_num — character varying(32) — Primary key — NOT NULL

attachments

  • attachment_id — uuid — Primary key — NOT NULL
  • message_id — uuid — Foreign key → messages.message_id — NOT NULL
  • name — character varying(500) — NOT NULL
  • content_type — character varying(100) — NOT NULL
  • size — integer — NOT NULL
  • data — bytea — NOT NULL
  • created_at — timestamp with time zone — NOT NULL

documents

  • document_id — uuid — Primary key — NOT NULL
  • name — character varying(500) — NOT NULL
  • user_id — uuid — Foreign key → users.user_id
  • domain — character varying(50) — NOT NULL
  • department — character varying(100)
  • visibility — public.visibilityenum — NOT NULL
  • content_type — character varying(100) — NOT NULL
  • size — integer — NOT NULL
  • data — bytea — NOT NULL
  • created_at — timestamp with time zone — NOT NULL
  • status — character varying(20) — NOT NULL
  • job_id — character varying(64)
  • chunks_indexed — integer
  • error — text
  • updated_at — timestamp with time zone — NOT NULL
  • project_id — uiud — Foreign key → projects.project_id — NOT NULL

messages

  • message_id — uuid — Primary key — NOT NULL
  • session_id — uuid — Foreign key → sessions.session_id — NOT NULL
  • role — public.roleenum — NOT NULL
  • content — text — NOT NULL
  • created_at — timestamp with time zone — NOT NULL
  • domain — character varying(50)

projects

  • project_id — uiud — Primary key — NOT NULL
  • user_id — uuid — Foreign key → users.user_id — NOT NULL
  • title — character varying(255)
  • created_at — timestamp with time zone
  • updated_at — timestamp with time zone
  • is_favorite — boolean
  • instructions — text

sessions

  • session_id — uuid — Primary key — NOT NULL
  • user_id — uuid — Foreign key → users.user_id — NOT NULL
  • title — character varying(255) — NOT NULL
  • created_at — timestamp with time zone — NOT NULL
  • updated_at — timestamp with time zone — NOT NULL
  • is_favorite — boolean — NOT NULL
  • project_id — uiud — Foreign key → projects.project_id — NOT NULL

sources

  • source_id — uuid — Primary key — NOT NULL
  • message_id — uuid — Foreign key → messages.message_id — NOT NULL
  • name — character varying(500) — NOT NULL
  • page — character varying(50)
  • created_at — timestamp with time zone — NOT NULL

users

  • user_id — uuid — Primary key — NOT NULL
  • email — character varying(255) — NOT NULL
  • password — character varying(255) — NOT NULL
  • created_at — timestamp with time zone — NOT NULL
  • updated_at — timestamp with time zone — NOT NULL
  • refresh_token — character varying(512)
  • role — public.userrole — NOT NULL
  • status — public.approvalstatus — NOT NULL
  • name — character varying(100) — NOT NULL