/
pashko
/
siec
Обзор
Документация
Войти
/
pashko
/
siec
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
common/models/Contact.php
62 строки
1 KB
Kokorin Pavel
copy past sta files
22 апр 2020, 11:01
22 апр 2020, 11:01
6fdb817
Код
Авторство
О чём код?
<?php namespace common\models; use Yii; /** * This is the model class for table "contact". * * @property int $id * @property string $title * @property string $street * @property string $phone * @property string $active * @property int $sort * @property string $zip * @property double $lat * @property double $lon */ class Contact extends \yii\db\ActiveRecord { /** * {@inheritdoc} */ public static function tableName() { return 'contact'; } /** * {@inheritdoc} */ public function rules() { return [ [['title', 'street', 'phone'], 'required'], [['active', 'on_moskva_subdomen'], 'string'], [['sort'], 'integer'], [['lat', 'lon'], 'number'], [['title', 'street', 'phone'], 'string', 'max' => 255], [['zip'], 'string', 'max' => 15], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => Yii::t('app', 'ID'), 'title' => Yii::t('app', 'Title'), 'street' => Yii::t('app', 'Street'), 'phone' => Yii::t('app', 'Phone'), 'active' => Yii::t('app', 'Active'), 'sort' => Yii::t('app', 'Sort'), 'zip' => Yii::t('app', 'Zip'), 'lat' => Yii::t('app', 'Lat'), 'lon' => Yii::t('app', 'Lon'), ]; } }