From 00dffda964b5521ead5a19c9d1d5fe0917a82d51 Mon Sep 17 00:00:00 2001 From: Ec3o <144577078+Ec3o@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:46:38 +0800 Subject: [PATCH] wip: webhook base model (#2) --- internal/model/webhook.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 internal/model/webhook.go diff --git a/internal/model/webhook.go b/internal/model/webhook.go new file mode 100644 index 00000000..e690c163 --- /dev/null +++ b/internal/model/webhook.go @@ -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. +}