model

package
v0.0.0-...-ae1a546 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileUpload

type FileUpload struct {
	ID          string `json:"id"`
	File        []byte `json:"file"`
	Filename    string `json:"filename"`
	Extension   string `json:"extension"`
	Size        int64  `json:"size"`
	ContentType string `json:"contentType"`
	UserID      string `json:"userId"`
	User        *User  `json:"user"`
}

type Login

type Login struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type PublicMessage

type PublicMessage struct {
	ID        string    `json:"id"`
	UserID    string    `json:"userId"`
	User      *User     `json:"user"`
	Message   string    `json:"message"`
	CreatedAt time.Time `json:"createdAt"`
}

type Register

type Register struct {
	Name        string    `json:"name"`
	Email       string    `json:"email"`
	Password    string    `json:"password"`
	DateOfBirth time.Time `json:"dateOfBirth"`
	Gender      string    `json:"gender"`
	Address     string    `json:"address"`
}

type UpdateFile

type UpdateFile struct {
	ID       string `json:"id"`
	Filename string `json:"filename"`
}

type UpdateUser

type UpdateUser struct {
	Name        string    `json:"name"`
	Email       string    `json:"email"`
	DateOfBirth time.Time `json:"dateOfBirth"`
	Gender      string    `json:"gender"`
	Address     string    `json:"address"`
}

type User

type User struct {
	ID          string        `json:"id"`
	Name        string        `json:"name"`
	Email       string        `json:"email"`
	Password    string        `json:"password"`
	DateOfBirth time.Time     `json:"dateOfBirth"`
	Gender      string        `json:"gender"`
	Address     string        `json:"address"`
	UserRoleID  string        `json:"userRoleId"`
	UserRole    *UserRole     `json:"userRole"`
	Friends     []*User       `json:"friends" gorm:"many2many:friends;"`
	FileUploads []*FileUpload `json:"fileUploads"`
}

type UserRole

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

Jump to

Keyboard shortcuts

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