刮刮后端接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
976 B

<?php
declare (strict_types = 1);
namespace app\model;
use think\Model;
/**
* @mixin \think\Model
*/
class AdminDownScoresRecords extends Model
{
/**
* 创建下分记录
* @param $relation_id // 用户 | 代理id
* @param $admin_id
* @param $withdrawal_amount
* @param $withdrawal_balance
* @param $relation_type // 1=用户 2=代理
* @return mixed
*/
public static function createRecords($relation_id,$admin_id,$withdrawal_amount,$withdrawal_balance,$relation_type = 1)
{
$Records = new AdminDownScoresRecords();
$Records->relation_id = $relation_id;
$Records->relation_type = $relation_type;
$Records->admin_id = $admin_id;
$Records->withdrawal_amount = $withdrawal_amount;
$Records->withdrawal_balance = $withdrawal_balance;
$Records->create_time = date("Y-m-d H:i:s",time());
$Records->save();
return $Records->id;
}
}