Used to keep track of answers that has been flagged in peer review
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
created_at | timestamp with time zone | now() | false | Timestamp when the flag was created. | ||
deleted_at | timestamp with time zone | true | Timestamp when the flag was deleted. If null, the record is not deleted. | |||
description | text | true | Optional additional explanation provided by the user. | |||
flagged_by | uuid | false | public.users | The id of the user who flagged the answer. | ||
flagged_user | uuid | false | public.users | The id of the user whose answer was flagged. | ||
id | uuid | uuid_generate_v4() | false | |||
reason | report_reason | false | The reason for flagging the answer. | |||
submission_id | uuid | false | public.exercise_slide_submissions | The id of the exercise task submission being flagged. | ||
updated_at | timestamp with time zone | now() | false | Timestamp when the flag was last updated. The field is updated automatically by the set_timestamp trigger. |
Name | Type | Definition |
---|---|---|
flagged_answers_flagged_by_fkey | FOREIGN KEY | FOREIGN KEY (flagged_by) REFERENCES users(id) |
flagged_answers_flagged_user_fkey | FOREIGN KEY | FOREIGN KEY (flagged_user) REFERENCES users(id) |
flagged_answers_pkey | PRIMARY KEY | PRIMARY KEY (id) |
flagged_answers_submission_id_fkey | FOREIGN KEY | FOREIGN KEY (submission_id) REFERENCES exercise_slide_submissions(id) |
flagged_answers_submission_id_flagged_by_deleted_at_key | UNIQUE | UNIQUE NULLS NOT DISTINCT (submission_id, flagged_by, deleted_at) |
Name | Definition |
---|---|
flagged_answers_pkey | CREATE UNIQUE INDEX flagged_answers_pkey ON public.flagged_answers USING btree (id) |
flagged_answers_submission_id_flagged_by_deleted_at_key | CREATE UNIQUE INDEX flagged_answers_submission_id_flagged_by_deleted_at_key ON public.flagged_answers USING btree (submission_id, flagged_by, deleted_at) NULLS NOT DISTINCT |
idx_flagged_answers_submission_id | CREATE INDEX idx_flagged_answers_submission_id ON public.flagged_answers USING btree (submission_id) |
Name | Definition |
---|---|
set_timestamp | CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.flagged_answers FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp() |
Generated by tbls