Sections-obsolete.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\models\entity;
  3. use Yii;
  4. /**
  5. * This is the model class for table "sections".
  6. *
  7. * @property int $id
  8. * @property string $name
  9. * @property string $locomotive_series
  10. * @property string $section_number
  11. * @property string $section_subnumber
  12. * @property string $dc_repair
  13. * @property string $type_repair
  14. * @property string $date_start_repair
  15. */
  16. class Sections extends \yii\db\ActiveRecord
  17. {
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public static function tableName()
  22. {
  23. return 'sections';
  24. }
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function rules()
  29. {
  30. return [
  31. //[['name', 'locomotive_series', 'section_number', 'section_subnumber', 'dc_repair', 'type_repair', 'date_start_repair'], 'required'],
  32. [['date_start_repair'], 'safe'],
  33. [['name', 'locomotive_series', 'section_number', 'section_subnumber', 'dc_repair', 'type_repair'], 'string', 'max' => 255],
  34. ];
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. public function attributeLabels()
  40. {
  41. return [
  42. 'id' => 'ID',
  43. 'name' => 'Name',
  44. 'locomotive_series' => 'Locomotive Series',
  45. 'section_number' => 'Section Number',
  46. 'section_subnumber' => 'Section Subnumber',
  47. 'dc_repair' => 'Dc Repair',
  48. 'type_repair' => 'Type Repair',
  49. 'date_start_repair' => 'Date Start Repair',
  50. ];
  51. }
  52. }