add missing models
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s

This commit is contained in:
2026-10-04 01:56:25 +02:00
parent ea648082be
commit d9007ba0e4
28 changed files with 927 additions and 105 deletions
@@ -0,0 +1,27 @@
package repository
import (
"context"
"kontor-api-gin/internal/models"
"log/slog"
"gorm.io/gorm"
)
type ArticleAuthorRepository struct {
db *gorm.DB
}
func NewArticleAuthorRepository(db *gorm.DB) *ArticleAuthorRepository {
repo := &ArticleAuthorRepository{db: db}
return repo
}
func (repository *ArticleAuthorRepository) FindAll(context context.Context) ([]models.ArticleAuthor, error) {
var articleAuthors []models.ArticleAuthor
result := repository.db.Find(&articleAuthors)
slog.Info("ArticleAuthorRepository#FindAll", "count", result.RowsAffected)
return articleAuthors, nil
}