import { TryToTransformStringInNumber } from '../../../shared/decorators/class-transformer/try-to-transform-string-in-number.decorator';
import { NutrientIntakesDto } from './nutrient-intakes.dto';

export class NutrientPer100GramsDto {
  id: number;
  name: string;

  @TryToTransformStringInNumber()
  quantityPer100: number | string;

  unit: string;
  category: string;
  intakes?: NutrientIntakesDto;

  constructor(partial: Partial<NutrientPer100GramsDto>) {
    Object.assign(this, partial);
  }
}
