SaasOrderVerify.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 $order_sn
  8. * @property mixed $certificate_id
  9. * @property mixed $verify_id
  10. * @property integer $status 0核销成功1撤销成功
  11. * @property mixed $create_at
  12. */
  13. class SaasOrderVerify extends Model
  14. {
  15. /**
  16. * The connection name for the model.
  17. *
  18. * @var string|null
  19. */
  20. protected $connection = 'mysql';
  21. /**
  22. * The table associated with the model.
  23. *
  24. * @var string
  25. */
  26. protected string $table = "saas_order_verify";
  27. /**
  28. * The primary key associated with the table.
  29. *
  30. * @var string
  31. */
  32. protected string $primaryKey = "id";
  33. /**
  34. * Indicates if the model should be timestamped.
  35. *
  36. * @var bool
  37. */
  38. public bool $timestamps = false;
  39. public function orders(): HasOne
  40. {
  41. return $this->hasOne(SaasOrder::class,"order_sn","order_sn");
  42. }
  43. public function poi(): HasOne
  44. {
  45. return $this->hasOne(SaasStore::class,"poi_id","poi_id");
  46. }
  47. }