diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-05-22 14:34:04 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-05-22 14:34:04 -0400 |
| commit | 418aea1eefcd147534eab90cac15814af44fd123 (patch) | |
| tree | 1444f767f118cd89b7dfd84c40a047b1a453e24e /packages/backend/src/models/AbuseReportNotificationRecipient.ts | |
| parent | merge: Skip preview for recursive links (!1039) (diff) | |
| download | sharkey-418aea1eefcd147534eab90cac15814af44fd123.tar.gz sharkey-418aea1eefcd147534eab90cac15814af44fd123.tar.bz2 sharkey-418aea1eefcd147534eab90cac15814af44fd123.zip | |
synchronize database entities and code models
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; } |