model

package
v0.0.0-...-ca31ff8 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID       primitive.ObjectID `json:"ID,omitempty" bson:"_id,omitempty"`                         // 编号
	Username string             `json:"Username" bson:"Username" validate:"required,min=6,max=32"` // 用户
	Password string             `json:"Password" bson:"Password" validate:"required,min=6,max=32"` // 密码
	Email    string             `json:"Email" bson:"Email" validate:"required,email"`              // 邮件
	Phone    string             `json:"Phone" bson:"Phone" validate:"required,min=11,max=11"`      // 电话
}

帐号模型 https://docs.gofiber.io/api/ctx#bodyparser https://github.com/go-playground/validator

type ChangePasswordAccount

type ChangePasswordAccount struct {
	Username        string `json:"Username" bson:"Username" validate:"required,min=6,max=32"`                       // 用户
	Password        string `json:"Password" bson:"Password" validate:"required,min=6,max=32"`                       // 密码
	NewPassword     string `json:"NewPassword" bson:"NewPassword"  validate:"required,min=6,max=32"`                // 新的密码
	ConfirmPassword string `json:"ConfirmPassword" bson:"ConfirmPassword"  validate:"required,eqfield=NewPassword"` // 验证密码
}

修改密码模型 https://docs.gofiber.io/api/ctx#bodyparser https://github.com/go-playground/validator

type Feedback

type Feedback struct {
	ID          primitive.ObjectID `json:"ID,omitempty" bson:"_id,omitempty"`                  // 编号
	Name        string             `json:"Name" bson:"Name" validate:"required"`               // 名称
	Description string             `json:"Description" bson:"Description" validate:"required"` // 描述
	Email       string             `json:"Email" bson:"Email" validate:"required,email"`       // 邮件
}

反馈模型 https://docs.gofiber.io/api/ctx#bodyparser https://github.com/go-playground/validator

type GetPasswordAccount

type GetPasswordAccount struct {
	Email string `json:"Email" bson:"Email" validate:"required,email"` // 邮件

}

找回密码模型 https://docs.gofiber.io/api/ctx#bodyparser https://github.com/go-playground/validator

type LoginAccount

type LoginAccount struct {
	Username string `json:"Username" bson:"Username" validate:"required,min=6,max=32"` // 用户
	Password string `json:"Password" bson:"Password" validate:"required,min=6,max=32"` // 密码
}

登录模型 https://docs.gofiber.io/api/ctx#bodyparser https://github.com/go-playground/validator

type RegisterAccount

type RegisterAccount struct {
	ID       primitive.ObjectID `json:"ID,omitempty" bson:"_id,omitempty"`                         // 编号
	Username string             `json:"Username" bson:"Username" validate:"required,min=6,max=32"` // 用户
	Password string             `json:"Password" bson:"Password" validate:"required,min=6,max=32"` // 密码
	Email    string             `json:"Email" bson:"Email" validate:"required,email"`              // 邮件
	Phone    string             `json:"Phone" bson:"Phone" validate:"required,min=11,max=11"`      // 电话
}

注册模型 https://docs.gofiber.io/api/ctx#bodyparser https://github.com/go-playground/validator

type URL

type URL struct {
	Name string `json:"Name" bson:"Name"` // 名称
	URL  string `json:"URL" bson:"URL"`   // 资源
}

资源模型 https://docs.gofiber.io/api/ctx#bodyparser https://github.com/go-playground/validator

type User

type User struct {
	ID       primitive.ObjectID `json:"ID,omitempty" bson:"_id,omitempty"`            // 编号
	Username string             `json:"Username" bson:"Username" validate:"required"` // 用户
	Password string             `json:"Password" bson:"Password" validate:"required"` // 密码
	Email    string             `json:"Email" bson:"Email" validate:"required,email"` // 邮件
	Phone    string             `json:"Phone" bson:"Phone" validate:"required"`       // 电话
}

用户模型 https://docs.gofiber.io/api/ctx#bodyparser https://github.com/go-playground/validator

type Version

type Version struct {
	ID          primitive.ObjectID `json:"ID,omitempty" bson:"_id,omitempty"`                  // 编号
	Name        string             `json:"Name" bson:"Name" validate:"required"`               // 名称
	Version     string             `json:"Version" bson:"Version" validate:"required"`         // 版本
	Description string             `json:"Description" bson:"Description" validate:"required"` // 描述
	URL         string             `json:"URL" bson:"URL" validate:"required"`                 // 资源
}

版本模型 https://docs.gofiber.io/api/ctx#bodyparser https://github.com/go-playground/validator

type Video

type Video struct {
	ID          primitive.ObjectID `json:"ID,omitempty" bson:"_id,omitempty"`    // 编号
	Name        string             `json:"Name" bson:"Name" validate:"required"` // 名称
	Director    string             `json:"Director" bson:"Director"`             // 导演
	Actor       string             `json:"Actor" bson:"Actor"`                   // 演员
	Description string             `json:"Description" bson:"Description"`       // 描述
	Category    string             `json:"Category" bson:"Category"`             // 类别
	Type        string             `json:"Type" bson:"Type"`                     // 类型
	Area        string             `json:"Area" bson:"Area"`                     // 地区
	Language    string             `json:"Language" bson:"Language"`             // 语言
	Year        string             `json:"Year" bson:"Year"`                     // 年份
	Score       string             `json:"Score" bson:"Score"`                   // 评分
	Status      string             `json:"Status" bson:"Status"`                 // 状态
	Picture     string             `json:"Picture" bson:"Picture"`               // 图片
	URLs        []URL              `json:"URLs" bson:"URLs"`                     // 资源
	CreatedAt   string             `json:"CreatedAt" bson:"CreatedAt"`           // 创建时间
	UpdatedAt   string             `json:"UpdatedAt" bson:"UpdatedAt"`           // 更新时间
	DeletedAt   string             `json:"DeletedAt" bson:"DeletedAt"`           // 删除时间
}

视频模型 https://docs.gofiber.io/api/ctx#bodyparser https://github.com/go-playground/validator

Jump to

Keyboard shortcuts

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