This commit is contained in:
2021-01-19 15:50:48 -05:00
parent 3fd6e7b957
commit 45d7adbd8b
14 changed files with 203 additions and 121 deletions

View File

@@ -28,9 +28,9 @@ type ServerSetting struct {
type Device struct {
Base
User User `json:"user" gorm:"ForeignKey:UUID"`
Name string `json:"name"`
Type string `json:"type"` // Android, iOS, Chrome, FireFox, Edge, etc
User User `json:"user" gorm:"ForeignKey:UUID;not null"`
Name string `json:"name" gorm:"not null"`
Type string `json:"type" gorm:"not null"` // Android, iOS, Chrome, FireFox, Edge, etc
RefreshKey string `json:"-"`
}
@@ -40,6 +40,7 @@ type User struct {
Username string `json:"username" gorm:"unique"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Role string `json:"role"`
AuthType string `json:"auth_type" gorm:"default:Local;not null"`
Password string `json:"-"`
}