mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
57 lines
1.4 KiB
TypeScript
57 lines
1.4 KiB
TypeScript
import { ObjectType, Field, ID, Int } from 'type-graphql'
|
|
import { UserContact as dbUserContact } from '@entity/UserContact'
|
|
|
|
@ObjectType()
|
|
export class UserContact {
|
|
constructor(userContact: dbUserContact) {
|
|
this.id = userContact.id
|
|
this.type = userContact.type
|
|
this.userId = userContact.userId
|
|
this.email = userContact.email
|
|
// this.emailVerificationCode = userContact.emailVerificationCode
|
|
this.emailOptInTypeId = userContact.emailOptInTypeId
|
|
this.emailResendCount = userContact.emailResendCount
|
|
this.emailChecked = userContact.emailChecked
|
|
this.phone = userContact.phone
|
|
this.createdAt = userContact.createdAt
|
|
this.updatedAt = userContact.updatedAt
|
|
this.deletedAt = userContact.deletedAt
|
|
}
|
|
|
|
@Field(() => ID)
|
|
id: number
|
|
|
|
@Field(() => String)
|
|
type: string
|
|
|
|
@Field(() => ID)
|
|
userId: number
|
|
|
|
@Field(() => String)
|
|
email: string
|
|
|
|
// @Field(() => BigInt, { nullable: true })
|
|
// emailVerificationCode: BigInt | null
|
|
|
|
@Field(() => Int, { nullable: true })
|
|
emailOptInTypeId: number | null
|
|
|
|
@Field(() => Int, { nullable: true })
|
|
emailResendCount: number | null
|
|
|
|
@Field(() => Boolean)
|
|
emailChecked: boolean
|
|
|
|
@Field(() => String, { nullable: true })
|
|
phone: string | null
|
|
|
|
@Field(() => Date)
|
|
createdAt: Date
|
|
|
|
@Field(() => Date, { nullable: true })
|
|
updatedAt: Date | null
|
|
|
|
@Field(() => Date, { nullable: true })
|
|
deletedAt: Date | null
|
|
}
|