ywtc_api/application/member/model/MemberBalanceLogs.php

47 lines
1.4 KiB
PHP

<?php
// +----------------------------------------------------------------------
// | 海豚PHP框架 [ DolphinPHP ]
// +----------------------------------------------------------------------
// | 版权所有 2016~2019 广东卓锐软件有限公司 [ http://www.zrthink.com ]
// +----------------------------------------------------------------------
// | 官方网站: http://dolphinphp.com
// +----------------------------------------------------------------------
namespace app\member\model;
use think\Model as ThinkModel;
/**
* 模型
* @package app\advert\model
*/
class MemberBalanceLogs extends ThinkModel
{
// 设置当前模型对应的完整数据表名称
protected $name = 'member_balancelogs';
// 自动写入时间戳
protected $autoWriteTimestamp = true;
/**
* 添加日志
* @param int $uid 所属用户
* @param int $category 类型 1增加 2减少
* @param string $value 数值
* @param int $orderid 所属订单
* @param string $mark 备注
* @author lily<lilyforworks@163.com>
*/
public static function addGetLog($uid,$category,$value,$orderid,$mark,$touid=0){
$res = self::create([
'uid'=>$uid,
'category'=>$category,
'value'=>$value,
'orderid'=>$orderid,
'mark'=>$mark,
'to_uid'=>$touid,
]);
return $res;
}
}