dailyFeeDetails.go 995 B

12345678910111213141516171819202122232425262728293031
  1. package dao
  2. import (
  3. "github.com/shopspring/decimal"
  4. "server/global"
  5. )
  6. type DailyFeeDetails struct {
  7. global.GVA_MODEL
  8. DailyFeeId uint `json:"dailyFeeId" form:"dailyFeeId" gorm:"comment:日常费用id"`
  9. FeeTime string `json:"feeTime" form:"feeTime" gorm:"comment:日常费用期"`
  10. Illustrate string `json:"illustrate" form:"illustrate" gorm:"comment:费用说明"`
  11. FeePrice decimal.Decimal `json:"feePrice" form:"feePrice" gorm:"type:decimal(10,2);comment:报销金额"`
  12. }
  13. func (DailyFeeDetails) TableName() string {
  14. return "daily_fee_details"
  15. }
  16. // TODO:日常费用详情查询
  17. // QueryDailyFeeDetails 查询日常费用详情
  18. func QueryDailyFeeDetails(id int) (dailyFeeDetails []DailyFeeDetails, err error) {
  19. err = global.GVA_DB.Model(&DailyFeeDetails{}).Where("daily_fee_id = ?", id).Find(&dailyFeeDetails).Error
  20. return dailyFeeDetails, err
  21. }
  22. // TODO:日常费用详情新增
  23. // TODO:日常费用详情修改
  24. // TODO:日常费用详情删除