get('dbXcoq'); } /** * @inheritdoc */ public function rules() { return [ [['create_date', 'modify_date', 'createdatea', 'modifydatea'], 'safe'], [['content', 'hits', 'title', 'article_category_id'], 'required'], [['content', 'min_content'], 'string'], [['down', 'hits', 'up', 'article_category_id'], 'integer'], [['is_publication', 'is_recommend', 'is_top'], 'boolean'], [['author', 'image_path', 'link_url', 'sub_title', 'title', 'meta_imge'], 'string', 'max' => 255], [['meta_description', 'meta_keywords'], 'string', 'max' => 3000], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'create_date' => 'Create Date', 'modify_date' => 'Modify Date', 'author' => 'Author', 'content' => 'Content', 'down' => 'Down', 'hits' => 'Hits', 'image_path' => 'Image Path', 'is_publication' => 'Is Publication', 'is_recommend' => 'Is Recommend', 'is_top' => 'Is Top', 'link_url' => 'Link Url', 'meta_description' => 'Meta Description', 'meta_keywords' => 'Meta Keywords', 'min_content' => 'Min Content', 'sub_title' => 'Sub Title', 'title' => 'Title', 'up' => 'Up', 'article_category_id' => 'Article Category ID', 'createdatea' => 'Createdatea', 'modifydatea' => 'Modifydatea', 'meta_imge' => 'Meta Imge', ]; } // 关联 public function getCategory() { return $this->hasOne(ArticleCategory::className(), ['id' => 'article_category_id']); } }