models

package
v0.0.0-...-ceb3aa2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func ConnectDataBase

func ConnectDataBase()

Types

type Action

type Action struct {
	ID        uint   `json:"id" gorm:"primary_key"`
	CreatedBy uint   `json:"created_by"`
	Slug      string `json:"slug"`
	Title     string `json:"title"`
	Deleted   bool   `json:"deleted"`
}

func (Action) MapRequestToAction

func (action Action) MapRequestToAction(c *gin.Context) Action

type Event

type Event struct {
	ID       uint   `json:"id" gorm:"primary_key"`
	ActionID uint   `json:"action_id"`
	Time     string `json:"time"`
}

func (Event) MapRequestToEvent

func (event Event) MapRequestToEvent(c *gin.Context) Event

type EventTimeRange

type EventTimeRange struct {
	After  string
	Before string
}

type Response

type Response struct {
	ID       uint   `json:"id" gorm:"primary_key"`
	EventID  uint   `json:"event_id"`
	UserID   uint   `json:"user_id"`
	Response string `json:"response"`
}

func (Response) MapRequestToResponse

func (response Response) MapRequestToResponse(c *gin.Context) Response

type User

type User struct {
	ID        uint   `json:"id" gorm:"primary_key"`
	Nickname  string `json:"nickname"`
	Firstname string `json:"firstname"`
	Lastname  string `json:"lastname"`
}

func (User) MapRequestToUser

func (user User) MapRequestToUser(c *gin.Context) User

type Usermeta

type Usermeta struct {
	ID        uint   `json:"id" gorm:"primary_key"`
	UserID    uint   `json:"user_id"`
	MetaKey   string `json:"meta_key"`
	MetaValue string `json:"meta_value"`
}

func (Usermeta) MapRequestToUsermeta

func (usermeta Usermeta) MapRequestToUsermeta(c *gin.Context) Usermeta

Jump to

Keyboard shortcuts

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