Capstone/service/vendors/pco/webhooks/subscription.go

28 lines
1.4 KiB
Go
Raw Normal View History

2023-11-16 23:05:42 -05:00
package webhooks
import "time"
type Subscription struct {
2023-11-18 21:16:44 -05:00
Id string `jsonapi:"primary,Subscription" bson:"id"`
2023-11-16 23:05:42 -05:00
//attrs
2023-11-18 18:54:35 -05:00
Active bool `jsonapi:"attr,active,omitempty" bson:"active"`
2023-11-23 13:22:16 -05:00
ApplicationId int `jsonapi:"attr,application_id,omitempty" bson:"application_id"`
2023-11-18 21:16:44 -05:00
AuthenticitySecret string `jsonapi:"attr,authenticity_secret,omitempty" bson:"authenticity_secret"`
2023-11-21 20:45:12 -05:00
CreatedAt time.Time `jsonapi:"attr,created_at,rfc3339,omitempty" bson:"created_at"`
UpdatedAt time.Time `jsonapi:"attr,updated_at,rfc3339,omitempty" bson:"updated_at"`
2023-11-18 18:54:35 -05:00
Name string `jsonapi:"attr,name,omitempty" bson:"name"`
Url string `jsonapi:"attr,url,omitempty" bson:"url"`
2023-11-16 23:05:42 -05:00
}
type WebhookSubscription struct {
2023-11-18 21:16:44 -05:00
Id string `jsonapi:"primary,WebhookSubscription" bson:"id"`
2023-11-16 23:05:42 -05:00
//attrs
2023-11-18 18:54:35 -05:00
Active bool `jsonapi:"attr,active,omitempty" bson:"active"`
ApplicationId string `jsonapi:"attr,application_id,omitempty" bson:"application_id"`
2023-11-18 21:16:44 -05:00
AuthenticitySecret string `jsonapi:"attr,authenticity_secret,omitempty" bson:"authenticity_secret"`
2023-11-21 20:45:12 -05:00
CreatedAt time.Time `jsonapi:"attr,created_at,rfc3339,omitempty" bson:"created_at"`
UpdatedAt time.Time `jsonapi:"attr,updated_at,rfc3339,omitempty" bson:"updated_at"`
2023-11-18 18:54:35 -05:00
Name string `jsonapi:"attr,name,omitempty" bson:"name"`
Url string `jsonapi:"attr,url,omitempty" bson:"url"`
2023-11-16 23:05:42 -05:00
}