SaasUser.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 $openid
  8. * @property integer $agent_id
  9. * @property integer $shop_id
  10. * @property integer $balance 余额
  11. * @property integer $total_balance 累计充值
  12. * @property integer $total_consume 累计消费
  13. * @property mixed $create_at
  14. */
  15. class SaasUser extends Model
  16. {
  17. /**
  18. * The connection name for the model.
  19. *
  20. * @var string|null
  21. */
  22. protected $connection = 'mysql';
  23. /**
  24. * The table associated with the model.
  25. *
  26. * @var string
  27. */
  28. protected string $table = "saas_user";
  29. /**
  30. * The primary key associated with the table.
  31. *
  32. * @var string
  33. */
  34. protected string $primaryKey = "id";
  35. /**
  36. * Indicates if the model should be timestamped.
  37. *
  38. * @var bool
  39. */
  40. public bool $timestamps = false;
  41. public function shop(): HasOne
  42. {
  43. return $this->hasOne("app\model\saas\SaasShop","shop_id","shop_id");
  44. }
  45. }