SaasFactory.php 1.1 KB

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