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.
83 lines
1.5 KiB
83 lines
1.5 KiB
<?php
|
|
|
|
namespace common\models;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "brand_t".
|
|
*
|
|
* @property integer $id
|
|
* @property string $name
|
|
* @property string $created_at
|
|
* @property string $updated_at
|
|
*/
|
|
class MeetT extends \common\models\Base
|
|
{
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'car_meet';
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['name'], 'required'],
|
|
[['created_at', 'updated_at'], 'safe'],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'code' => 'Code',
|
|
'name' => 'Name',
|
|
'state' => 'State',
|
|
'created_at' => 'Created At',
|
|
'updated_at' => 'Updated At',
|
|
];
|
|
}
|
|
|
|
//返回全部信息
|
|
static public function getAllData($mtype=0){
|
|
|
|
$list = self::find()
|
|
->where('state = 1 and mtype ='.$mtype)
|
|
->orderBy('id ASC')
|
|
->all();
|
|
|
|
return $list;
|
|
}
|
|
|
|
public function getShowName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function getShowType()
|
|
{
|
|
switch($this->mtype){
|
|
case 1:
|
|
$type = '新保(续保)组';
|
|
break;
|
|
case 2:
|
|
$type = '跟踪组';
|
|
break;
|
|
default:
|
|
$type = '(未选择)';
|
|
}
|
|
return $type;
|
|
}
|
|
|
|
}
|
|
|