123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- /**
- * Created by CRMEB.
- * Copyright (c) 2017~2019 http://www.crmeb.com All rights reserved.
- * Author: liaofei <136327134@qq.com>
- * Date: 2019/3/27 21:44
- */
- namespace app\models\system;
- use app\models\store\StoreOrder;
- use think\facade\Cache;
- use crmeb\traits\ModelTrait;
- use crmeb\basic\BaseModel;
- /**
- * TODO 用户消费新增金额明细 model
- * Class UserBill
- * @package app\models\user
- */
- class SystemBill extends BaseModel
- {
- /**
- * 数据表主键
- * @var string
- */
- protected $pk = 'id';
- /**
- * 模型名称
- * @var string
- */
- protected $name = 'system_bill';
- use ModelTrait;
- public static function income($title, $site_id, $category, $type, $number, $link_id = 0, $balance = 0, $mark = '', $status = 1)
- {
- $pm = 1;
- $add_time = time();
- return self::create(compact('title', 'site_id', 'link_id', 'category', 'type', 'number', 'balance', 'mark', 'status', 'pm', 'add_time'));
- }
- public static function expend($title, $site_id, $category, $type, $number, $link_id = 0, $balance = 0, $mark = '', $status = 1)
- {
- $pm = 0;
- $add_time = time();
- return self::create(compact('title', 'site_id', 'link_id', 'category', 'type', 'number', 'balance', 'mark', 'status', 'pm', 'add_time'));
- }
- }
|