FFuelHkm.php 1.0 KB

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