summaryrefslogtreecommitdiff
path: root/src/models/entities
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2021-02-13 12:28:26 +0900
committersyuilo <syuilotan@yahoo.co.jp>2021-02-13 12:28:26 +0900
commitebadd7fd3f255af3dd5035afe1d0d75337fa39a4 (patch)
tree5a441d13c74092560b913b5eef4ff4252f128fd5 /src/models/entities
parentMerge pull request #7187 from syuilo/dependabot/npm_and_yarn/typescript-4.1.5 (diff)
downloadsharkey-ebadd7fd3f255af3dd5035afe1d0d75337fa39a4.tar.gz
sharkey-ebadd7fd3f255af3dd5035afe1d0d75337fa39a4.tar.bz2
sharkey-ebadd7fd3f255af3dd5035afe1d0d75337fa39a4.zip
wip: email notification
Diffstat (limited to 'src/models/entities')
-rw-r--r--src/models/entities/user-profile.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/models/entities/user-profile.ts b/src/models/entities/user-profile.ts
index 4fab52868f..3a9043fac6 100644
--- a/src/models/entities/user-profile.ts
+++ b/src/models/entities/user-profile.ts
@@ -4,6 +4,8 @@ import { User } from './user';
import { Page } from './page';
import { notificationTypes } from '../../types';
+// TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも
+// ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン
@Entity()
export class UserProfile {
@PrimaryColumn(id())
@@ -42,6 +44,11 @@ export class UserProfile {
}[];
@Column('varchar', {
+ length: 32, nullable: true,
+ })
+ public lang: string | null;
+
+ @Column('varchar', {
length: 512, nullable: true,
comment: 'Remote URL of the user.'
})
@@ -63,6 +70,11 @@ export class UserProfile {
})
public emailVerified: boolean;
+ @Column('jsonb', {
+ default: ['follow', 'receiveFollowRequest', 'groupInvited']
+ })
+ public emailNotificationTypes: string[];
+
@Column('varchar', {
length: 128, nullable: true,
})