ShopCoachService.php 675 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\SoftDeletes;
  4. use Slowlyo\OwlAdmin\Models\BaseModel as Model;
  5. /**
  6. * 店铺技师服务项目
  7. */
  8. class ShopCoachService extends Model
  9. {
  10. use SoftDeletes;
  11. protected $table = 'shop_coach_services';
  12. /**
  13. * @Author FelixYin
  14. * @description 技师服务所属店铺项目
  15. */
  16. public function shopService()
  17. {
  18. return $this->belongsTo(ShopService::class, 'service_id', 'id');
  19. }
  20. /**
  21. * @Author FelixYin
  22. * @description 店铺开通服务所属技师
  23. */
  24. public function coach()
  25. {
  26. return $this->belongsTo(CoachUser::class, 'coach_id', 'id');
  27. }
  28. }