Documentation
¶
Index ¶
- func WithDeviceID(deviceID uint64) func(db *gorm.DB) *gorm.DB
- func WithEndTime(endTime time.Time) func(db *gorm.DB) *gorm.DB
- func WithOrder(order string) func(db *gorm.DB) *gorm.DB
- func WithPageAndPageSize(page, pageSize int) func(db *gorm.DB) *gorm.DB
- func WithStartTime(startTime time.Time) func(db *gorm.DB) *gorm.DB
- type Collection
- type Device
- type GeoPoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collection ¶
type Device ¶
type Device struct {
Mac string `gorm:"primarykey"`
DeviceID uint64 `gorm:"not null;uniqueIndex"`
Collections []Collection `gorm:"foreignKey:DeviceID;references:DeviceID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`
}
Click to show internal directories.
Click to hide internal directories.