moved Char to Domain

This commit is contained in:
2024-12-30 15:58:05 +01:00
parent 6e497ffe83
commit 7d5f547e81
5 changed files with 85 additions and 84 deletions
+1 -2
View File
@@ -2,14 +2,13 @@ package character
import (
"bamort/database"
"bamort/models"
"fmt"
"gorm.io/gorm"
)
func SaveCharacterToDB(character *models.Char) error {
func SaveCharacterToDB(character *Char) error {
// Use GORM transaction to ensure atomicity
return database.DB.Transaction(func(tx *gorm.DB) error {
// Save the main character record