added comments

This commit is contained in:
u80864958
2025-05-02 10:39:35 +02:00
parent fb7d5a623a
commit 14b57b57e8
16 changed files with 73 additions and 29 deletions

View File

@ -2,10 +2,12 @@ package posts
import "gorm.io/gorm"
// Service Represents a service with a database connection.
type Service struct {
db *gorm.DB
}
// Service New creates a new Service instance, initializing it with a GORM database connection.
func New(db *gorm.DB) *Service {
return &Service{db: db}
}