Files
acc-server-manager/local/model/permission.go
Fran Jurmanović 4004d83411
All checks were successful
Release and Deploy / build (push) Successful in 9m5s
Release and Deploy / deploy (push) Successful in 26s
add step list for server creation
2025-09-18 22:24:51 +02:00

18 lines
303 B
Go

package model
import (
"github.com/google/uuid"
"gorm.io/gorm"
)
type Permission struct {
ID uuid.UUID `json:"id" gorm:"type:uuid;primary_key;"`
Name string `json:"name" gorm:"unique_index;not null"`
}
func (s *Permission) BeforeCreate(tx *gorm.DB) error {
s.ID = uuid.New()
return nil
}