Skip to content

Commit

Permalink
added bson tags to plan type
Browse files Browse the repository at this point in the history
  • Loading branch information
yan-dyno committed Nov 13, 2023
1 parent b2dcc53 commit 6807afb
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions model/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ package model
import "time"

type Plan struct {
Title string `json:"title"`
Date string `json:"date"`
CreatedAt time.Time `json:"created_at"`
Absent []Absent `json:"absent"`
Substitutions []Substitution `json:"substitutions"`
Title string `json:"title" bson:"title"`
Date string `json:"date" bson:"date"`
CreatedAt time.Time `json:"created_at" bson:"created_at"`
Absent []Absent `json:"absent" bson:"absent"`
Substitutions []Substitution `json:"substitutions" bson:"substitutions"`
}

type Absent struct {
Class string `json:"class"`
Periods string `json:"absent_time"`
Class string `json:"class" bson:"class"`
Periods string `json:"absent_time" bson:"periods"`
}

type Substitution struct {
Class string `json:"class"`
Teacher string `json:"teacher"`
Period string `json:"period"`
Substitute string `json:"substitute,omitempty"`
Room string `json:"room,omitempty"`
Info string `json:"info,omitempty"`
Class string `json:"class" bson:"class"`
Teacher string `json:"teacher" bson:"teacher"`
Period string `json:"period" bson:"period"`
Substitute string `json:"substitute,omitempty" bson:"substitute,omitempty"`
Room string `json:"room,omitempty" bson:"room,omitempty"`
Info string `json:"info,omitempty" bson:"info,omitempty"`
}

0 comments on commit 6807afb

Please sign in to comment.