123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace app\models\entity;
- use Yii;
- /**
- * This is the model class for table "locations".
- *
- * @property int $id
- * @property string $name
- * @property string $description
- * @property int $x
- * @property int $y
- * @property int $company_id
- * @property string $type
- */
- class Locations extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'locations';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['name'], 'required'],
- [['x', 'y', 'company_id'], 'integer'],
- [['name', 'description'], 'string', 'max' => 255],
- [['img'], 'safe'],
- [['type'], 'string', 'max' => 15],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'name' => 'ID датчика',
- 'description' => 'Описание',
- 'x' => 'X',
- 'y' => 'Y',
- 'company_id' => 'Company ID',
- 'type' => 'Type',
- ];
- }
- }
|