model

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alliance

type Alliance struct {
	AllianceId     int64      `gorm:"primary_key" db:"alliance_id"`
	AllianceName   string     `gorm:"varchar(100)" db:"alliance_name"`
	AllianceTicker string     `gorm:"varchar(5)" db:"alliance_ticker"`
	InsertedDt     *time.Time `db:"inserted_dt"`
	UpdatedDt      *time.Time `db:"updated_dt"`
}

func (Alliance) TableName

func (Alliance) TableName() string

type AuthenticationCode

type AuthenticationCode struct {
	CharacterId        int64 `gorm:"primary_key"`
	AuthenticationCode string
	Character          Character `gorm:"ForeignKey:CharacterId;save_associations:false;"`
	IsUsed             bool
}

type Character

type Character struct {
	CharacterId   int64       `gorm:"primary_key"`
	CharacterName string      `gorm:"varchar(100)"`
	Corporation   Corporation `gorm:"ForeignKey:corporation_id;AssociationForeignKey:corporation_id;save_associations:false;"`
	CorporationId int64
	Token         string
	// this really isn't meant as a many to many but the flow of auth linking forces this or another method
	// which I didn't want to use
	Users      []User               `gorm:"many2many:user_character_map;save_associations:false;"` //AssociationForeignKey:user_id;ForeignKey:character_id;"`
	AuthCodes  []AuthenticationCode `gorm:"ForeignKey:character_id"`
	InsertedDt *time.Time
	UpdatedDt  *time.Time
}

func (Character) TableName

func (Character) TableName() string

type Corporation

type Corporation struct {
	CorporationId     int64    `gorm:"primary_key"`
	CorporationName   string   `gorm:"varchar(100)"`
	CorporationTicker string   `gorm:"varchar(5)"`
	Alliance          Alliance `gorm:"ForeignKey:alliance_id;AssociationForeignKey:alliance_id;save_associations:false;"`
	AllianceId        *int64
	InsertedDt        *time.Time
	UpdatedDt         *time.Time
}

func (Corporation) TableName

func (Corporation) TableName() string

type Role

type Role struct {
	RoleId           int64  `gorm:"primary_key"`
	RoleName         string `gorm:"varchar(70)"`
	ChatServiceGroup string `gorm:"varchar(70);column:chatservice_group"`
	InsertedDt       *time.Time
	UpdatedDt        *time.Time
}

type User

type User struct {
	UserId     int64       `gorm:"primary_key"`
	ChatId     string      `gorm:"varchar(255)"`
	Characters []Character `gorm:"many2many:user_character_map;"` //AssociationForeignKey:character_id;ForeignKey:user_id;"`
}

func (User) TableName

func (User) TableName() string

Jump to

Keyboard shortcuts

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