models

package
v0.0.0-...-444884b Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claim

type Claim struct {
	Email string             `json:"email"`
	ID    primitive.ObjectID `bson:"_id" json:"_id,omitempty"`
	jwt.StandardClaims
}

Claim es la estructura usada para procesar JWT

type DevuelvoTweet

type DevuelvoTweet struct {
	ID      primitive.ObjectID `bson:"_id" json:"_id,omitempty"`
	Userid  string             `bson:"userid" json:"userId,omitempty"`
	Mensaje string             `bson:"mensaje" json:"mensaje,omitempty"`
	Fecha   time.Time          `bson:"fecha" json:"fecha,omitempty"`
}

DevuelvoTweet es la estructura para devolver tweets

type DevuelvoTweetsSeguidores

type DevuelvoTweetsSeguidores struct {
	ID                primitive.ObjectID `bson:"_id" json:"_id,omitempty"`
	UsuarioID         string             `bson:"usuarioid" json:"userID,omitempty"`
	UsuarioRelacionID string             `bson:"usuariorelacionid" json:"userRelationId,omitempty"`
	Tweet             struct {
		Mensaje string    `bson:"mensaje" json:"mensaje,omitempty"`
		Fecha   time.Time `bson:"fecha" json:"fecha,omitempty"`
		ID      string    `bson:"_id" json:"_id,omitempty"`
	}
}

type GraboTweet

type GraboTweet struct {
	UserId  string    `bson:"userid" json:"userid,omitempty"`
	Mensaje string    `bson:"mensaje" json:"mensaje,omitempty"`
	Fecha   time.Time `bson:"fecha" json:"fecha,omitempty"`
}

type Relacion

type Relacion struct {
	UsuarioID         string `bson:"usuarioid" json:"usuarioId"`
	UsuarioRelacionID string `bson:"usuariorelacionid" json:"usuarioRelacionId"`
}

type RespuestaConsultaRelacion

type RespuestaConsultaRelacion struct {
	Status bool `json:"status"`
}

type RespuestaLogin

type RespuestaLogin struct {
	Token string `json:"token,omitempty"`
}

type Rol

type Rol struct {
	ID  primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	Rol string             `bson:"rol" json:"rol,omitempty"`
}

type Tweet

type Tweet struct {
	Mensaje string `bson:"mensaje" json:"mensaje"`
}

type Usuario

type Usuario struct {
	ID              primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	RolId           string             `bson:"rolid" json:"rolid,omitempty"`
	Nombre          string             `bson:"nombre" json:"nombre,omitempty"`
	Apellidos       string             `bson:"apellidos" json:"apellidos,omitempty"`
	FechaNacimiento time.Time          `bson:"fechaNacimiento" json:"fechaNacimiento,omitempty"`
	Email           string             `bson:"email" json:"email"`
	Password        string             `bson:"password" json:"password,omitempty"`
	Avatar          string             `bson:"avatar" json:"avatar,omitempty"`
	Banner          string             `bson:"banner" json:"banner,omitempty"`
	Biografia       string             `bson:"biografia" json:"biografia,omitempty"`
	Ubicacion       string             `bson:"ubicacion" json:"ubicacion,omitempty"`
	SitioWeb        string             `bson:"sitioWeb" json:"sitioWeb,omitempty"`
}

Usuario es el modelo de usuarios de la BD

Jump to

Keyboard shortcuts

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