This makes it easier for developers new to the codebase to easily get important information on the model's table in the same file as the model code. To ensure the model annotations stay accurate, run them on test_up/test_down. In CI, regenerate the annotations, and check for no changes, similar to how the linters work.
21 lines
571 B
Ruby
21 lines
571 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../model"
|
|
|
|
class ProjectInvitation < Sequel::Model
|
|
many_to_one :project
|
|
end
|
|
|
|
ProjectInvitation.unrestrict_primary_key
|
|
|
|
# Table: project_invitation
|
|
# Primary Key: (project_id, email)
|
|
# Columns:
|
|
# project_id | uuid |
|
|
# email | citext |
|
|
# inviter_id | uuid | NOT NULL
|
|
# expires_at | timestamp without time zone | NOT NULL
|
|
# policy | text |
|
|
# Indexes:
|
|
# project_invitation_pkey | PRIMARY KEY btree (project_id, email)
|