mirror of
https://github.com/muety/wakapi.git
synced 2025-12-05 22:20:24 -08:00
22 lines
428 B
Go
22 lines
428 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/muety/wakapi/utils"
|
|
)
|
|
|
|
type UserAgent struct {
|
|
Id string `json:"id"`
|
|
Value string `json:"value"`
|
|
Os string `json:"os"`
|
|
Editor string `json:"editor"`
|
|
FirstSeen time.Time `gorm:"column:first_seen"`
|
|
LastSeen time.Time `gorm:"column:last_seen"`
|
|
}
|
|
|
|
func (ua *UserAgent) WithId() *UserAgent {
|
|
ua.Id, _ = utils.UUIDFromSeed(ua.Value)
|
|
return ua
|
|
}
|