FCarCondition.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace app\modules\car\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%f_car_condition}}".
  6. *
  7. * @property int $id 序号
  8. * @property int $car_id 外键关联f_car_infor(car_id)
  9. * @property float|null $mileage 行驶里程
  10. * @property float|null $car_age 车龄
  11. * @property int|null $is_overage 是否超龄
  12. * @property int|null $year 年
  13. * @property int|null $month 月
  14. */
  15. class FCarCondition extends \app\common\models\EActiveRecord
  16. {
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public static function tableName()
  21. {
  22. return '{{%f_car_condition}}';
  23. }
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function rules()
  28. {
  29. return [
  30. [['car_id'], 'required'],
  31. [['car_id', 'is_overage', 'year', 'month'], 'integer'],
  32. [['mileage', 'car_age'], 'number'],
  33. ];
  34. }
  35. /**
  36. * {@inheritdoc}
  37. */
  38. public function attributeLabels()
  39. {
  40. return [
  41. 'id' => '序号',
  42. 'car_id' => '外键关联f_car_infor(car_id)',
  43. 'mileage' => '行驶里程',
  44. 'car_age' => '车龄',
  45. 'is_overage' => '是否超龄',
  46. 'year' => '年',
  47. 'month' => '月',
  48. ];
  49. }
  50. }