import { CreatedUser } from '@/types/api/api-general';

export interface ProductionStandard {
  id: number;
  name: string;
  project_category: string;
  created_at: string;
  updated_at: string;
  created_user: CreatedUser;
  details: StandardDetails[];
}

export interface StandardDetails {
  week: number;
  growth_standard_detail: StandardGrowthDetails;
  egg_production_standard_detail: ProductionStandardDetails;
}

export interface ProductionStandardDetails {
  target_hen_day_production: number;
  target_hen_house_production: number;
  target_egg_weight: number;
  target_egg_mass: number;
  standard_fcr: number;
}

export interface StandardGrowthDetails {
  target_mean_bw: number;
  max_depletion: number;
  min_uniformity: number;
  feed_intake: number;
}

export interface CreateProductionStandardPayload {
  name: string;
  project_category: string;
  details: {
    week: number;
    growth_standard_detail: {
      target_mean_bw: number;
      max_depletion: number;
      min_uniformity: number;
      feed_intake: number;
    };
    egg_production_standard_detail: {
      target_hen_day_production: number;
      target_hen_house_production: number;
      target_egg_weight: number;
      target_egg_mass: number;
      standard_fcr: number;
    };
  }[];
}

export interface UpdateProductionStandardPayload {
  name: string;
  project_category: string;
  details: {
    week: number;
    growth_standard_detail: {
      target_mean_bw: number;
      max_depletion: number;
      min_uniformity: number;
      feed_intake: number;
    };
    egg_production_standard_detail: {
      target_hen_day_production: number;
      target_hen_house_production: number;
      target_egg_weight: number;
      target_egg_mass: number;
      standard_fcr: number;
    };
  }[];
}
