model

package
v0.0.0-...-8305678 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Favorite

type Favorite struct {
	// gorm.Model
	Id   string `json:"id" gorm:"primaryKey"`
	Item string `json:"item" gorm:"primaryKey"`
}

type Member

type Member struct {
	// gorm.Model
	Id        string     `json:"id" gorm:"primaryKey"`
	Name      string     `json:"name"`
	Email     string     `json:"email" gorm:"unique"`
	Favorites []Favorite `json:"favorites" gorm:"foreignKey:Id"`
}

func (*Member) ConvertFromRequest

func (member *Member) ConvertFromRequest(memberRequest *MemberRequest)

type MemberDetail

type MemberDetail struct {
	Id        string `json:"id"`
	Name      string `json:"name"`
	Email     string `json:"email"`
	Favorites string `json:"favorites"`
}

type MemberDetailResponse

type MemberDetailResponse struct {
	Id        string   `json:"id"`
	Name      string   `json:"name"`
	Email     string   `json:"email"`
	Favorites []string `json:"favorites"`
}

func (*MemberDetailResponse) ConvertToResponse

func (member *MemberDetailResponse) ConvertToResponse(memberDetail *MemberDetail)

type MemberRequest

type MemberRequest struct {
	Id        string   `json:"id"`
	Name      string   `json:"name"`
	Email     string   `json:"email"`
	Favorites []string `json:"favorites"`
}

type MemberResponse

type MemberResponse struct {
	Id    string `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

type User

type User struct {
	gorm.Model
	Username string `json:"username" gorm:"primaryKey"`
	Name     string `json:"name" gorm:"not null"`
	Password string `json:"password" gorm:"not null"`
}

Jump to

Keyboard shortcuts

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