added comments
This commit is contained in:
@ -4,16 +4,19 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// Service Represents a service with a database connection.
|
||||
type Service struct {
|
||||
db *gorm.DB
|
||||
}
|
||||
|
||||
// Service - Creates a new Service instance, initializing it with a GORM database connection.
|
||||
func New(db *gorm.DB) *Service {
|
||||
return &Service{
|
||||
db: db,
|
||||
}
|
||||
}
|
||||
|
||||
// Password struct represents a user's password with a JSON tag.
|
||||
type Password struct {
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user