set default image and update image

This commit is contained in:
SowinskiBraeden committed 2022-02-13 00:12:53 -08:00
1 parent eaae56b8f6
commit 0ef3142546
7 files changed
+164 -23

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
package models
import (
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
)
type Photo struct {
ID primitive.ObjectID `bson:"_id"`
Name string `json:"name" validate:"required"`
Base64 string `json:"base64" validate:"required"`
Created_at time.Time `json:"created_at"`
Updated_at time.Time `json:"updated_at"`
}
+3 -3
View File
@@ -40,9 +40,9 @@ type Student struct {
SID string `json:"sid"` // Student ID
PEN string `json:"ped"` // Personal Education Number
Homeroom string `json:"homeroom"`
Locker string `json:"-"` // Locker ID
YOG int `json:"yog"` // Year of Graduation
Photo string `json:"photo"`
Locker string `json:"-"` // Locker ID
YOG int `json:"yog"` // Year of Graduation
PhotoName string `json:"photo"` // name of photo in db
} `json:"schooldata"`
AccountData struct {
SchoolEmail string `json:"schoolemail"`