SaasUserBuy.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 integer $agent_id
  8. * @property integer $uid
  9. * @property integer $shop_id
  10. * @property mixed $order_sn
  11. * @property integer $money 金额
  12. * @property integer $status 0待付款1已支付
  13. * @property mixed $pay_at 支付时间
  14. * @property string $transaction_id 交易编号wx
  15. * @property mixed $create_at
  16. */
  17. class SaasUserBuy extends Model
  18. {
  19. /**
  20. * The connection name for the model.
  21. *
  22. * @var string|null
  23. */
  24. protected $connection = 'mysql';
  25. /**
  26. * The table associated with the model.
  27. *
  28. * @var string
  29. */
  30. protected string $table = "saas_user_buy";
  31. /**
  32. * The primary key associated with the table.
  33. *
  34. * @var string
  35. */
  36. protected string $primaryKey = "id";
  37. /**
  38. * Indicates if the model should be timestamped.
  39. *
  40. * @var bool
  41. */
  42. public bool $timestamps = false;
  43. public function card(): HasOne
  44. {
  45. return $this->hasOne("app\model\saas\SaasUser","card_no","card_no");
  46. }
  47. public function orders(): HasOne
  48. {
  49. return $this->hasOne("app\model\saas\SaasOrder","order_sn","order_sn");
  50. }
  51. }