SaasStore.php 908 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace app\model\saas;
  3. use app\extra\basic\Model;
  4. /**
  5. * @property integer $id (主键)
  6. * @property integer $store_id
  7. * @property mixed $create_at
  8. */
  9. class SaasStore extends Model
  10. {
  11. /**
  12. * The connection name for the model.
  13. *
  14. * @var string|null
  15. */
  16. protected $connection = 'mysql';
  17. /**
  18. * The table associated with the model.
  19. *
  20. * @var string
  21. */
  22. protected string $table = "saas_store";
  23. /**
  24. * The primary key associated with the table.
  25. *
  26. * @var string
  27. */
  28. protected string $primaryKey = "id";
  29. /**
  30. * Indicates if the model should be timestamped.
  31. *
  32. * @var bool
  33. */
  34. public bool $timestamps = false;
  35. public function user()
  36. {
  37. return $this->hasOne("app\model\system\SystemUser","user_id","store_id");
  38. }
  39. }