diff options
Diffstat (limited to 'packages/backend/src/models')
| -rw-r--r-- | packages/backend/src/models/entities/Notification.ts | 6 | ||||
| -rw-r--r-- | packages/backend/src/models/entities/UserProfile.ts | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/packages/backend/src/models/entities/Notification.ts b/packages/backend/src/models/entities/Notification.ts index 6679cdb809..66f131d1c0 100644 --- a/packages/backend/src/models/entities/Notification.ts +++ b/packages/backend/src/models/entities/Notification.ts @@ -64,6 +64,7 @@ export class Notification { * receiveFollowRequest - フォローリクエストされた * followRequestAccepted - 自分の送ったフォローリクエストが承認された * groupInvited - グループに招待された + * achievementEarned - 実績を獲得 * app - アプリ通知 */ @Index() @@ -129,6 +130,11 @@ export class Notification { }) public choice: number | null; + @Column('varchar', { + length: 128, nullable: true, + }) + public achievement: string | null; + /** * アプリ通知のbody */ diff --git a/packages/backend/src/models/entities/UserProfile.ts b/packages/backend/src/models/entities/UserProfile.ts index c561da87ce..86df8d5d98 100644 --- a/packages/backend/src/models/entities/UserProfile.ts +++ b/packages/backend/src/models/entities/UserProfile.ts @@ -213,6 +213,19 @@ export class UserProfile { }) public mutingNotificationTypes: typeof notificationTypes[number][]; + @Column('varchar', { + length: 32, array: true, default: '{}', + }) + public loggedInDates: string[]; + + @Column('jsonb', { + default: [], + }) + public achievements: { + name: string; + unlockedAt: number; + }[]; + //#region Denormalized fields @Index() @Column('varchar', { |