model

package
v0.0.0-...-f26438a Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDB

func GetDB() *gorm.DB

Types

type Move

type Move struct {
	Id              uint `gorm:"primarykey"`
	PieceTypeId     uint
	HorizontalShift int
	VerticalShift   int
}

type PieceType

type PieceType struct {
	Id             uint `gorm:"primarykey"`
	Name           string
	Moves          []Move `gorm:"foreignKey:PieceTypeId"`
	PromotePieceId *uint
	PromotePiece   *PieceType
	Kanji          rune
	ImportantPiece bool
}

type Player

type Player uint
const (
	Sente Player = iota
	Gote
)

type StartingPosition

type StartingPosition struct {
	Id     uint `gorm:"primarykey"`
	Name   string
	Pieces []StartingPositionPiece `gorm:"foreignKey:StartingPositionId"`
}

type StartingPositionPiece

type StartingPositionPiece struct {
	Id                 uint `gorm:"primarykey"`
	StartingPositionId uint
	PieceTypeId        uint
	PieceType          PieceType
	HorizontalOffset   uint
	VerticalOffset     uint
	Player             Player
}

Jump to

Keyboard shortcuts

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