SaasLivePlanStar.php 961 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 mixed $plan_id
  8. * @property string $unique_id 抖音号
  9. */
  10. class SaasLivePlanStar extends Model
  11. {
  12. /**
  13. * The connection name for the model.
  14. *
  15. * @var string|null
  16. */
  17. protected $connection = 'mysql';
  18. /**
  19. * The table associated with the model.
  20. *
  21. * @var string
  22. */
  23. protected string $table = "saas_live_plan_star";
  24. /**
  25. * The primary key associated with the table.
  26. *
  27. * @var string
  28. */
  29. protected string $primaryKey = "id";
  30. /**
  31. * Indicates if the model should be timestamped.
  32. *
  33. * @var bool
  34. */
  35. public bool $timestamps = false;
  36. public function star(): HasOne
  37. {
  38. return $this->hasOne(SaasStar::class,'unique_id','unique_id');
  39. }
  40. }