SaasUserLog.php 1017 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 $uid
  8. * @property integer $shop_id
  9. * @property integer $money 金额
  10. * @property integer $type 1出2进
  11. * @property mixed $create_at
  12. */
  13. class SaasUserLog 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_user_log";
  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 getMoneyAttr($data)
  40. {
  41. return format_money($data/100);
  42. }
  43. }