models

package
v0.0.0-...-7fb751a Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnswerLogin

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

Token Generation

type Claim

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

Claim is the structure to process JWT

type Post

type Post struct {
	Message string `bson:"message" json: "message"`
}

type RecordPost

type RecordPost struct {
	UserID  string    `bson:"userid" json:"userid,omitempty"`
	Message string    `bson:"message" json:"message,omitempty"`
	Date    time.Time `bson:"date" json:"date,omitempty"`
}

type Relationship

type Relationship struct {
	UserID             string `bson:"userid" json:"userID"`
	UserRelationshipID string `bson:"userrelationshipid" json:"userRelationshipID"`
}

Relationship model to record the relationship of one user with another

type RequestConsultRelation

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

RequestConsultRelation has true or false that is obtained from querying the relationship between 2 users

type ReturnFollowersPosts

type ReturnFollowersPosts struct {
	ID                 primitive.ObjectID `bson:"_id" json:"_id,omitempty"`
	UserID             string             `bson:"userid" json:"userID,omitempty`
	UserRelationshipID string             `bson:"userrelationshipid" json:"userRelationshipID,omitempty"`
	News               struct {
		Message string    `bson:"message" json:"message,omitempty"`
		Date    time.Time `bson:"date" json:"date,omitempty"`
		ID      string    `bson:"_id" json:"_id,omitempty"`
	}
}

type ReturnPost

type ReturnPost struct {
	ID      primitive.ObjectID `bson:"_id" json:"_id,omitempty"`
	UserID  string             `bson:"userid" json:"userID,omitempty"`
	Message string             `bson:"message" json:"message,omitempty"`
	Date    time.Time          `bson:"date" json:"date,omitempty"`
}

type User

type User struct {
	ID        primitive.ObjectID `bson:"_id" json:"id,omitempty"`
	Name      string             `bson:"name" json:"name,omitempty"`
	LastName  string             `bson:"lastname" json:"lastname,omitempty"`
	BirthDate time.Time          `bson:"birthdate" json""birthdate,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"`
	Biography string             `bson:"biography" json:"biography,omitempty"`
	Location  string             `bson:"location" json:"location,omitempty"`
	Website   string             `bson:"website" json:"website,omitempty"`
}

Jump to

Keyboard shortcuts

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