FOneCarOneTable.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. namespace app\modules\car\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%f_one_car_one_table}}".
  6. *
  7. * @property int $id
  8. * @property int $card_id 外键关联f_car_infor(car_id)
  9. * @property float|null $current_mileage 当前里程
  10. * @property string|null $car_status 车况
  11. * @property int|null $year_info 数据年份
  12. * @property int|null $month_info 数据月份
  13. * @property float|null $oil_costs 当月油费
  14. * @property float|null $repair_costs 当月维修费
  15. * @property float|null $road_bridge_costs 当月路桥费
  16. * @property float|null $rent_costs 当月租赁费
  17. * @property float|null $insurance_costs 当月保险费
  18. * @property float|null $year_check_costs 当月年检费
  19. * @property float|null $other_costs 当月其他费用
  20. * @property float|null $sum_costs 当月总费用
  21. * @property float|null $sum_mileage 当月总行驶里程
  22. * @property float|null $attendance 当月出勤率
  23. * @property int|null $is_inefficient 是否低效
  24. * @property float|null $oil_per_km 当月每公里油费
  25. * @property float|null $repair_per_km 当月每公里维修费
  26. * @property float|null $sum_costs_per_km 当月每公里总费用
  27. * @property int|null $violations_times 当月违规次数
  28. */
  29. class FOneCarOneTable extends \app\common\models\EActiveRecord
  30. {
  31. /**
  32. * {@inheritdoc}
  33. */
  34. public static function tableName()
  35. {
  36. return '{{%f_one_car_one_table}}';
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function rules()
  42. {
  43. return [
  44. [['car_id'], 'required'],
  45. [['car_id', 'year_info', 'month_info', 'is_inefficient', 'violations_times'], 'integer'],
  46. [['current_mileage', 'oil_costs', 'repair_costs', 'road_bridge_costs', 'rent_costs', 'insurance_costs', 'year_check_costs', 'other_costs', 'sum_costs', 'sum_mileage', 'attendance', 'oil_per_km', 'repair_per_km', 'sum_costs_per_km'], 'number'],
  47. [['car_status'], 'string', 'max' => 63],
  48. ];
  49. }
  50. /**
  51. * {@inheritdoc}
  52. */
  53. public function attributeLabels()
  54. {
  55. return [
  56. 'id' => 'ID',
  57. 'car_id' => '外键关联f_car_infor(car_id)',
  58. 'current_mileage' => '当前里程',
  59. 'car_status' => '车况',
  60. 'year_info' => '数据年份',
  61. 'month_info' => '数据月份',
  62. 'oil_costs' => '当月油费',
  63. 'repair_costs' => '当月维修费',
  64. 'road_bridge_costs' => '当月路桥费',
  65. 'rent_costs' => '当月租赁费',
  66. 'insurance_costs' => '当月保险费',
  67. 'year_check_costs' => '当月年检费',
  68. 'other_costs' => '当月其他费用',
  69. 'sum_costs' => '当月总费用',
  70. 'sum_mileage' => '当月总行驶里程',
  71. 'attendance' => '当月出勤率',
  72. 'is_inefficient' => '是否低效',
  73. 'oil_per_km' => '当月每公里油费',
  74. 'repair_per_km' => '当月每公里维修费',
  75. 'sum_costs_per_km' => '当月每公里总费用',
  76. 'violations_times' => '当月违规次数',
  77. ];
  78. }
  79. }