package model import "time" type LicenseDevice struct { ID uint64 `gorm:"primaryKey;autoIncrement" json:"id"` LicenseID uint64 `gorm:"not null;index" json:"license_id"` ShopID uint64 `gorm:"not null;index" json:"shop_id"` DeviceID string `gorm:"size:255;not null" json:"device_id"` DeviceName string `gorm:"size:255" json:"device_name"` Platform string `gorm:"size:50" json:"platform"` // windows|macos|android|ios|web ActivatedAt time.Time `gorm:"not null;autoCreateTime" json:"activated_at"` LastSeenAt time.Time `gorm:"not null;autoUpdateTime" json:"last_seen_at"` } func (LicenseDevice) TableName() string { return "license_devices" }