Files
lti-api/internal/entities/area.go
T

20 lines
494 B
Go

package entities
import (
"time"
"gorm.io/gorm"
)
type Area struct {
Id uint `gorm:"primaryKey"`
Name string `gorm:"not null"`
CreatedBy uint `gorm:"not null"`
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
CreatedUser User `gorm:"foreignKey:CreatedBy;references:Id"`
Locations []Location `gorm:"foreignKey:AreaId;references:Id"`
}