Skip to content

Commit

Permalink
wip: webhook base model (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ec3o authored Jun 10, 2024
1 parent fbf178f commit 00dffda
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions internal/model/webhook.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package model

type Webhook struct {
ID uint `json:"id"`
URL string `gorm:"type:varchar(255);" json:"url"` // The payload URL of the webhook.
Type string `gorm:"type:varchar(64);" json:"type"` // The type of the webhook. Such as "application/json" or "application/x-www-form-urlencoded".
Secret string `gorm:"type:varchar(255);" json:"secret"` // The secret of the webhook.
SSL *bool `gorm:"default:false;" json:"ssl"` // The SSL verification of the webhook.
GameID *uint `gorm:"index;not null;" json:"game_id,omitempty"` // The game which this webhook belongs to.
Game *Game `json:"game,omitempty"` // The game which this webhook belongs to.
}

0 comments on commit 00dffda

Please sign in to comment.