<?php
/**
*------Create thems Model------
*------SCWPHP  Version 1.0.0------
*------Dev Model Jions------
*------Create Time 2017-06-28 13:05:26------
*/
namespace App\Commons\Model;
use \System\Model;
class Money_details extends Model {

public $timestamps = false;
protected $table = 'money_details';
    function countUser($timearea, $array) {
        $data = $this->select('account_name')->whereBetween('money_time', $timearea)->whereIn('trade_type', $array)->groupBy('account_name')->get();
        if (!$data) {
            return 0;
        }
        $data = $data->toArray();
        return count($data);
    }
}
