<?php

namespace App\Models;
use DB;

/**
 *
 */
class Set_startcode extends BaseModel {
	protected $table = 'set_startcode';
	public $timestamps = false;

	//获取游戏起始号码列表
	protected function Datalist($list, $page, $where){
		$data = $this->select('set_startcode.*','game_type.name as game_name')->orderBy('start_date', 'desc');
		if (!empty($where) && is_array($where)) {
			$data = $data->where($where);
		}
		$data = $data->join('game_type','game_type.table_name','set_startcode.game')->paginate($list);

		if (!$data) {
			return -4010010022; //没有数据
		}
		return $data->toArray();
	}
}

?>