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 {
|
if err == nil {
|
||||||
db.DB()
|
db.DB()
|
||||||
db.AutoMigrate(&orm.User{})
|
db.AutoMigrate(&orm.User{}, &orm.Payout{})
|
||||||
}
|
}
|
||||||
result := &dbService{
|
result := &dbService{
|
||||||
ctx: context.Background(),
|
ctx: context.Background(),
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import "gorm.io/gorm"
|
|||||||
type Payout struct {
|
type Payout struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
|
|
||||||
User User
|
UserID uint
|
||||||
|
User User
|
||||||
|
|
||||||
Description string
|
Description string
|
||||||
PayoutID string
|
PayoutID string
|
||||||
|
|||||||
Reference in New Issue
Block a user