SaasStoreShop.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. namespace app\model\saas;
  3. use app\extra\basic\Model;
  4. use think\model\relation\HasOne;
  5. /**
  6. * @property integer $id (主键)
  7. * @property integer $user_id
  8. * @property integer $account_id 来客id
  9. * @property integer $poi_id
  10. * @property string $poi_name
  11. * @property string $poi_address
  12. * @property integer $is_default
  13. * @property integer $status
  14. * @property mixed $create_at
  15. */
  16. class SaasStoreShop extends Model
  17. {
  18. /**
  19. * The connection name for the model.
  20. *
  21. * @var string|null
  22. */
  23. protected $connection = 'mysql';
  24. /**
  25. * The table associated with the model.
  26. *
  27. * @var string
  28. */
  29. protected string $table = "saas_store_shop";
  30. /**
  31. * The primary key associated with the table.
  32. *
  33. * @var string
  34. */
  35. protected string $primaryKey = "id";
  36. /**
  37. * Indicates if the model should be timestamped.
  38. *
  39. * @var bool
  40. */
  41. public bool $timestamps = false;
  42. public function agent(): HasOne
  43. {
  44. return $this->hasOne("app\model\saas\SaasAgent","agent_id","agent_id");
  45. }
  46. public function store(): HasOne
  47. {
  48. return $this->hasOne("app\model\saas\SaasStore","store_id","store_id");
  49. }
  50. }