feat: ads log
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package logrepository
|
||||
|
||||
import (
|
||||
"legalgo-BE-go/database"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func (a *accessor) CreateLogAds(adsID, userID string) error {
|
||||
spec := database.LogAds{
|
||||
ID: uuid.NewString(),
|
||||
AdsID: adsID,
|
||||
UserID: userID,
|
||||
}
|
||||
if err := a.db.Create(&spec).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user