StoreService.php 594 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\common\model\store\service;
  3. use app\common\model\BaseModel;
  4. use app\common\model\system\merchant\Merchant;
  5. use app\common\model\user\User;
  6. class StoreService extends BaseModel
  7. {
  8. public static function tablePk(): ?string
  9. {
  10. return 'service_id';
  11. }
  12. public static function tableName(): string
  13. {
  14. return 'store_service';
  15. }
  16. public function user()
  17. {
  18. return $this->hasOne(User::class, 'uid', 'uid');
  19. }
  20. public function merchant()
  21. {
  22. return $this->hasOne(Merchant::class, 'mer_id', 'mer_id');
  23. }
  24. }