FOneCarCost.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace app\modules\car\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%f_one_car_cost}}".
  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 $repair_costs 维修
  11. * @property float|null $rent_costs 租赁
  12. * @property float|null $insurance_costs 保险
  13. * @property float|null $road_bridge_costs 路桥
  14. * @property float|null $year_check_costs 年检
  15. * @property float|null $other_costs 其他
  16. * @property float|null $sum_costs 月费用合计
  17. * @property int|null $year 年
  18. * @property int|null $month 月
  19. */
  20. class FOneCarCost extends \app\common\models\EActiveRecord
  21. {
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public static function tableName()
  26. {
  27. return '{{%f_one_car_cost}}';
  28. }
  29. /**
  30. * {@inheritdoc}
  31. */
  32. public function rules()
  33. {
  34. return [
  35. [['car_id'], 'required'],
  36. [['car_id', 'year', 'month'], 'integer'],
  37. [['oil_costs', 'repair_costs', 'rent_costs', 'insurance_costs', 'road_bridge_costs', 'year_check_costs', 'other_costs', 'sum_costs'], 'number'],
  38. ];
  39. }
  40. /**
  41. * {@inheritdoc}
  42. */
  43. public function attributeLabels()
  44. {
  45. return [
  46. 'id' => '序号',
  47. 'car_id' => '外键关联f_car_infor(car_id)',
  48. 'oil_costs' => '燃油',
  49. 'repair_costs' => '维修',
  50. 'rent_costs' => '租赁',
  51. 'insurance_costs' => '保险',
  52. 'road_bridge_costs' => '路桥',
  53. 'year_check_costs' => '年检',
  54. 'other_costs' => '其他',
  55. 'sum_costs' => '月费用合计',
  56. 'year' => '年',
  57. 'month' => '月',
  58. ];
  59. }
  60. }