package dao

import (
	"server/global"
)

type DailyFeeDetails struct {
	global.GVA_MODEL
	DailyFeeId uint    `json:"dailyFeeId" form:"dailyFeeId" gorm:"comment:日常费用id"`
	FeeTime    string  `json:"feeTime" form:"feeTime" gorm:"comment:日常费用期"`
	Illustrate string  `json:"illustrate" form:"illustrate" gorm:"comment:费用说明"`
	FeePrice   float64 `json:"feePrice" form:"feePrice" gorm:"type:decimal(10,2);comment:报销金额"`
}

func (DailyFeeDetails) TableName() string {
	return "daily_fee_details"
}

// TODO:日常费用详情查询

// QueryDailyFeeDetails 查询日常费用详情
func QueryDailyFeeDetails(id int) (dailyFeeDetails []DailyFeeDetails, err error) {
	err = global.GVA_DB.Model(&DailyFeeDetails{}).Where("daily_fee_id = ?", id).Find(&dailyFeeDetails).Error
	return dailyFeeDetails, err
}

// TODO:日常费用详情新增

// TODO:日常费用详情修改
// TODO:日常费用详情删除
