2021-08-17 04:03:50 +00:00
|
|
|
package devicemngt
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
// Device ...
|
|
|
|
type Device struct {
|
|
|
|
ID string `db:"id"`
|
|
|
|
DeviceID string `db:"device_id"`
|
|
|
|
IP string `db:"ip"`
|
|
|
|
Platform string `db:"platform"`
|
|
|
|
OSName string `db:"os_name"`
|
|
|
|
OSVersion string `db:"os_version"`
|
2021-08-19 08:29:17 +00:00
|
|
|
AppVersion string `db:"app_version"`
|
|
|
|
AppVersionCode string `db:"app_version_code"`
|
2021-08-17 04:03:50 +00:00
|
|
|
BrowserName string `db:"browser_name"`
|
|
|
|
BrowserVersion string `db:"browser_version"`
|
|
|
|
AuthToken string `db:"auth_token"`
|
|
|
|
FCMToken string `db:"fcm_token"`
|
|
|
|
OwnerID string `db:"owner_id"`
|
|
|
|
OwnerType string `db:"owner_type"`
|
|
|
|
FirstSignInAt time.Time `db:"first_sign_in_at"`
|
|
|
|
LastActivityAt time.Time `db:"last_activity_at"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// ResponseDevice ...
|
|
|
|
type ResponseDevice struct {
|
|
|
|
ID string `json:"id"`
|
|
|
|
IP string `json:"ip"`
|
|
|
|
Platform string `json:"platform"`
|
|
|
|
OS ResponseOS `json:"os"`
|
|
|
|
Browser ResponseBrowser `json:"browser"`
|
|
|
|
FCMToken string `json:"fcmToken"`
|
|
|
|
FirstSignInAt string `json:"firstSignInAt"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// ResponseOS ...
|
|
|
|
type ResponseOS struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Version string `json:"version"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// ResponseBrowser ...
|
|
|
|
type ResponseBrowser struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Version string `json:"version"`
|
|
|
|
}
|
2021-08-19 08:06:39 +00:00
|
|
|
|
|
|
|
// HeaderData ...
|
|
|
|
type HeaderData struct {
|
|
|
|
UserAgent string
|
|
|
|
DeviceID string
|
|
|
|
AppVersion string
|
|
|
|
AppVersionCode string
|
|
|
|
OSName string
|
|
|
|
OSVersion string
|
2021-08-19 08:51:09 +00:00
|
|
|
AuthToken string
|
2021-08-19 08:06:39 +00:00
|
|
|
}
|
2021-08-21 12:28:09 +00:00
|
|
|
|
2021-08-21 12:38:43 +00:00
|
|
|
// StaffPermissions ...
|
|
|
|
type StaffPermissions struct {
|
2021-08-21 12:28:09 +00:00
|
|
|
ID string `db:"id"`
|
2021-08-21 12:36:53 +00:00
|
|
|
Name string `db:"name"`
|
2021-08-21 12:28:09 +00:00
|
|
|
Permissions []string `db:"permissions"`
|
|
|
|
AccountType string `db:"account_type"`
|
2021-08-21 12:36:53 +00:00
|
|
|
DeviceID string `db:"device_id"`
|
2021-08-21 12:28:09 +00:00
|
|
|
}
|