SimpleCloudNotifier/scnserver/models/client.go
Mike Schwörer 9d35916280
All checks were successful
Build Docker and Deploy / Build Docker Container (push) Successful in 1m52s
Build Docker and Deploy / Deploy to Server (push) Successful in 7s
Fix missing field in clients struct and non-partial fcmtoken index (also streamline db migrations)
2024-09-17 22:26:45 +02:00

24 lines
922 B
Go

package models
type ClientType string //@enum:type
const (
ClientTypeAndroid ClientType = "ANDROID"
ClientTypeIOS ClientType = "IOS"
ClientTypeLinux ClientType = "LINUX"
ClientTypeMacOS ClientType = "MACOS"
ClientTypeWindows ClientType = "WINDOWS"
)
type Client struct {
ClientID ClientID `db:"client_id" json:"client_id"`
UserID UserID `db:"user_id" json:"user_id"`
Type ClientType `db:"type" json:"type"`
FCMToken string `db:"fcm_token" json:"fcm_token"`
TimestampCreated SCNTime `db:"timestamp_created" json:"timestamp_created"`
AgentModel string `db:"agent_model" json:"agent_model"`
AgentVersion string `db:"agent_version" json:"agent_version"`
Name *string `db:"name" json:"name"`
Deleted bool `db:"deleted" json:"-"`
}