BlueUserOpen.php 983 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace app\model\blue;
  3. use app\extra\basic\Model;
  4. use think\model\relation\HasOne;
  5. /**
  6. * @property integer $id (主键)
  7. * @property mixed $openid
  8. * @property string $nickname
  9. * @property mixed $create_at 创建时间
  10. */
  11. class BlueUserOpen extends Model
  12. {
  13. /**
  14. * The connection name for the model.
  15. *
  16. * @var string|null
  17. */
  18. protected $connection = 'mysql';
  19. /**
  20. * The table associated with the model.
  21. *
  22. * @var string
  23. */
  24. protected string $table = "blue_user_open";
  25. /**
  26. * The primary key associated with the table.
  27. *
  28. * @var string
  29. */
  30. protected string $primaryKey = "id";
  31. /**
  32. * Indicates if the model should be timestamped.
  33. *
  34. * @var bool
  35. */
  36. public bool $timestamps = false;
  37. public function star(): HasOne
  38. {
  39. return $this->hasOne(BlueExpert::class,"openid","openid");
  40. }
  41. }