models

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

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

Go to latest
Published: Feb 25, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type District

type District struct {
	ID        string `json:"id"`
	RegencyID string `json:"regency_id"`
	Name      string `json:"name"`
}

District struct for table district

type ESModesl

type ESModesl struct{}

func (ESModesl) CreateDocs

func (ESModesl) CreateDocs()

func (ESModesl) Request

func (ESModesl) Request(method string, data string) ([]byte, error)

type Province

type Province struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Provinces struct for table province

type Regency

type Regency struct {
	ID         string `json:"id"`
	ProvinceID string `json:"province_id"`
	Name       string `json:"name"`
}

Regency struct for table regency

type Room

type Room struct {
	Name  string `json:"name,omitempty" validate:"required"`
	Quota int    `json:"quota,omitempty" validate:"required"`
	gorm.Model
}

Room struct for table room

type RoomModel

type RoomModel struct{}

RoomModel struct for setting this file like class

func (RoomModel) DeleteRoom

func (RoomModel) DeleteRoom(data Room) error

DeleteRoom function delete data in table

func (RoomModel) GetRoom

func (RoomModel) GetRoom(id string) (Room, error)

GetRoom function for get data detail from table room

func (RoomModel) GetRooms

func (RoomModel) GetRooms() ([]Room, error)

GetRooms function get all data room

func (RoomModel) InsertRoom

func (RoomModel) InsertRoom(data Room) error

InsertRoom function insert data in table room

func (RoomModel) UpdateRoom

func (RoomModel) UpdateRoom(id string, data Room) error

UpdateRoom function for update data in table room

type Village

type Village struct {
	ID         string `json:"id"`
	DistrictID string `json:"district_id"`
	Name       string `json:"name"`
}

Village struct for table village

Jump to

Keyboard shortcuts

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