import { InputType, Field, ID } from '@nestjs/graphql';

@InputType()
export class CollectionTokenItemInput {
    @Field()
    prefix: string;

    @Field()
    token: string;
}

@InputType()
export class CollectionTokenInput {
    @Field(() => [CollectionTokenItemInput])
    tokens: CollectionTokenItemInput[];

    @Field()
    default: string;
}

@InputType()
export class CreateUserInput {

    @Field({ nullable: true })
    avatar?: string;

    @Field()
    password: string;

    @Field(() => [String], { nullable: true })
    history?: string[];

    @Field()
    tag: string;

    @Field()
    email: string;

    @Field()
    phone: string;

    @Field(() => CollectionTokenInput)
    collectionTokens: CollectionTokenInput;

    @Field(() => ID)
    person: string;

    @Field(() => ID, { nullable: true })
    type?: string;

    @Field(() => ID, { nullable: true })
    expiryStarts?: string;

    @Field(() => ID, { nullable: true })
    expiryEnds?: string;

    @Field(() => Boolean, { nullable: true })
    isConfirmed?: boolean;

    @Field(() => Boolean, { nullable: true })
    isNotificationSend?: boolean;
}
