<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="external_data_age_group")
 */
class ExternalDataAgeGroup {
    public function __construct(int $id)
    {
        if ($id === 1) {
            $this->id = 1;
            $this->ageGroup = "moins de 30 ans";
        }
        if ($id === 2) {
            $this->id = 2;
            $this->ageGroup = "entre 30 et 59 ans";
        }
        if ($id === 3) {
            $this->id = 3;
            $this->ageGroup = "plus de 59 ans";
        }
    }
    /**
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="integer")
     */
    private $id;

    /** @ORM\Column(type="string", length=50) */
    private $ageGroup;
}
