AisBill.php 905 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017 https://www.sapixx.com All rights reserved.
  4. * @license Licensed (http://www.apache.org/licenses/LICENSE-2.0).
  5. * @author pillar<ltmn@qq.com>
  6. * 收益记录表
  7. */
  8. namespace app\ais\model;
  9. use think\Model;
  10. class AisBill extends Model{
  11. public function user(){
  12. return $this->hasOne('app\common\model\SystemUser','id','pay_uid');
  13. }
  14. /**
  15. * [log 增加财务日志]
  16. */
  17. public static function add(array $param,$message){
  18. $data['member_miniapp_id'] = intval($param['member_miniapp_id']);
  19. $data['uid'] = intval($param['uid']);
  20. $data['store_id'] = intval($param['store_id']);
  21. $data['money'] = money($param['money']);
  22. $data['message'] = $message;
  23. $data['update_time'] = time();
  24. return self::create($data);
  25. }
  26. }