models

package
v0.0.0-...-a509fbf Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package models contains the models for floorplanets

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FloorplanFromJson

func FloorplanFromJson(data io.Reader) (*floorplanJson, error)

func FloorplanListToJson

func FloorplanListToJson(floorplans []Floorplan) string

func RunMigrations

func RunMigrations(db *gorm.DB)

func SeatFromJson

func SeatFromJson(data io.Reader) (*seatJson, error)

func SeatListtoJson

func SeatListtoJson(seats []Seat) string

Types

type Floorplan

type Floorplan struct {
	gorm.Model
	Name  string
	Seats []Seat
}

func (*Floorplan) ToJson

func (floorplan *Floorplan) ToJson() string

type Seat

type Seat struct {
	gorm.Model
	FloorplanID uint
	Label       string
	X           int
	Y           int
}

func (*Seat) ToJson

func (seat *Seat) ToJson() string

Jump to

Keyboard shortcuts

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