Restructure project layout

This commit is contained in:
eikendev 2021-01-16 16:56:49 +01:00
parent a49db216d5
commit 9a4a096526
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
32 changed files with 35 additions and 35 deletions

View file

@ -0,0 +1,20 @@
package model
// Application holds information like the name, the token, and the associated user of an application.
type Application struct {
ID uint `gorm:"AUTO_INCREMENT;primary_key" json:"id"`
Token string `gorm:"type:string;size:64;unique" json:"token"`
UserID uint `json:"-"`
Name string `gorm:"type:string" json:"name"`
MatrixID string `gorm:"type:string" json:"-"`
}
// CreateApplication is used to process queries for creating applications.
type CreateApplication struct {
Name string `form:"name" query:"name" json:"name" binding:"required"`
}
// UpdateApplication is used to process queries for updating applications.
type UpdateApplication struct {
Name *string `json:"name"`
}