NewsTopicRelation.php 923 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace app\models\base;
  3. use Yii;
  4. /**
  5. * This is the model class for table "news_topic_relation".
  6. *
  7. * @property int $news_id
  8. * @property int $topic_id
  9. */
  10. class NewsTopicRelation extends \yii\db\ActiveRecord
  11. {
  12. /**
  13. * {@inheritdoc}
  14. */
  15. public static function tableName()
  16. {
  17. return 'news_topic_relation';
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function rules()
  23. {
  24. return [
  25. [['news_id', 'topic_id'], 'integer'],
  26. ];
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function attributeLabels()
  32. {
  33. return [
  34. 'news_id' => 'News ID',
  35. 'topic_id' => 'Topic ID',
  36. ];
  37. }
  38. /**
  39. * {@inheritdoc}
  40. * @return NewsTopicRelationQuery the active query used by this AR class.
  41. */
  42. public static function find()
  43. {
  44. return new NewsTopicRelationQuery(get_called_class());
  45. }
  46. }