refactor: revise field

This commit is contained in:
Liangzhao Che 2023-06-01 20:06:43 +08:00
parent 1c906262ad
commit 8540470c62
2 changed files with 9 additions and 12 deletions

View File

@ -8,13 +8,12 @@ import (
// Bill represents 'bills' object. // Bill represents 'bills' object.
type Bill struct { type Bill struct {
gorm.Model gorm.Model
ID int `json:"id"` Type string
Type string `json:"type"` Date string
Date string `json:"date"` Money float64
Money float64 `json:"money"` Class string
Class string `json:"class"` Label string
Label string `json:"label"` Options string
Options string `json:"options"`
} }
// BDate 用于判断获取bill的时间范围 // BDate 用于判断获取bill的时间范围

View File

@ -7,11 +7,9 @@ import (
type Label struct { type Label struct {
gorm.Model gorm.Model
ID int `json:"id"` Type string
Type string `json:"type"` Name string
Name string `json:"name"` Count int
RelativeId int `json:"relativeId"`
Count int `json:"count"`
} }
type LabelRepository interface { type LabelRepository interface {