FStatsFuelHkm.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace app\modules\car\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%f_stats_fuel_hkm}}".
  6. *
  7. * @property int $id 序号
  8. * @property string|null $city 地市
  9. * @property string|null $dpt_sec 二级单位
  10. * @property string|null $grid 网格
  11. * @property string|null $car_src 车辆来源
  12. * @property string|null $car_type 车辆类型
  13. * @property string|null $using_tag 车辆使用性质
  14. * @property float|null $oil_hkm 百公里油耗
  15. * @property int|null $year 年
  16. * @property int|null $month 月
  17. */
  18. class FStatsFuelHkm extends \app\common\models\EActiveRecord
  19. {
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public static function tableName()
  24. {
  25. return '{{%f_stats_fuel_hkm}}';
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function rules()
  31. {
  32. return [
  33. [['oil_hkm'], 'number'],
  34. [['year', 'month'], 'integer'],
  35. [['city', 'dpt_sec', 'grid', 'car_src', 'car_type', 'using_tag'], 'string', 'max' => 255],
  36. ];
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'id' => '序号',
  45. 'city' => '地市',
  46. 'dpt_sec' => '二级单位',
  47. 'grid' => '网格',
  48. 'car_src' => '车辆来源',
  49. 'car_type' => '车辆类型',
  50. 'using_tag' => '车辆使用性质',
  51. 'oil_hkm' => '百公里油耗',
  52. 'year' => '年',
  53. 'month' => '月',
  54. ];
  55. }
  56. }