simple/update/course model
This commit is contained in:
1 parent
c3993a76e0
commit
857981510a
1 file changed
+8
-7
@@ -7,11 +7,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Course struct {
|
type Course struct {
|
||||||
ID primitive.ObjectID `bson:"_id"`
|
ID primitive.ObjectID `bson:"_id"`
|
||||||
Name string `json:"name" validate:"required"`
|
Name string `json:"name" validate:"required"`
|
||||||
Description string `json:"description"`
|
Code string `json:"code" validate:"required"` // Short string to identify each class
|
||||||
Grade_level int `json:"grade_level" validate:"required"`
|
GradeLevel int `json:"gradelevel" validate:"required"`
|
||||||
Credits int `json:"credits" validate:"required"`
|
Credits int `json:"credits" default:"4"`
|
||||||
Created_at time.Time `json:"created_at"`
|
TotalRequest int `json:"totalRequest" default:"0"` // Amount of requests for this course
|
||||||
Updated_at time.Time `json:"updated_at"`
|
Created_at time.Time `json:"created_at"`
|
||||||
|
Updated_at time.Time `json:"updated_at"`
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user