1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- namespace app\modules\car\models;
- use Yii;
- /**
- * This is the model class for table "{{%f_one_car_cost}}".
- *
- * @property int $id 序号
- * @property int $car_id 外键关联f_car_infor(car_id)
- * @property float|null $oil_costs 燃油
- * @property float|null $repair_costs 维修
- * @property float|null $rent_costs 租赁
- * @property float|null $insurance_costs 保险
- * @property float|null $road_bridge_costs 路桥
- * @property float|null $year_check_costs 年检
- * @property float|null $other_costs 其他
- * @property float|null $sum_costs 月费用合计
- * @property int|null $year 年
- * @property int|null $month 月
- */
- class FOneCarCost extends \app\common\models\EActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%f_one_car_cost}}';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['car_id'], 'required'],
- [['car_id', 'year', 'month'], 'integer'],
- [['oil_costs', 'repair_costs', 'rent_costs', 'insurance_costs', 'road_bridge_costs', 'year_check_costs', 'other_costs', 'sum_costs'], 'number'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => '序号',
- 'car_id' => '外键关联f_car_infor(car_id)',
- 'oil_costs' => '燃油',
- 'repair_costs' => '维修',
- 'rent_costs' => '租赁',
- 'insurance_costs' => '保险',
- 'road_bridge_costs' => '路桥',
- 'year_check_costs' => '年检',
- 'other_costs' => '其他',
- 'sum_costs' => '月费用合计',
- 'year' => '年',
- 'month' => '月',
- ];
- }
- }
|