100], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'title' => 'Title', 'submit_date' => 'Submit Date', 'total_all' => 'Total All', 'total_right' => 'Total Right', 'total_error' => 'Total Error', 'total_none' => 'Total None', 'user_id' => 'User ID', 'user_name' => 'User Name', 'import_type' => 'Import Type', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } public function getUser() { return $this->hasOne(UserT::className(),['id'=>'user_id']); } //返回匹对名称 public function getImportName(){ switch($this->import_type){ case 1: return '手续费'; break; case 2: return '补点一'; break; case 3: return '补点二'; break; default: return ''; } } }