123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace app\models\entity;
- use Yii;
- /**
- * This is the model class for table "sections".
- *
- * @property int $id
- * @property string $name
- * @property string $locomotive_series
- * @property string $section_number
- * @property string $section_subnumber
- * @property string $dc_repair
- * @property string $type_repair
- */
- class Sections extends \yii\db\ActiveRecord
- {
- const SCENARIO_ADD_SECTION = 'add_section';
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'sections';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- //[['name', 'locomotive_series', 'section_number', 'section_subnumber', 'dc_repair', 'type_repair', 'date_start_repair'], 'required'],
- //[['section_subnumber'], 'unique'],
- [['section_number', 'section_subnumber','locomotive_series'], 'unique', 'targetAttribute' => ['section_number', 'section_subnumber','locomotive_series']],
- //['image', 'required', 'except' => self::SCENARIO_UPDATE_POST]
- //[['locomotive_series', 'section_number', 'section_subnumber', 'diagnostic_map'], 'string', 'max' => 255],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'locomotive_series' => 'Locomotive Series',
- 'section_number' => 'Section Number',
- 'section_subnumber' => 'Section Subnumber',
- 'diagnostic_map' => 'Диагностическая карта',
- //'type_repair' => 'Type Repair',
- ];
- }
- }
|