BlueExpert.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 $truenname
  9. * @property string $mobile
  10. * @property string $idcard
  11. * @property string $city
  12. * @property mixed $city_path
  13. * @property integer $sex 1男2女
  14. * @property integer $married 1已婚2未
  15. * @property integer $child 1有2无
  16. * @property mixed $create_at 创建时间
  17. */
  18. class BlueExpert extends Model
  19. {
  20. /**
  21. * The connection name for the model.
  22. *
  23. * @var string|null
  24. */
  25. protected $connection = 'mysql';
  26. /**
  27. * The table associated with the model.
  28. *
  29. * @var string
  30. */
  31. protected string $table = "blue_expert";
  32. /**
  33. * The primary key associated with the table.
  34. *
  35. * @var string
  36. */
  37. protected string $primaryKey = "id";
  38. /**
  39. * Indicates if the model should be timestamped.
  40. *
  41. * @var bool
  42. */
  43. public bool $timestamps = false;
  44. public function open(): HasOne
  45. {
  46. return $this->hasOne(BlueUserOpen::class,"openid","openid");
  47. }
  48. }