type Class struct {
ID int64 `json:"id" gorm:"primaryKey"`
Name string `json:"name"`
HeadTeacherId int64 `json:"head_teacher_id"`
SchoolId int64 `json:"school_id"`
School School `gorm:"foreignKey:SchoolId"`
}
type Student struct {
ID int64 `json:"id" gorm:"primaryKey"`
UserID int64 `json:"user_id"`
ClassID int64 `json:"class_id"`
User User `gorm:"foreignKey:UserID;references:ID"`
Class Class `gorm:"foreignKey:ClassID;references:ID"`
}
type User struct {
ID int64 `json:"id" gorm:"primaryKey"`
Email string `json:"email"`
Password string `json:"password"`
Name string `json:"name"`
SchoolId int64 `json:"school_id"`
RoleId int64 `json:"role_id"`
School School `gorm:"foreignKey:SchoolId"`
}