model

package
v0.0.0-...-df40910 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Login

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

Login represents the model for an login

type Output

type Output struct {
	ID      int    `json:"id,omitempty"`
	Type    string `json:"type,omitempty"`
	Message string `json:"message,omitempty"`
	Details error  `json:"details,omitempty"`
	Users   []User `json:"users,omitempty"`
}

Output represents the model for response

type User

type User struct {
	ID       int    `json:"id" gorm:"column:user_id;primary_key;AUTO_INCREMENT;not null"`
	Name     string `json:"name" gorm:"column:user_name;type:varchar(100);not null"`
	Email    string `json:"email" gorm:"column:user_email;type:varchar(100);not null;unique"`
	Password string `json:"password" gorm:"column:user_password;type:varchar(100);not null"`
	Status   int    `json:"status" gorm:"column:user_status;type:int;not null"`
	IsLogged bool   `json:"islogged" gorm:"column:user_islogged;type:boolean;not null"`
}

User represents the model for an user

Jump to

Keyboard shortcuts

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