feat(docker): Add Dockerfile and compose file
This commit is contained in:
23
app/models/group.go
Normal file
23
app/models/group.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Group struct {
|
||||
ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()" json:"id"`
|
||||
Name string `gorm:"not null;unique" json:"name"`
|
||||
Description *string `json:"description"`
|
||||
CreatedAt time.Time `gorm:"not null;default:now()" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"not null;default:now()" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"`
|
||||
|
||||
EndpointGroups []EndpointGroup `gorm:"foreignKey:GroupID" json:"-"`
|
||||
}
|
||||
|
||||
func (Group) TableName() string {
|
||||
return "groups"
|
||||
}
|
||||
Reference in New Issue
Block a user