SaasStar.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. namespace app\model\saas;
  3. use app\extra\basic\Model;
  4. use think\model\relation\HasMany;
  5. use think\model\relation\HasOne;
  6. /**
  7. * @property integer $id (主键)
  8. * @property mixed $poi_id
  9. * @property string $nick_name 昵称
  10. * @property string $unique_id 抖音号
  11. * @property string $avatar_url
  12. * @property string $city_name
  13. * @property mixed $uid 抖音唯一ID
  14. * @property string $fans_count
  15. * @property mixed $fans_tag_list 粉丝标签
  16. * @property string $talent_level_display 带货力
  17. * @property string $talent_item_level_display 视频带货力
  18. * @property string $talent_live_level_display 直播
  19. * @property string $content_level_display 内容力
  20. * @property string $credit_score_display 信用分
  21. * @property string $rank_display 视频榜
  22. * @property mixed $create_at
  23. */
  24. class SaasStar extends Model
  25. {
  26. /**
  27. * The connection name for the model.
  28. *
  29. * @var string|null
  30. */
  31. protected $connection = 'mysql';
  32. /**
  33. * The table associated with the model.
  34. *
  35. * @var string
  36. */
  37. protected string $table = "saas_star";
  38. /**
  39. * The primary key associated with the table.
  40. *
  41. * @var string
  42. */
  43. protected string $primaryKey = "id";
  44. /**
  45. * Indicates if the model should be timestamped.
  46. *
  47. * @var bool
  48. */
  49. public bool $timestamps = false;
  50. public function getShowNicknameAttr($data): string
  51. {
  52. return unicodeToEmoji($data);
  53. }
  54. public function poi(): HasOne
  55. {
  56. return $this->hasOne(SaasStore::class,'poi_id','poi_id');
  57. }
  58. }