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"`
|
2021-11-08 10:23:03 +00:00
|
|
|
DeviceID string `bson:"deviceId" json:"deviceId"` // unique
|
2021-11-05 09:24:53 +00:00
|
|
|
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-22 08:14:36 +00:00
|
|
|
UserID primitive.ObjectID `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
|
|
|
}
|