model

package
v0.0.0-...-8885a08 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 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 JWTClaims

type JWTClaims struct {
	jwt.StandardClaims
	IdUser primitive.ObjectID `json:"id_user"`
	IdRole primitive.ObjectID `json:"id_role"`
}

type Roles

type Roles struct {
	IdRole   primitive.ObjectID `bson:"id_role,omitempty" json:"id_role,omitempty" example:"123456789"`
	RoleName string             `bson:"role_name,omitempty" json:"role_name,omitempty" example:"pembeli"`
}

type User

type User struct {
	IdUser   primitive.ObjectID `bson:"id_user,omitempty" json:"id_user,omitempty" example:"123456789"`
	Username string             `bson:"username,omitempty" json:"username,omitempty" example:"username"`
	Password string             `bson:"password,omitempty" json:"password,omitempty" example:"password"`
	IdRole   primitive.ObjectID `bson:"id_role,omitempty" json:"id_role,omitempty" example:"123456789"`
	Email    string             `bson:"email,omitempty" json:"email,omitempty" example:"user@mail.com"`
	Phone    string             `bson:"phone,omitempty" json:"phone,omitempty" example:"08123456789"`
	Address  string             `bson:"address,omitempty" json:"address,omitempty" example:"Jl. Jalan"`
}

Jump to

Keyboard shortcuts

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