model

package
v0.0.0-...-b1be0e3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 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 GenericResponse

type GenericResponse struct {
	Status   int         `json:"status"`
	Success  bool        `json:"success"`
	Messages []string    `json:"messages"`
	Data     interface{} `json:"data"`
}

GenericResponse represent the generic response API

func NewGenericResponse

func NewGenericResponse(stsCd, isError int, messages []string, data interface{}) *GenericResponse

NewGenericResponse will create an object that represent the GenericResponse struct

type UserModel

type UserModel struct {
	ID        primitive.ObjectID `json:"id" bson:"_id"`
	Name      string             `json:"name" bson:"name"`
	Gender    string             `json:"gender" bson:"gender"`
	Age       int                `json:"age" bson:"age"`
	CreatedAt time.Time          `json:"-" bson:"created_at"`
	UpdatedAt time.Time          `json:"-" bson:"updated_at"`
}

Jump to

Keyboard shortcuts

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