123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package tables
- type WineWithIdRemain struct {
- Id uint16 `json:"id"`
- Remain uint16 `json:"remain"`
- }
- type WineWithIdNameRemain struct {
- Id uint16 `json:"id"`
- Name string `json:"name"`
- Remain uint16 `json:"remain"`
- }
- type idTotal struct {
- Id string `json:"id"`
- Total uint64 `json:"total"`
- }
- type idNameTotal struct {
- Id string `json:"id"`
- Name string `json:"name"`
- Total uint64 `json:"total"`
- }
- type timeTotal struct {
- Time string `json:"time"`
- Total uint64 `json:"total"`
- }
- // 0:不限、1:一周、2:一月、3:一季、4:半年、5:一年
- func getAlignDays(kind uint8) (string, uint16) {
- switch kind {
- case 1:
- return "%Y-%m-%d", 7
- case 2:
- return "%Y-%m-%d", 30
- case 3:
- return "%Y-%m", 120
- case 4:
- return "%Y-%m", 180
- case 5:
- return "%Y-%m", 360
- default:
- return "%Y-%m-%d", 7
- }
- }
|