1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace app\models\base;
- use Yii;
- /**
- * This is the model class for table "story_relation".
- *
- * @property int $news_id
- * @property int $topic_id
- * @property string $type
- */
- class StoryRelation extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'story_relation';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['news_id', 'topic_id'], 'integer'],
- [['type'], 'required'],
- [['type'], 'string', 'max' => 32],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'news_id' => 'News ID',
- 'topic_id' => 'Topic ID',
- 'type' => 'Type',
- ];
- }
- /**
- * {@inheritdoc}
- * @return StoryRelationQuery the active query used by this AR class.
- */
- public static function find()
- {
- return new StoryRelationQuery(get_called_class());
- }
- }
|