12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- namespace app\models\base;
- use Yii;
- /**
- * This is the model class for table "story".
- *
- * @property int $id
- * @property int|null $topic_id
- * @property string|null $title
- * @property string $meta_title
- * @property string $url
- * @property string|null $keywords
- * @property string $description
- * @property int $order
- * @property int $active
- * @property string $show
- * @property string $ext
- */
- class Story extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'story';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['topic_id', 'order', 'active'], 'integer'],
- [['meta_title', 'url', 'description', 'ext'], 'required'],
- [['keywords', 'show', 'ext'], 'string'],
- [['title'], 'string', 'max' => 255],
- [['meta_title'], 'string', 'max' => 70],
- [['url'], 'string', 'max' => 128],
- [['description'], 'string', 'max' => 300],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'topic_id' => 'Topic ID',
- 'title' => 'Title',
- 'meta_title' => 'Meta Title',
- 'url' => 'Url',
- 'keywords' => 'Keywords',
- 'description' => 'Description',
- 'order' => 'Order',
- 'active' => 'Active',
- 'show' => 'Show',
- 'ext' => 'Ext',
- ];
- }
- /**
- * {@inheritdoc}
- * @return StoryQuery the active query used by this AR class.
- */
- public static function find()
- {
- return new StoryQuery(get_called_class());
- }
- }
|