models

package
v0.0.0-...-e235655 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

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 School

type School struct {
	ID   int64  `json:"id" gorm:"primaryKey"`
	Name string `json:"name"`
}

type Student

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

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL