devicemngmt/model.go

25 lines
1.0 KiB
Go
Raw Normal View History

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 08:40:07 +00:00
ID primitive.ObjectID `bson:"_id" json:"_id"`
2021-11-05 09:10:12 +00:00
DeviceID string `bson:"deviceID" json:"deviceId"` // unique
2021-11-05 08:40:07 +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"`
LastActivityAt time.Time `bson:"lastActivityAt" json:"lastActivityAt"`
2021-11-05 09:10:12 +00:00
UserID primitive.ObjectID `bson:"userID" json:"userId"`
2021-11-05 08:40:07 +00:00
AuthToken string `bson:"authToken" json:"authToken"`
FCMToken string `bson:"fcmToken" json:"fcmToken"`
CreatedAt time.Time `bson:"createdAt" json:"createdAt"`
2021-11-05 07:21:57 +00:00
}