2021-11-05 07:21:57 +00:00
|
|
|
package devicemngmt
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Device ...
|
|
|
|
type Device struct {
|
2021-11-05 09:24:53 +00:00
|
|
|
ID primitive.ObjectID `bson:"_id" json:"_id"`
|
|
|
|
DeviceID string `bson:"deviceID" json:"deviceId"` // unique
|
|
|
|
IP string `bson:"ip" json:"ip"`
|
|
|
|
OSName string `bson:"osName" json:"osName"`
|
|
|
|
OSVersion string `bson:"osVersion" json:"osVersion"`
|
|
|
|
AppVersion string `bson:"appVersion" json:"appVersion"`
|
|
|
|
Language string `bson:"language" json:"language"` // vi, en
|
|
|
|
IsMobile bool `bson:"isMobile" json:"isMobile"`
|
|
|
|
LastActivatedAt time.Time `bson:"lastActivatedAt" json:"lastActivatedAt"`
|
2021-11-05 10:24:08 +00:00
|
|
|
UserID string `bson:"userID" json:"userId"`
|
2021-11-05 09:24:53 +00:00
|
|
|
AuthToken string `bson:"authToken" json:"authToken"`
|
|
|
|
FCMToken string `bson:"fcmToken" json:"fcmToken"`
|
2021-11-05 10:24:08 +00:00
|
|
|
Model string `bson:"model" json:"model"`
|
|
|
|
Manufacturer string `bson:"manufacturer" json:"manufacturer"`
|
2021-11-05 09:24:53 +00:00
|
|
|
CreatedAt time.Time `bson:"createdAt" json:"createdAt"`
|
2021-11-05 07:21:57 +00:00
|
|
|
}
|