B: Add bson mapping to subscription
This commit is contained in:
parent
3e4257cba3
commit
9bc2e8d758
|
@ -3,25 +3,25 @@ package webhooks
|
||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
type Subscription struct {
|
type Subscription struct {
|
||||||
Id string `jsonapi:"primary,Subscription"`
|
Id string `jsonapi:"primary,Subscription" bson:"id"`
|
||||||
//attrs
|
//attrs
|
||||||
Active bool `jsonapi:"attr,active,omitempty"`
|
Active bool `jsonapi:"attr,active,omitempty" bson:"active"`
|
||||||
ApplicationId string `jsonapi:"attr,application_id,omitempty"`
|
ApplicationId string `jsonapi:"attr,application_id,omitempty" bson:"application_id"`
|
||||||
AuthenticitySecret bool `jsonapi:"attr,authenticity_secret,omitempty"`
|
AuthenticitySecret bool `jsonapi:"attr,authenticity_secret,omitempty" bson:"authenticity_secret"`
|
||||||
CreatedAt time.Time `jsonapi:"attr,created_at,omitempty"`
|
CreatedAt time.Time `jsonapi:"attr,created_at,omitempty" bson:"created_at"`
|
||||||
UpdatedAt time.Time `jsonapi:"attr,updated_at,omitempty"`
|
UpdatedAt time.Time `jsonapi:"attr,updated_at,omitempty" bson:"updated_at"`
|
||||||
Name string `jsonapi:"attr,name,omitempty"`
|
Name string `jsonapi:"attr,name,omitempty" bson:"name"`
|
||||||
Url string `jsonapi:"attr,url,omitempty"`
|
Url string `jsonapi:"attr,url,omitempty" bson:"url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type WebhookSubscription struct {
|
type WebhookSubscription struct {
|
||||||
Id string `jsonapi:"primary,WebhookSubscription"`
|
Id string `jsonapi:"primary,WebhookSubscription" bson:"id"`
|
||||||
//attrs
|
//attrs
|
||||||
Active bool `jsonapi:"attr,active,omitempty"`
|
Active bool `jsonapi:"attr,active,omitempty" bson:"active"`
|
||||||
ApplicationId string `jsonapi:"attr,application_id,omitempty"`
|
ApplicationId string `jsonapi:"attr,application_id,omitempty" bson:"application_id"`
|
||||||
AuthenticitySecret bool `jsonapi:"attr,authenticity_secret,omitempty"`
|
AuthenticitySecret bool `jsonapi:"attr,authenticity_secret,omitempty" bson:"authenticity_secret"`
|
||||||
CreatedAt time.Time `jsonapi:"attr,created_at,omitempty"`
|
CreatedAt time.Time `jsonapi:"attr,created_at,omitempty" bson:"created_at"`
|
||||||
UpdatedAt time.Time `jsonapi:"attr,updated_at,omitempty"`
|
UpdatedAt time.Time `jsonapi:"attr,updated_at,omitempty" bson:"updated_at"`
|
||||||
Name string `jsonapi:"attr,name,omitempty"`
|
Name string `jsonapi:"attr,name,omitempty" bson:"name"`
|
||||||
Url string `jsonapi:"attr,url,omitempty"`
|
Url string `jsonapi:"attr,url,omitempty" bson:"url"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue