Skip to content

Commit 6807afb

Browse files
committed
added bson tags to plan type
1 parent b2dcc53 commit 6807afb

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

model/plan.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ package model
33
import "time"
44

55
type Plan struct {
6-
Title string `json:"title"`
7-
Date string `json:"date"`
8-
CreatedAt time.Time `json:"created_at"`
9-
Absent []Absent `json:"absent"`
10-
Substitutions []Substitution `json:"substitutions"`
6+
Title string `json:"title" bson:"title"`
7+
Date string `json:"date" bson:"date"`
8+
CreatedAt time.Time `json:"created_at" bson:"created_at"`
9+
Absent []Absent `json:"absent" bson:"absent"`
10+
Substitutions []Substitution `json:"substitutions" bson:"substitutions"`
1111
}
1212

1313
type Absent struct {
14-
Class string `json:"class"`
15-
Periods string `json:"absent_time"`
14+
Class string `json:"class" bson:"class"`
15+
Periods string `json:"absent_time" bson:"periods"`
1616
}
1717

1818
type Substitution struct {
19-
Class string `json:"class"`
20-
Teacher string `json:"teacher"`
21-
Period string `json:"period"`
22-
Substitute string `json:"substitute,omitempty"`
23-
Room string `json:"room,omitempty"`
24-
Info string `json:"info,omitempty"`
19+
Class string `json:"class" bson:"class"`
20+
Teacher string `json:"teacher" bson:"teacher"`
21+
Period string `json:"period" bson:"period"`
22+
Substitute string `json:"substitute,omitempty" bson:"substitute,omitempty"`
23+
Room string `json:"room,omitempty" bson:"room,omitempty"`
24+
Info string `json:"info,omitempty" bson:"info,omitempty"`
2525
}

0 commit comments

Comments
 (0)