Add ID to model.Client & model.Application
This commit is contained in:
parent
a26e2cf216
commit
6aa10ad917
|
|
@ -6,12 +6,18 @@ package model
|
|||
//
|
||||
// swagger:model Application
|
||||
type Application struct {
|
||||
// The application id. Can be used as `appToken`. See Authentication.
|
||||
// The application id.
|
||||
//
|
||||
// read only: true
|
||||
// required: true
|
||||
// example: 5
|
||||
ID uint `gorm:"primary_key;unique_index;AUTO_INCREMENT" json:"id"`
|
||||
// The application token. Can be used as `appToken`. See Authentication.
|
||||
//
|
||||
// read only: true
|
||||
// required: true
|
||||
// example: AWH0wZ5r0Mbac.r
|
||||
ID string `gorm:"primary_key;unique_index" json:"id"`
|
||||
Token string `gorm:"unique_index" json:"token"`
|
||||
UserID uint `gorm:"index" json:"-"`
|
||||
// The application name. This is how the application should be displayed to the user.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -6,12 +6,18 @@ package model
|
|||
//
|
||||
// swagger:model Client
|
||||
type Client struct {
|
||||
// The client id. Can be used as `clientToken`. See Authentication.
|
||||
// The client id.
|
||||
//
|
||||
// read only: true
|
||||
// required: true
|
||||
// example: 5
|
||||
ID uint `gorm:"primary_key;unique_index;AUTO_INCREMENT" json:"id"`
|
||||
// The client token. Can be used as `clientToken`. See Authentication.
|
||||
//
|
||||
// read only: true
|
||||
// required: true
|
||||
// example: CWH0wZ5r0Mbac.r
|
||||
ID string `gorm:"primary_key;unique_index" json:"id"`
|
||||
Token string `gorm:"unique_index" json:"token"`
|
||||
UserID uint `gorm:"index" json:"-"`
|
||||
// The client name. This is how the client should be displayed to the user.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ type Message struct {
|
|||
//
|
||||
// read only: true
|
||||
// required: true
|
||||
// example: AWH0wZ5r0Mbac.r
|
||||
ApplicationID string `json:"appid"`
|
||||
// example: 5
|
||||
ApplicationID uint `json:"appid"`
|
||||
// The actual message.
|
||||
//
|
||||
// required: true
|
||||
|
|
|
|||
Loading…
Reference in New Issue