23 lines
462 B
Go
23 lines
462 B
Go
package entity
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Tower struct {
|
|
ID uuid.UUID `json:"id"`
|
|
DeviceID uuid.UUID`json:"dev_id" gorm:"column:dev_id"`
|
|
TowerCode string `json:"tower_code"`
|
|
Longitude float64 `json:"longitude"`
|
|
Latitude float64 `json:"latitude"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
|
|
Device Device `gorm:"foreignKey:DeviceID"`
|
|
}
|
|
|
|
func (Tower) TableName() string {
|
|
return "towers"
|
|
} |