First Commit
This commit is contained in:
commit
004641df4e
9 files changed
+210
No files matched your search
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
import "go.mongodb.org/mongo-driver/bson/primitive"
|
||||
|
||||
type Contact struct {
|
||||
ID primitive.ObjectID `bson:"_id"`
|
||||
FirstName string `json:"firstname" validate:"required"`
|
||||
MiddleName string `json:"middlename"`
|
||||
LastName string `json:"lastname" validate:"required"`
|
||||
Address string `json:"address" validate:"required"`
|
||||
Phone string `json:"phone" validate:"required"`
|
||||
SecondaryPhone string `json:"secondaryphone"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
Relation string `json:"relation" validate:"required"`
|
||||
PrimaryContact bool `json:"primaraycontact" validate:"required"`
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package models
|
||||
|
||||
import "go.mongodb.org/mongo-driver/bson/primitive"
|
||||
|
||||
type Course struct {
|
||||
ID primitive.ObjectID `bson:"_id"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
Description string `json:"description"`
|
||||
Grade_level int `json:"grade_level" validate:"required"`
|
||||
Credits int `json:"credits" validate:"required"`
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
type Student struct {
|
||||
ID primitive.ObjectID `bson:"_id"`
|
||||
FirstName string `json:"firstname" validate:"required"`
|
||||
MiddleName string `json:"middlename"`
|
||||
LastName string `json:"lastname" validate:"required"`
|
||||
Age int `json:"age" validate:"required"`
|
||||
GradeLevel int `json:"gradelevel" validate:"required"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
Password string `json:"password" validate:"required,min=8,max=32"`
|
||||
SID string `json:"sid"` // Student ID
|
||||
PED string `json:"ped"` // Personal Education Number
|
||||
Homeroom string `json:"homeroom"`
|
||||
Locker string `json:"locker"`
|
||||
YOG string `json:"yog"` // Year of Graduation
|
||||
Address string `json:"address"`
|
||||
City string `json:"city"`
|
||||
Province string `json:"province"`
|
||||
PC string `json:"pc"` // Postal Code
|
||||
DOB string `json:"dob" validate:"required"`
|
||||
Photo string `json:"photo"`
|
||||
Contacts []Contact `json:"contacts"`
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
import "go.mongodb.org/mongo-driver/bson/primitive"
|
||||
|
||||
type Teacher struct {
|
||||
ID primitive.ObjectID `bson:"_id"`
|
||||
FirstName string `json:"firstname" validate:"required"`
|
||||
MiddleName string `json:"middlename"`
|
||||
LastName string `json:"lastname" validate:"required"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
TID string `json:"tid"` // Teacher ID
|
||||
Homeroom string `json:"homeroom"`
|
||||
Address string `json:"address"`
|
||||
City string `json:"city"`
|
||||
Province string `json:"province"`
|
||||
PC string `json:"pc"` // Postal Code
|
||||
DOB string `json:"dob" validate:"required"`
|
||||
Photo string `json:"string"`
|
||||
}
|
||||
Reference in new issue
Block a user