package newsrepository

import (
	"legalgo-BE-go/database"
	newsdomain "legalgo-BE-go/internal/domain/news"
)

type accessor struct {
	db *database.DB
}

type News interface {
	GetAll() ([]newsdomain.News, error)
	GetAllModel() ([]database.NewsModel, error)
	Create(*newsdomain.News) error
	CreateModel(database.NewsModel) error
}

func New(db *database.DB) News {
	return &accessor{db}
}
