Skip to content

Commit

Permalink
add personalEmail, Mobile and Gender as required fields for registration
Browse files Browse the repository at this point in the history
  • Loading branch information
shalearkane committed Apr 11, 2024
1 parent 819f9f6 commit 4cee594
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions handler/student.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ func (h *Handler) HandlerRegisterStudentDetails(ctx *gin.Context) {
FirstName: newStudentDetails.FirstName,
MiddleName: newStudentDetails.MiddleName,
LastName: newStudentDetails.LastName,
PersonalEmail: newStudentDetails.PersonalEmail,
Mobile: newStudentDetails.Mobile,
Gender: newStudentDetails.Gender,
}

if result, err := db.InsertOne(h.MongikClient, constants.DB, constants.COLLECTION_STUDENT, newStudent); err != nil {
Expand Down
13 changes: 10 additions & 3 deletions interfaces/student.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
package interfaces

import (
Constant "github.com/FrosTiK-SD/models/constant"
Student "github.com/FrosTiK-SD/models/student"
)

type StudentRegistration struct {
FirstName string `json:"firstName" bson:"firstName"`
MiddleName *string `json:"middleName" bson:"middleName"`
LastName *string `json:"lastName" bson:"lastName"`

Batch Student.Batch `json:"batch" bson:"batch"`
RollNo int `json:"rollNo" bson:"rollNo"`
InstituteEmail string `json:"email" bson:"email"`
Department string `json:"department" bson:"department"`
Course string `json:"course" bson:"course"`
Specialisation *string `json:"specialisation" bson:"specialisation"`

FirstName string `json:"firstName" bson:"firstName"`
MiddleName *string `json:"middleName" bson:"middleName"`
LastName *string `json:"lastName" bson:"lastName"`
Mobile *string `json:"mobile" bson:"mobile"`
PersonalEmail string `json:"personalEmail" bson:"personalEmail"`
Gender *Constant.Gender `json:"gender" bson:"gender"`

RawKeyStore map[string]interface{} `json:"raw_key_store" bson:"raw_key_store"`
}

0 comments on commit 4cee594

Please sign in to comment.