HxGoods.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace app\model\hx;
  3. use app\extra\basic\Model;
  4. use think\model\relation\HasOne;
  5. /**
  6. * @property integer $id (主键)
  7. * @property mixed $product_id
  8. * @property string $product_name
  9. * @property integer $biz_line 业务线
  10. * @property integer $product_type
  11. * @property mixed $pois poi
  12. * @property integer $actual_amount
  13. * @property string $cover
  14. * @property integer $sold_end_time
  15. * @property integer $sold_start_time
  16. * @property mixed $create_at
  17. */
  18. class HxGoods 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 = "hx_goods";
  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 agent(): HasOne
  45. {
  46. return $this->hasOne(HxAgent::class,"agent_id","agent_id");
  47. }
  48. }