Cash.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: qisse
  5. * Date: 2017/6/27
  6. * Time: 20:02
  7. */
  8. namespace app\core\model;
  9. use think\Config;
  10. use think\Log;
  11. use think\Model;
  12. use tool\Common;
  13. class Cash extends Model
  14. {
  15. protected $resultSetType = 'collection';
  16. protected $updateTime = 'updateTime';
  17. protected $createTime = 'addTime';
  18. protected $autoWriteTimestamp = true;
  19. const MODE_CANG = 'MODE_CANG';//满多少送金
  20. const MODE_INTRODUCE = 'MODE_INTRODUCE';//邀请,满多少送金
  21. const MODE_INTRODUCE_BEI = 'MODE_INTRODUCE_BEI';//邀请,满多少送金
  22. const MODE_INTRODUCE_COMMISSION = 'MODE_INTRODUCE_COMMISSION';//邀请,满多少送金
  23. const STATUS_OK = 1;
  24. const STATUS_ERROR = 2;
  25. public function setMoneyAttr($value) {
  26. return $value * 100;
  27. }
  28. public function getMoneyAttr($value) {
  29. return Common::price2($value / 100);
  30. }
  31. public function getEstimateTimeAttr($value) {
  32. return Common::timetodate($value, 0);
  33. }
  34. public function getResultTimeAttr($value) {
  35. return Common::timetodate($value);
  36. }
  37. }