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
|
// swagger:model Application
|
||||||
type Application struct {
|
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
|
// read only: true
|
||||||
// required: true
|
// required: true
|
||||||
// example: AWH0wZ5r0Mbac.r
|
// example: AWH0wZ5r0Mbac.r
|
||||||
ID string `gorm:"primary_key;unique_index" json:"id"`
|
Token string `gorm:"unique_index" json:"token"`
|
||||||
UserID uint `gorm:"index" json:"-"`
|
UserID uint `gorm:"index" json:"-"`
|
||||||
// The application name. This is how the application should be displayed to the user.
|
// The application name. This is how the application should be displayed to the user.
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,18 @@ package model
|
||||||
//
|
//
|
||||||
// swagger:model Client
|
// swagger:model Client
|
||||||
type Client struct {
|
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
|
// read only: true
|
||||||
// required: true
|
// required: true
|
||||||
// example: CWH0wZ5r0Mbac.r
|
// example: CWH0wZ5r0Mbac.r
|
||||||
ID string `gorm:"primary_key;unique_index" json:"id"`
|
Token string `gorm:"unique_index" json:"token"`
|
||||||
UserID uint `gorm:"index" json:"-"`
|
UserID uint `gorm:"index" json:"-"`
|
||||||
// The client name. This is how the client should be displayed to the user.
|
// The client name. This is how the client should be displayed to the user.
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ type Message struct {
|
||||||
//
|
//
|
||||||
// read only: true
|
// read only: true
|
||||||
// required: true
|
// required: true
|
||||||
// example: AWH0wZ5r0Mbac.r
|
// example: 5
|
||||||
ApplicationID string `json:"appid"`
|
ApplicationID uint `json:"appid"`
|
||||||
// The actual message.
|
// The actual message.
|
||||||
//
|
//
|
||||||
// required: true
|
// required: true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue