Application Model The Application holds information about an app which can send notifications. swagger:model Application
| 8 | // |
| 9 | // swagger:model Application |
| 10 | type Application struct { |
| 11 | // The application id. |
| 12 | // |
| 13 | // read only: true |
| 14 | // required: true |
| 15 | // example: 5 |
| 16 | ID uint `gorm:"primaryKey;autoIncrement" json:"id"` |
| 17 | // The application token. Can be used as `appToken`. See Authentication. |
| 18 | // |
| 19 | // read only: true |
| 20 | // required: true |
| 21 | // example: AWH0wZ5r0Mbac.r |
| 22 | Token string `gorm:"type:varchar(180);uniqueIndex:uix_applications_token" json:"token"` |
| 23 | UserID uint `gorm:"index;uniqueIndex:uix_application_user_id_sort_key,priority:1" json:"-"` |
| 24 | // The application name. This is how the application should be displayed to the user. |
| 25 | // |
| 26 | // required: true |
| 27 | // example: Backup Server |
| 28 | Name string `gorm:"type:text" form:"name" query:"name" json:"name" binding:"required"` |
| 29 | // The description of the application. |
| 30 | // |
| 31 | // required: true |
| 32 | // example: Backup server for the interwebs |
| 33 | Description string `gorm:"type:text" form:"description" query:"description" json:"description"` |
| 34 | // Whether the application is an internal application. Internal applications should not be deleted. |
| 35 | // |
| 36 | // read only: true |
| 37 | // required: true |
| 38 | // example: false |
| 39 | Internal bool `form:"internal" query:"internal" json:"internal"` |
| 40 | // The image of the application. |
| 41 | // |
| 42 | // read only: true |
| 43 | // required: true |
| 44 | // example: image/image.jpeg |
| 45 | Image string `gorm:"type:text" json:"image"` |
| 46 | Messages []MessageExternal `gorm:"-" json:"-"` |
| 47 | // The default priority of messages sent by this application. Defaults to 0. |
| 48 | // |
| 49 | // required: false |
| 50 | // example: 4 |
| 51 | DefaultPriority int `form:"defaultPriority" query:"defaultPriority" json:"defaultPriority"` |
| 52 | // The last time the application token was used. |
| 53 | // |
| 54 | // read only: true |
| 55 | // example: 2019-01-01T00:00:00Z |
| 56 | LastUsed *time.Time `json:"lastUsed"` |
| 57 | // The sort key of this application. Uses fractional indexing. |
| 58 | // |
| 59 | // required: true |
| 60 | // example: a1 |
| 61 | SortKey string `gorm:"type:bytes;uniqueIndex:uix_application_user_id_sort_key,priority:2,length:255" form:"sortKey" query:"sortKey" json:"sortKey"` |
| 62 | } |
nothing calls this directly
no outgoing calls
no test coverage detected