diff options
| author | Marie <github@yuugi.dev> | 2025-05-23 23:33:08 +0000 |
|---|---|---|
| committer | Marie <github@yuugi.dev> | 2025-05-23 23:33:08 +0000 |
| commit | e59a3ad69330ff892ebee6f34d4458f872424de8 (patch) | |
| tree | 2e0cdd51c7dedfba34afaf54952c951475659d5c /packages/backend/src/models/AbuseReportNotificationRecipient.ts | |
| parent | merge: Cleanup admin user UI (!1012) (diff) | |
| parent | fix TS errors from defaultLike (diff) | |
| download | sharkey-e59a3ad69330ff892ebee6f34d4458f872424de8.tar.gz sharkey-e59a3ad69330ff892ebee6f34d4458f872424de8.tar.bz2 sharkey-e59a3ad69330ff892ebee6f34d4458f872424de8.zip | |
merge: Synchronize database entities and code models (!1040)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1040
Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <github@yuugi.dev>
Diffstat (limited to 'packages/backend/src/models/AbuseReportNotificationRecipient.ts')
| -rw-r--r-- | packages/backend/src/models/AbuseReportNotificationRecipient.ts | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/packages/backend/src/models/AbuseReportNotificationRecipient.ts b/packages/backend/src/models/AbuseReportNotificationRecipient.ts index fbff880afc..fd31354a80 100644 --- a/packages/backend/src/models/AbuseReportNotificationRecipient.ts +++ b/packages/backend/src/models/AbuseReportNotificationRecipient.ts @@ -22,7 +22,7 @@ export class MiAbuseReportNotificationRecipient { /** * 有効かどうか. */ - @Index() + @Index('IDX_abuse_report_notification_recipient_isActive') @Column('boolean', { default: true, }) @@ -47,7 +47,7 @@ export class MiAbuseReportNotificationRecipient { /** * 通知方法. */ - @Index() + @Index('IDX_abuse_report_notification_recipient_method') @Column('varchar', { length: 64, }) @@ -56,7 +56,7 @@ export class MiAbuseReportNotificationRecipient { /** * 通知先のユーザID. */ - @Index() + @Index('IDX_abuse_report_notification_recipient_userId') @Column({ ...id(), nullable: true, @@ -75,14 +75,16 @@ export class MiAbuseReportNotificationRecipient { /** * 通知先のユーザプロフィール. */ - @ManyToOne(type => MiUserProfile, {}) + @ManyToOne(type => MiUserProfile, { + onDelete: 'CASCADE', + }) @JoinColumn({ name: 'userId', referencedColumnName: 'userId', foreignKeyConstraintName: 'FK_abuse_report_notification_recipient_userId2' }) public userProfile: MiUserProfile | null; /** * 通知先のシステムWebhookId. */ - @Index() + @Index('IDX_abuse_report_notification_recipient_systemWebhookId') @Column({ ...id(), nullable: true, @@ -95,6 +97,8 @@ export class MiAbuseReportNotificationRecipient { @ManyToOne(type => MiSystemWebhook, { onDelete: 'CASCADE', }) - @JoinColumn() + @JoinColumn({ + foreignKeyConstraintName: 'FK_abuse_report_notification_recipient_systemWebhookId', + }) public systemWebhook: MiSystemWebhook | null; } |