SaasComboLog.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace app\model\saas;
  3. use app\extra\basic\Model;
  4. /**
  5. * @property integer $id (主键)
  6. * @property integer $agent_id
  7. * @property integer $shop_id
  8. * @property mixed $order_sn
  9. * @property integer $time 续费时长-天
  10. * @property integer $money 金额
  11. * @property integer $status 0待付款1已支付
  12. * @property mixed $pay_at 支付时间
  13. * @property string $transaction_id 交易编号wx
  14. * @property mixed $create_at
  15. */
  16. class SaasComboLog extends Model
  17. {
  18. /**
  19. * The connection name for the model.
  20. *
  21. * @var string|null
  22. */
  23. protected $connection = 'mysql';
  24. /**
  25. * The table associated with the model.
  26. *
  27. * @var string
  28. */
  29. protected string $table = "saas_combo_log";
  30. /**
  31. * The primary key associated with the table.
  32. *
  33. * @var string
  34. */
  35. protected string $primaryKey = "id";
  36. /**
  37. * Indicates if the model should be timestamped.
  38. *
  39. * @var bool
  40. */
  41. public bool $timestamps = false;
  42. public function getMoneyAttr($val): string
  43. {
  44. return format_money($val/100,2);
  45. }
  46. }