Add user model's reference in payouts table
This commit is contained in:
@@ -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(),
|
||||
|
||||
@@ -5,6 +5,7 @@ import "gorm.io/gorm"
|
||||
type Payout struct {
|
||||
gorm.Model
|
||||
|
||||
UserID uint
|
||||
User User
|
||||
|
||||
Description string
|
||||
|
||||
Reference in New Issue
Block a user