models

package
v0.0.0-...-5391a5c Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB() *gorm.DB

Types

type Person

type Person struct {
	ID         uint    `json:"id" gorm:"primaryKey"`
	Forename   string  `json:"forename" binding:"required"`
	Surname    string  `json:"surname" binding:"required"`
	Patronymic string  `json:"patronymic" binding:"required"`
	Gender     bool    `json:"gender" gorm:"default:true"`
	RegionID   *uint   `json:"region_id"`
	Region     *Region `gorm:"foreignKey:RegionID"`
}

type Region

type Region struct {
	ID   uint   `json:"id" gorm:"primaryKey"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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