import { Field, Float, Int, ObjectType } from '@nestjs/graphql';
import { Tour } from '@prisma/client';

@ObjectType('Tour')
export class TourObjectType implements Tour {
  @Field()
  id: string;
  @Field()
  done: boolean;
  @Field()
  direction: string;
  @Field({ nullable: true })
  carName: string | null;
  @Field()
  operationId: string;
  @Field({ nullable: true })
  driverId: string | null;
  @Field({ nullable: true })
  driverName: string | null;
  @Field({ nullable: true })
  codriverId: string | null;
  @Field({ nullable: true })
  codriverName: string | null;
  @Field({ nullable: true })
  patientId: string | null;
  @Field({ nullable: true })
  patientName: string | null;
  @Field({ nullable: true })
  patientSurname: string | null;
  @Field({ nullable: true })
  patientStreet: string | null;
  @Field({ nullable: true })
  patientZip: string | null;
  @Field({ nullable: true })
  patientCity: string | null;
  @Field({ nullable: true })
  healthInsurance: string | null;
  @Field({ nullable: true })
  healthInsuranceNumber: string | null;
  @Field({ nullable: true })
  category: string | null;
  @Field({ nullable: true })
  transportType: string | null;
  @Field({ nullable: true })
  ordinanceType: string | null;
  @Field({ nullable: true })
  startInstitution: string | null;
  @Field({ nullable: true })
  startStreet: string | null;
  @Field({ nullable: true })
  startZip: string | null;
  @Field({ nullable: true })
  startCity: string | null;
  @Field({ nullable: true })
  targetInstitution: string | null;
  @Field({ nullable: true })
  targetStreet: string | null;
  @Field({ nullable: true })
  targetZip: string | null;
  @Field({ nullable: true })
  targetCity: string | null;
  @Field({ nullable: true })
  startDate: Date;
  @Field({ nullable: true })
  startBegin: string | null;
  @Field({ nullable: true })
  startEnd: string | null;
  @Field({ nullable: true })
  target: string | null;
  @Field({ nullable: true })
  targetBegin: string | null;
  @Field({ nullable: true })
  empty: string | null;
  @Field(() => Int)
  check: number;
  @Field(() => Float)
  occupiedKm: number | null;
  @Field(() => Float)
  totalKm: number | null;
  @Field()
  type: string | null;
  @Field({ nullable: true })
  rangeEndDate: Date | null;

  @Field(() => Float)
  revenueDispoLive: number | null;
  @Field(() => Float)
  revenue: number | null;
  @Field(() => Float)
  consumptionCosts: number | null;
  @Field(() => Float)
  revenueDeviation: number;
  @Field({ nullable: true })
  billDate: Date | null;
  @Field({ nullable: true })
  billNumber: string | null;

  @Field({ nullable: true })
  createdAt: Date | null;
  @Field({ nullable: true })
  updatedAt: Date | null;
  @Field({ nullable: true })
  deletedAt: Date | null;

  @Field(() => Boolean, { nullable: true })
  hasInfection: boolean | null;
  @Field({ nullable: true })
  infectionName: string | null;

  @Field({ nullable: true })
  ticketId: string | null;
}
