@@ -3,23 +3,23 @@ package model
33import "time"
44
55type 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
1313type 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
1818type 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