NAM-APJATEL-BACKEND/model/entity/roles.go

18 lines
388 B
Go

package entity
import (
"time"
"github.com/google/uuid"
)
type Role struct {
Id uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;default:gen_random_uuid()"`
Name string `json:"name" gorm:"type:varchar(100);not null"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (Role) TableName() string {
return "roles"
}