domain

package
v0.0.0-...-7f85a1d Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	gorm.Model
	Username string `gorm:"index:idx_name,unique";json:"username"`
	Password string `json:"password"`
}

Admin stores logins for the admin panel

type Gallery struct {
	gorm.Model
	Gallery string
}

Gallery stores the gallery that a page can belong to

type Library

type Library struct {
	gorm.Model
	Page Page `gorm:"foreignKey:ID"`
	User User `gorm:"foreignKey:ID"`
}

Library keeps track of the pages that each player has found

type Page

type Page struct {
	gorm.Model
	Code      string `gorm:"unique"`
	Title     string
	Text      string
	Author    string
	Published bool `sql:"DEFAULT:false"`
	System    bool `sql:"DEFAULT:false"`
}

Page stores a static page that can be accessed via QR code

type ResponseResult

type ResponseResult struct {
	Error  string `json:"error"`
	Result string `json:"result"`
}

ResponseResult stores the status of a query

type User

type User struct {
	gorm.Model
	Email    string `json:"email"`
	Code     string `json:"code"`
	Admin    bool   `json:"admin"`
	Password string `json:"password"`
	Token    string `json:"token"`
}

User represents both players and admins

Jump to

Keyboard shortcuts

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