SaasUserOpen.php 1010 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 string $nickname
  8. * @property mixed $openid
  9. * @property string $headimg
  10. * @property mixed $create_at
  11. */
  12. class SaasUserOpen extends Model
  13. {
  14. /**
  15. * The connection name for the model.
  16. *
  17. * @var string|null
  18. */
  19. protected $connection = 'mysql';
  20. /**
  21. * The table associated with the model.
  22. *
  23. * @var string
  24. */
  25. protected string $table = "saas_user_open";
  26. /**
  27. * The primary key associated with the table.
  28. *
  29. * @var string
  30. */
  31. protected string $primaryKey = "id";
  32. /**
  33. * Indicates if the model should be timestamped.
  34. *
  35. * @var bool
  36. */
  37. public bool $timestamps = false;
  38. public function vip(): HasOne
  39. {
  40. return $this->hasOne("app\model\saas\SaasUser","openid","openid");
  41. }
  42. }