12345678910111213141516171819202122232425 |
- <?php
- namespace app\model\store\yoga;
- use app\yoga\model\appointment\AppointmentModel;
- use app\common\model\CommonModel;
- use app\yoga\model\project\ProjectModel;
-
- class CoachSchedulingModel extends CommonModel{
- protected $name = 'yoga_coach_scheduling';
- protected $pk = 'scheduling_id';
-
- public function project()
- {
- return $this->hasOne(ProjectModel::class,'project_id','project_id');
- }
-
- public function coach()
- {
- return $this->hasOne(CoachModel::class,'coach_id','coach_id');
- }
-
- public function appointment()
- {
- return $this->hasMany(AppointmentModel::class,'scheduling_id','scheduling_id');
- }
- }
|