model

package
v0.0.0-...-209e9d0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	ID        uint `gorm:"primaryKey"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

type Student

type Student struct {
	Base
	Name      string `gorm:"size:20"`
	Score     int
	TeacherId int
	Teacher   Teacher
}

type Teacher

type Teacher struct {
	Base
	Name     string `gorm:"size:20"`
	Students []Student
}

Jump to

Keyboard shortcuts

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