diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-10-08 13:37:02 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-08 13:37:02 +0900 |
| commit | b875cc994968bb334dfb9d83707e56ab3971a0d1 (patch) | |
| tree | 5655892af829ecad9f040624f8b6cd31410284f9 /src/models | |
| parent | update dependencies (diff) | |
| download | sharkey-b875cc994968bb334dfb9d83707e56ab3971a0d1.tar.gz sharkey-b875cc994968bb334dfb9d83707e56ab3971a0d1.tar.bz2 sharkey-b875cc994968bb334dfb9d83707e56ab3971a0d1.zip | |
feat: アカウント作成にメールアドレス必須にするオプション (#7856)
* feat: アカウント作成にメールアドレス必須にするオプション
* ui
* fix bug
* fix bug
* fix bug
* :art:
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/entities/meta.ts | 5 | ||||
| -rw-r--r-- | src/models/entities/user-pending.ts | 32 | ||||
| -rw-r--r-- | src/models/index.ts | 2 |
3 files changed, 39 insertions, 0 deletions
diff --git a/src/models/entities/meta.ts b/src/models/entities/meta.ts index 6428aacdf1..9a1a87c155 100644 --- a/src/models/entities/meta.ts +++ b/src/models/entities/meta.ts @@ -151,6 +151,11 @@ export class Meta { @Column('boolean', { default: false, }) + public emailRequiredForSignup: boolean; + + @Column('boolean', { + default: false, + }) public enableHcaptcha: boolean; @Column('varchar', { diff --git a/src/models/entities/user-pending.ts b/src/models/entities/user-pending.ts new file mode 100644 index 0000000000..40482af333 --- /dev/null +++ b/src/models/entities/user-pending.ts @@ -0,0 +1,32 @@ +import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; +import { id } from '../id'; + +@Entity() +export class UserPending { + @PrimaryColumn(id()) + public id: string; + + @Column('timestamp with time zone') + public createdAt: Date; + + @Index({ unique: true }) + @Column('varchar', { + length: 128, + }) + public code: string; + + @Column('varchar', { + length: 128, + }) + public username: string; + + @Column('varchar', { + length: 128, + }) + public email: string; + + @Column('varchar', { + length: 128, + }) + public password: string; +} diff --git a/src/models/index.ts b/src/models/index.ts index 9f8bd104e9..059a3d7b87 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -62,6 +62,7 @@ import { ChannelNotePining } from './entities/channel-note-pining'; import { RegistryItem } from './entities/registry-item'; import { Ad } from './entities/ad'; import { PasswordResetRequest } from './entities/password-reset-request'; +import { UserPending } from './entities/user-pending'; export const Announcements = getRepository(Announcement); export const AnnouncementReads = getRepository(AnnouncementRead); @@ -76,6 +77,7 @@ export const PollVotes = getRepository(PollVote); export const Users = getCustomRepository(UserRepository); export const UserProfiles = getRepository(UserProfile); export const UserKeypairs = getRepository(UserKeypair); +export const UserPendings = getRepository(UserPending); export const AttestationChallenges = getRepository(AttestationChallenge); export const UserSecurityKeys = getRepository(UserSecurityKey); export const UserPublickeys = getRepository(UserPublickey); |