forked from free-lancers/electricity_bill_calc_service
refactor(deps):ORM库切换为Xorm,同时增加保证数据库连接的配置。
This commit is contained in:
19
model/maintenance_fee.go
Normal file
19
model/maintenance_fee.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type MaintenanceFee struct {
|
||||
CreatedAndModified `xorm:"extends"`
|
||||
Id string `xorm:"varchar(120) pk notnull" json:"id"`
|
||||
ParkId string `xorm:"varchar(120) notnull" json:"parkId"`
|
||||
Name string `xorm:"varchar(50) notnull" json:"name"`
|
||||
Fee decimal.Decimal `xorm:"decimal(8,2) notnull" json:"fee"`
|
||||
Memo string `xorm:"text" json:"memo"`
|
||||
Enabled bool `xorm:"bool notnull" json:"enabled"`
|
||||
}
|
||||
|
||||
func (MaintenanceFee) TableName() string {
|
||||
return "maintenance_fee"
|
||||
}
|
||||
Reference in New Issue
Block a user