<?php
class CageSetModel extends Orm_Base{
    public $table = 'cage_set';
    public $field = array(
        'id' => array('type' => "int(11)",'comment' => ''),
        'line_num' => array('type' => "varchar(45)",'comment' => '笼位编号'),
        'big_num_max' => array('type' => "varchar(45)",'comment' => '品系'),
        'small_num_max' => array('type' => "int(11)",'comment' => '笼位类型 '),
        'big_small_num' => array('type' => "varchar(255)",'comment' => '笼位颜色'),
        'split_remind' => array('type' => "varchar(255)",'comment' => '实验室对应用户课题组'),
        'timeout_split_remind' => array('type' => "varchar(255)",'comment' => '负责人id'),
        'overload_remind' => array('type' => "varchar(255)",'comment' => '添加人id'),
        'fight' => array('type' => "varchar(255)",'comment' => '二维码信息'),
        'c_user_id' => array('type' => "int(11)",'comment' => '是否删除'),
    );
    public $pk = 'id';
    public function getsetinfo($params){
        $data = $this->field('*')->where('c_user_id='.$params['user_id'])->fRow();
        $data['timeout_split_remind'] = (bool)$data['timeout_split_remind'];
        $data['overload_remind'] = (bool)$data['overload_remind'];
        $data['split_remind'] = (bool)$data['split_remind'];
        return $data;
    }
}

