/
pashko
/
siec
Обзор
Документация
Войти
/
pashko
/
siec
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
common/models/Supply.php
79 строк
2 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 "supply". * * @property int $id * @property string $title * @property int $sort * @property string $active * @property string $city_departure * @property string $city_receipt * @property int $weight * @property double $volume * @property int $price * @property int $time * @property int $delivery_cost * @property double $custom_payment */ class Supply extends \yii\db\ActiveRecord { /** * @inheritdoc */ public static function tableName() { return 'supply'; } function behaviors() { return [ 'images' => [ 'class' => 'dvizh\gallery\behaviors\AttachImages', 'mode' => 'single', 'quality' => 60, 'galleryId' => 'picture' ], ]; } /** * @inheritdoc */ public function rules() { return [ [['title'], 'required'], [['sort', 'weight', 'price', 'time', 'delivery_cost'], 'integer'], [['active'], 'string'], [['volume', 'custom_payment'], 'number'], [['title', 'city_departure', 'city_receipt'], 'string', 'max' => 255], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'title' => 'Title', 'sort' => 'Sort', 'active' => 'Active', 'city_departure' => 'City Departure', 'city_receipt' => 'City Receipt', 'weight' => 'Weight', 'volume' => 'Volume', 'price' => 'Price', 'time' => 'Time', 'delivery_cost' => 'Delivery Cost', 'custom_payment' => 'Custom Payment', ]; } }