Skip to content

Commit 0894fe5

Browse files
committed
refactor: update default values for priceagents
1 parent 24b1cd5 commit 0894fe5

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

internal/bot/models/priceagent.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ type NotificationSettings struct {
4444
CreatedAt time.Time
4545
UpdatedAt time.Time
4646
ID int64 `gorm:"primarykey"`
47-
NotifyAlways bool `json:"notifyAlways"`
48-
NotifyPriceDrop bool `json:"notifyPriceDrop"`
49-
NotifyPriceRise bool `json:"notifyPriceRise"`
50-
NotifyAbove bool `json:"notifyAbove"`
51-
NotifyBelow bool `json:"notifyBelow"`
52-
AbovePrice float64 `json:"abovePrice"`
53-
BelowPrice float64 `json:"belowPrice"`
47+
NotifyAlways bool `json:"notifyAlways" gorm:"default:true"`
48+
NotifyPriceDrop bool `json:"notifyPriceDrop" gorm:"default:false"`
49+
NotifyPriceRise bool `json:"notifyPriceRise" gorm:"default:false"`
50+
NotifyAbove bool `json:"notifyAbove" gorm:"default:false"`
51+
NotifyBelow bool `json:"notifyBelow" gorm:"default:false"`
52+
AbovePrice float64 `json:"abovePrice" gorm:"default:0"`
53+
BelowPrice float64 `json:"belowPrice" gorm:"default:0"`
5454
}
5555

5656
func (ns NotificationSettings) String() string {

0 commit comments

Comments
 (0)