FOperatingCostMonitor.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace app\modules\car\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%f_operating_cost_monitor}}".
  6. *
  7. * @property int $id 序号
  8. * @property int $car_id 外键关联f_car_infor(car_id)
  9. * @property float|null $oil_costs 油料费
  10. * @property float|null $insurance_costs 保险费
  11. * @property float|null $repair_costs 维修费用
  12. * @property float|null $road_bridge_costs 路桥费
  13. * @property float|null $sum_cost 合计
  14. * @property int|null $year 归属年份
  15. * @property int|null $month 归属月份
  16. */
  17. class FOperatingCostMonitor extends \app\common\models\EActiveRecord
  18. {
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public static function tableName()
  23. {
  24. return '{{%f_operating_cost_monitor}}';
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function rules()
  30. {
  31. return [
  32. [['car_id'], 'required'],
  33. [['car_id', 'year', 'month'], 'integer'],
  34. [['oil_costs', 'insurance_costs', 'repair_costs', 'road_bridge_costs', 'sum_cost'], 'number'],
  35. ];
  36. }
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function attributeLabels()
  41. {
  42. return [
  43. 'id' => '序号',
  44. 'car_id' => '外键关联f_car_infor(car_id)',
  45. 'oil_costs' => '油料费',
  46. 'insurance_costs' => '保险费',
  47. 'repair_costs' => '维修费用',
  48. 'road_bridge_costs' => '路桥费',
  49. 'sum_cost' => '合计',
  50. 'year' => '归属年份',
  51. 'month' => '归属月份',
  52. ];
  53. }
  54. }