LocomotiveSeries.php 1011 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace app\models\entity;
  3. use yii\db\ActiveRecord;
  4. /**
  5. * This is the model class for table "locomotive_series".
  6. *
  7. * @property int $id
  8. * @property string $name
  9. * @property int $sections
  10. * @property int $wheelpairs [smallint(6)]
  11. */
  12. class LocomotiveSeries extends ActiveRecord
  13. {
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public static function tableName()
  18. {
  19. return 'locomotive_series';
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function rules()
  25. {
  26. return [
  27. [['name', 'sections'], 'required'],
  28. [['sections','wheelpairs'], 'integer'],
  29. [['name'], 'string', 'max' => 255],
  30. ];
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function attributeLabels()
  36. {
  37. return [
  38. 'id' => 'ID',
  39. 'name' => 'Серия локомотива',
  40. 'sections' => 'Количество секций',
  41. 'wheelpairs' => 'Количество клесных пар',
  42. ];
  43. }
  44. }