import { Field, ObjectType } from '@nestjs/graphql';
import { UUID } from '../../global/scalars/UUID';
import { Date } from '../../global/scalars/Date'
import { Timeslot } from './Timeslot'
import { Organizer } from '../../organizer/models/Organizer'

@ObjectType()
export class Event {
    @Field(() => UUID,{ nullable: false })
    _id: UUID

    @Field(() => String, { nullable: true })
    name?: string

    @Field(() => Date, { nullable: false })
    date: Date

    @Field(() => [Timeslot], { nullable: false })
    timeslots: Timeslot[]

    @Field(() => UUID, { nullable: false })
    _organizer: UUID
}