models

package
v0.0.0-...-c380036 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 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 Message

type Message struct {
	ID        int    `json:"id"`
	Text      string `json:"text"`
	UFrom     string `json:"UFrom"`
	CreatedAt int    `json:"created_at"`
}

type User

type User struct {
	ID           string `json:"id" bson:"_id,omitempty"`
	Username     string `json:"userName" bson:"username"`
	PasswordHash string `json:"passwordHash" bson:"password"`
	Key          string `json:"key" bson:"key"`
	IsOnline     bool   `json:"isOnline" bson:"isOnline"`
	LastOnline   *int   `json:"lastOnline"`
}

type UserDTO

type UserDTO struct {
	Username string `json:"userName" validate:"required,lowercase,alpha" example:"userName"`
	Password string `json:"password" validate:"required,alphanum" example:"password"`
}

Jump to

Keyboard shortcuts

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