models

package
v0.0.0-...-ae752ac Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 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 AnswerOption

type AnswerOption struct {
	AnswerText *string `bson:"answerText" json:"answerText" validate:"required"`
	IsCorrect  bool    `bson:"isCorrect" json:"isCorrect" validate:"required"`
}

type Question

type Question struct {
	QuestionID    primitive.ObjectID `bson:"_id"`
	QuestionText  *string            `bson:"questionText" json:"questionText" validate:"required"`
	AnswerOptions []AnswerOption     `bson:"answerOptions" json:"answerOptions" validate:"required"`
	Describle     *string            `json:"describle"`
	Image         *string            `bson:"image" json:"image"`
	Subject       *string            `json:"subject" validate:"required"`
	Owner         *string            `json:"owner"`
	Create_at     time.Time
	Lasted_update time.Time
}

type User

type User struct {
	ID            primitive.ObjectID `bson:"_id"`
	Name          *string            `json:"name" validate:"required,min=2,max=100"`
	Password      *string            `json:"password" validate:"required,min=6"`
	Email         *string            `json:"email" validate:"email,required"`
	Phone         *string            `json:"phone" validate:"required"`
	Token         *string            `json:"token"`
	Refresh_token *string            `json:"refresh_token"`
}

Jump to

Keyboard shortcuts

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