Chat.php 486 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\models\entity;
  3. use yii\db\ActiveRecord;
  4. class Chat extends ActiveRecord
  5. {
  6. /**
  7. * @return string название таблицы, сопоставленной с этим ActiveRecord-классом.
  8. */
  9. public static function tableName()
  10. {
  11. return '{{chat}}';
  12. }
  13. /**
  14. * @return \yii\db\ActiveQuery
  15. */
  16. public function getAccounts()
  17. {
  18. return $this->hasOne(Accounts::class, ['id' => 'acc_id']);
  19. }
  20. }