20 lines
685 B
TypeScript
20 lines
685 B
TypeScript
import { Column, Entity, Index, PrimaryColumn } from 'typeorm';
|
|
import { TimestampedEntity } from './timestamped.entity';
|
|
|
|
@Entity({ name: 'survey_target_report_media' })
|
|
@Index('idx_survey_target_report_media_media_id', ['mediaId'])
|
|
@Index('idx_survey_target_report_media_included', ['reportId', 'included'])
|
|
export class SurveyTargetReportMedia extends TimestampedEntity {
|
|
@PrimaryColumn({ name: 'report_id', type: 'uuid' })
|
|
reportId!: string;
|
|
|
|
@PrimaryColumn({ name: 'media_id', type: 'uuid' })
|
|
mediaId!: string;
|
|
|
|
@Column({ type: 'boolean', default: true })
|
|
included!: boolean;
|
|
|
|
@Column({ name: 'added_by', type: 'uuid', nullable: true })
|
|
addedBy!: string | null;
|
|
}
|