user.go 511 B

123456789101112
  1. package model
  2. import "go.mongodb.org/mongo-driver/bson/primitive"
  3. type User struct {
  4. ID primitive.ObjectID `json:"-" bson:"_id,omitempty"`
  5. Name string `json:"name" bson:"name,omitempty"`
  6. Password string `json:"password" bson:"password,omitempty"`
  7. NewPassword string `json:"newpassword" bson:"-"`
  8. Admin bool `json:"admin" bson:"admin,omitempty"`
  9. Guest bool `json:"guest" bson:"guest,omitempty"`
  10. }