model

package
v0.0.0-...-1fde670 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckValidAllPK

func CheckValidAllPK(model interface{}) error

Types

type CanSearch

type CanSearch interface {
	CanSearch() bool
}

type Favorite

type Favorite struct {
	User null.Int `json:"user" dont:"u" key:"p"`
	Tour null.Int `json:"tour" dont:"u" key:"p"`
}

type FavoriteWithUser

type FavoriteWithUser struct {
	Tour null.Int    `json:"tour"`
	Name null.String `json:"name"`
}

type List

type List struct {
	Tour  null.Int `json:"tour" dont:"u" key:"p"`
	Seq   null.Int `json:"seq" dont:"u" key:"p"`
	Place null.Int `json:"place"`
}

type ListUpdate

type ListUpdate struct {
	ListUpdate null.Int `json:"list_update"`
}

type ListUpdateBody

type ListUpdateBody struct {
	Place []int64 `json:"place"`
}

type ListWithTour

type ListWithTour struct {
	ID   null.Int    `json:"id"`
	Name null.String `json:"name"`
	Pic  null.String `json:"pic"`
	Lat  null.Float  `json:"lat"`
	Lon  null.Float  `json:"lon"`
}

type Member

type Member struct {
	ID          null.Int    `json:"id" dont:"cu" key:"p"`
	Name        null.String `json:"name"`
	Surname     null.String `json:"surname"`
	Username    null.String `json:"username" dont:"u"`
	Password    null.String `json:"password" dont:"r"`
	IdCard      null.Int    `json:"id_card"`
	Email       null.String `json:"email"`
	BankAccount null.Int    `json:"bank_account"`
	Address     null.String `json:"address"`
	Verify      null.Bool   `json:"verify"`
	Pic         null.String `json:"pic"`
	BankName    null.String `json:"bank_name"`
	IdCardPic   null.String `json:"id_card_pic"`
}

func (*Member) PostGet

func (member *Member) PostGet() error

func (*Member) PreChange

func (member *Member) PreChange(isNew bool) error

type Message

type Message struct {
	From    null.Int    `json:"from" dont:"ud" key:"p"`
	To      null.Int    `json:"to" dont:"ud" key:"p"`
	Time    null.Time   `json:"time" dont:"cud" key:"p"`
	Message null.String `json:"message" dont:"ud"`
}

type MessageListMe

type MessageListMe struct {
	Contact null.Int    `json:"contact" dont:"cud"`
	Me      null.Bool   `json:"me" dont:"cud"`
	Message null.String `json:"message" dont:"cud"`
	Time    null.Time   `json:"time" dont:"cud"`
	Name    null.String `json:"name" dont:"cud"`
	Surname null.String `json:"surname" dont:"cud"`
	Pic     null.String `json:"pic" dont:"cud"`
}

type MessageWithMe

type MessageWithMe struct {
	Me      null.Bool   `json:"me" dont:"cud"`
	Message null.String `json:"message" dont:"cud"`
	Time    null.Time   `json:"time" dont:"cud"`
}

type Place

type Place struct {
	ID   null.Int    `json:"id" dont:"cu" key:"p"`
	Name null.String `json:"name"`
	Pic  null.String `json:"pic"`
	Lat  null.Float  `json:"lat"`
	Lon  null.Float  `json:"lon"`
}

type PlaceSearch

type PlaceSearch struct {
	ID   null.Int    `json:"id" dont:"cu" key:"p"`
	Name null.String `json:"name"`
	Pic  null.String `json:"pic"`
	Lat  null.Float  `json:"lat"`
	Lon  null.Float  `json:"lon"`
}

func (*PlaceSearch) CanSearch

func (place *PlaceSearch) CanSearch() bool

type Review

type Review struct {
	Tour    null.Int    `json:"tour" dont:"u" key:"p"`
	User    null.Int    `json:"user" dont:"u" key:"p"`
	Comment null.String `json:"comment"`
	Ratting null.Int    `json:"ratting"`
	Time    null.Time   `json:"time" dont:"c"`
}

func (*Review) PreChange

func (review *Review) PreChange(isNew bool) error

type ReviewWithTour

type ReviewWithTour struct {
	User    null.Int    `json:"user" key:"p"`
	Comment null.String `json:"comment"`
	Ratting null.Int    `json:"ratting"`
	Time    null.Time   `json:"time"`
	Name    null.String `json:"name"`
	Surname null.String `json:"surname"`
}

type ReviewWithUser

type ReviewWithUser struct {
	Tour    null.Int    `json:"tour" key:"p"`
	Comment null.String `json:"comment"`
	Ratting null.Int    `json:"ratting"`
	Time    null.Time   `json:"time"`
	Name    null.String `json:"name"`
}

type Tour

type Tour struct {
	ID          null.Int    `json:"id" dont:"cu" key:"p"`
	Owner       null.Int    `json:"owner" dont:"u" key:"p"` // use key p for check is owner
	Name        null.String `json:"name"`
	Description null.String `json:"description"`
	Category    null.String `json:"category"`
	MaxMember   null.Int    `json:"max_member"`
	FirstDay    null.Time   `json:"first_day"`
	LastDay     null.Time   `json:"last_day"`
	Price       null.Int    `json:"price"`
	Status      null.Int    `json:"status"`
	Pic         null.String `json:"pic"`
}

func (*Tour) PreChange

func (tour *Tour) PreChange(isNew bool) error

type TourDetailSearch

type TourDetailSearch struct {
	ID          null.Int    `json:"id" key:"p"`
	Owner       null.Int    `json:"owner"`
	Name        null.String `json:"name"`
	Description null.String `json:"description"`
	Category    null.String `json:"category"`
	MaxMember   null.Int    `json:"max_member"`
	FirstDay    null.Time   `json:"first_day"`
	LastDay     null.Time   `json:"last_day"`
	Price       null.Int    `json:"price"`
	Status      null.Int    `json:"status"`
	Pic         null.String `json:"pic"`
	Member      null.Int    `json:"member"`
	Confirm     null.Int    `json:"confirm"`
	Ratting     null.Float  `json:"ratting"`
	Favorite    null.Int    `json:"favorite"`
	GName       null.String `json:"g_name"`
	GSurname    null.String `json:"g_surname"`
	BankAccount null.Int    `json:"bank_account"`
	BankName    null.String `json:"bank_name"`
	List        []string    `json:"list"`
}

func (*TourDetailSearch) CanSearch

func (tour *TourDetailSearch) CanSearch() bool

type Transcript

type Transcript struct {
	Tour    null.Int    `json:"tour" dont:"u" key:"p"`
	User    null.Int    `json:"user" dont:"u" key:"p"`
	File    null.String `json:"file"`
	Confirm null.Bool   `json:"confirm"`
	Time    null.Time   `json:"time"`
}

type TranscriptWithTour

type TranscriptWithTour struct {
	User    null.Int    `json:"user" key:"p"`
	File    null.String `json:"file"`
	Confirm null.Bool   `json:"confirm"`
	Time    null.Time   `json:"time"`
	Name    null.String `json:"name"`
	Surname null.String `json:"surname"`
}

type TranscriptWithUser

type TranscriptWithUser struct {
	Tour    null.Int    `json:"tour" key:"p"`
	File    null.String `json:"file"`
	Confirm null.Bool   `json:"confirm"`
	Time    null.Time   `json:"time"`
	Name    null.String `json:"name"`
}

type WithPostGet

type WithPostGet interface {
	PostGet() error
}

type WithPreChange

type WithPreChange interface {
	PreChange(isNew bool) error
}

Jump to

Keyboard shortcuts

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