<?php
namespace customerapi\models\dto;


use yii\base\Model;

class TrainerDTO extends Model
{
     public $id;
     public $name;
     public $phone;
     public $email;
     public $password;
     public $active;
     public $created_at;
     public $updated_at;

     public static function fromTrainer($trainer){
         $dto = new TrainerDTO();
         $dto->id = $trainer->id;
         $dto->name = $trainer->name;
         $dto->phone = $trainer->phone;
         $dto->email = $trainer->email;
         $dto->password = $trainer->password;
         $dto->active = $trainer->active;
         $dto->created_at = $trainer->created_at;
         $dto->updated_at = $trainer->updated_at;

         return $dto;
     }

}
