| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace app\common\model;
- use think\Model;
- class WithDrawLogModel extends Model
- {
- protected $name = 'withdraw_log';
- /**
- * 关联user
- * @return \think\model\relation\BelongsTo
- */
- public function user ()
- {
- return $this->belongsTo('app\common\model\UserModel', 'uid', 'id');
- }
- /**
- * 记录
- * @param $param
- * @return array
- * @throws \think\db\exception\DbException
- */
- public function getLog ($param)
- {
- $data = self::where('uid', $param->uid)
- ->field('practical_money,create_at,status,fail_log')
- ->order('create_at', 'desc')
- ->paginate($param->data['limit'])
- ->toArray();
- return $data['data'];
- }
- }
|