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

export enum Gender {
  MALE = 'male',
  FEMALE = 'female',
  OTHER = 'other',
}

registerEnumType(Gender, {
  name: 'Gender',
});

@ObjectType('Child')
export class ChildType {
  @Field(() => ID)
  id: string;

  @Field()
  name: string;

  @Field()
  birthDate: Date;

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

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

  @Field()
  familyId: string;

  @Field()
  createdAt: Date;

  @Field()
  updatedAt: Date;
}
