鼠笼管理系统
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.
squirrel_cage/application/models/SquirrelSet.php

27 lines
1.4 KiB

7 months ago
<?php
class SquirrelSetModel extends Orm_Base{
public $table = 'squirrel_set';
public $field = array(
'id' => array('type' => "int(11)",'comment' => ''),
'weaning_time' => array('type' => "varchar(45)",'comment' => '笼位编号'),
'nursing_time' => array('type' => "varchar(45)",'comment' => '断奶时间'),
'male_grow_time' => array('type' => "int(11)",'comment' => '雄性鼠成长时间'),
'female_grow_time' => array('type' => "varchar(255)",'comment' => '雌性鼠成长时间'),
'infertility_time' => array('type' => "varchar(255)",'comment' => '不育鼠时间'),
'dose_time' => array('type' => "varchar(255)",'comment' => '给药后持续几天显示给药标识'),
'color_time' => array('type' => "varchar(255)",'comment' => '记住几个近期给药的颜色'),
'breeding_tag' => array('type' => "varchar(255)",'comment' => '配繁标识'),
'see_bole_tag' => array('type' => "varchar(255)",'comment' => '见栓标识'),
'user_id' => array('type' => "int(11)",'comment' => '添加用户id'),
'created' => array('type' => "int(11)",'comment' => '添加时间'),
);
public $pk = 'id';
public function getsetinfo($params){
$data = $this->field('*')->where('user_id='.$params['user_id'])->fRow();
7 months ago
$data['breeding_tag'] = (bool) $data['breeding_tag'];
$data['see_bole_tag'] = (bool) $data['see_bole_tag'];
7 months ago
return $data;
}
}