12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\models\entity;
- use Yii;
- use yii\db\ActiveRecord;
- /**
- * @property int $id [int(11)]
- * @property string $name [varchar(255)]
- * @property string $ceo [varchar(255)]
- * @property string $address [varchar(255)]
- * @property string $active [bit(1)]
- * @property string $logo [varchar(255)]
- * @property string $last_assign [datetime]
- * @property string $last_invalid_tasks_check [datetime]
- * @property int $confirm_default_timeout_seconds [int(11)]
- */
- class Companies extends ActiveRecord
- {
- /**
- * @return string название таблицы, сопоставленной с этим ActiveRecord-классом.
- */
- public static function tableName()
- {
- return '{{companies}}';
- }
-
- public function getAccounts()
- {
- return $this->hasMany(Accounts::className(), ['company_id' => 'id']);
- }
- }
|