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

@ObjectType('RevenueTrend')
export class RevenueTrendObjectType {
  @Field(() => Date)
  date: Date;
  @Field()
  ordinanceType: string;
  @Field(() => Float)
  revenueSum: number;
}

@ObjectType('HomeDashboardKPIs')
export class HomeDashboardKPIsObjectType {
  @Field(() => Int)
  anomalyCount: number;
  @Field(() => Int)
  employeesWithoutTourCount: number;
  @Field(() => Int)
  toursWithoutApprovalCount: number;
  @Field(() => Int)
  billableTourCount: number;
  @Field(() => Float)
  billableTourRevenueSum: number;
  @Field(() => Int)
  billedTourCount: number;
  @Field(() => Float)
  billedTourPositiveRevenueDeviation: number;
  @Field(() => Float)
  billedTourNegativeRevenueDeviation: number;
  @Field(() => [RevenueTrendObjectType])
  revenueTrend: RevenueTrendObjectType[];
}
