diff --git a/model/application.go b/model/application.go index 9c4d277..180e866 100644 --- a/model/application.go +++ b/model/application.go @@ -23,12 +23,12 @@ type Application struct { // // required: true // example: Backup Server - Name string `form:"name" query:"name" json:"name" binding:"required"` + Name string `gorm:"type:text" form:"name" query:"name" json:"name" binding:"required"` // The description of the application. // // required: true // example: Backup server for the interwebs - Description string `form:"description" query:"description" json:"description"` + Description string `gorm:"type:text" form:"description" query:"description" json:"description"` // Whether the application is an internal application. Internal applications should not be deleted. // // read only: true @@ -40,6 +40,6 @@ type Application struct { // read only: true // required: true // example: image/image.jpeg - Image string `json:"image"` + Image string `gorm:"type:text" json:"image"` Messages []MessageExternal `json:"-"` } diff --git a/model/client.go b/model/client.go index b666746..4766504 100644 --- a/model/client.go +++ b/model/client.go @@ -23,5 +23,5 @@ type Client struct { // // required: true // example: Android Phone - Name string `form:"name" query:"name" json:"name" binding:"required"` + Name string `gorm:"type:text" form:"name" query:"name" json:"name" binding:"required"` } diff --git a/model/message.go b/model/message.go index 7c7fb48..83a7327 100644 --- a/model/message.go +++ b/model/message.go @@ -8,8 +8,8 @@ import ( type Message struct { ID uint `gorm:"AUTO_INCREMENT;primary_key;index"` ApplicationID uint - Message string - Title string + Message string `gorm:"type:text"` + Title string `gorm:"type:text"` Priority int Extras []byte Date time.Time diff --git a/model/pluginconf.go b/model/pluginconf.go index 22dc4ee..8aa0133 100644 --- a/model/pluginconf.go +++ b/model/pluginconf.go @@ -4,7 +4,7 @@ package model type PluginConf struct { ID uint `gorm:"primary_key;AUTO_INCREMENT;index"` UserID uint - ModulePath string + ModulePath string `gorm:"type:text"` Token string `gorm:"unique_index"` ApplicationID uint Enabled bool