| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace common\models;
- use Yii;
- /**
- * This is the model class for table "{{%ARTICLE}}".
- *
- * @property string $ID
- * @property string $TITLE 标题
- * @property string $CID 分类ID
- * @property string $CONTENT 内容
- * @property int $STATUS 状态
- * @property int $SORT 排序值
- * @property int $CREATED_AT 创建时间
- */
- class Article extends \common\components\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%ARTICLE}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['CID', 'CREATED_AT'], 'required'],
- [['STATUS', 'CREATED_AT', 'SORT'], 'integer'],
- [['ID', 'CID'], 'string', 'max' => 32],
- [['TITLE'], 'string', 'max' => 255],
- [['CONTENT'], 'string', 'max' => 4000],
- [['TITLE'], 'unique'],
- [['ID'], 'unique'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'ID' => 'ID',
- 'TITLE' => 'Title', // 标题
- 'CID' => 'Category Type', // 分类
- 'CONTENT' => 'Content', // 内容
- 'STATUS' => 'State', // 状态
- 'Order' => 'Sort', // 排序
- 'CREATED_AT' => 'Creation Time', // 创建时间
- ];
- }
- }
|