Skip to content

Commit

Permalink
feat: allow silence to never expire
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Dec 23, 2024
1 parent bcbd46b commit cd98531
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions models/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ type NotificationSilence struct {
Namespace string `json:"namespace,omitempty"`
Name string `json:"name,omitempty"`
Filter types.CelExpression `json:"filter,omitempty"`
From time.Time `json:"from"`
Until time.Time `json:"until"`
From *time.Time `json:"from,omitempty"`
Until *time.Time `json:"until,omitempty"`
Source string `json:"source"`
Recursive bool `json:"recursive"`
Description string `json:"description,omitempty"`
Description *string `json:"description,omitempty"`
CreatedBy *uuid.UUID `json:"created_by,omitempty"`
CreatedAt time.Time `json:"created_at" time_format:"postgres_timestamp" gorm:"<-:false"`
UpdatedAt time.Time `json:"updated_at" time_format:"postgres_timestamp" gorm:"<-:false"`
Expand Down
4 changes: 2 additions & 2 deletions schema/notifications.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ table "notification_silences" {
type = text
}
column "from" {
null = false
null = true
type = timestamptz
}
column "until" {
null = false
null = true
type = timestamptz
}
column "recursive" {
Expand Down

0 comments on commit cd98531

Please sign in to comment.