Add user model's reference in payouts table

This commit is contained in:
2026-03-14 16:25:04 +03:00
parent b2566813ac
commit 17bd6114b7
2 changed files with 3 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ func NewDatabaseService(conf config.Database) (Service, error) {
if err == nil {
db.DB()
db.AutoMigrate(&orm.User{})
db.AutoMigrate(&orm.User{}, &orm.Payout{})
}
result := &dbService{
ctx: context.Background(),

View File

@@ -5,6 +5,7 @@ import "gorm.io/gorm"
type Payout struct {
gorm.Model
UserID uint
User User
Description string