Private
Public Access
21 lines
500 B
Go
21 lines
500 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type Permiso struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
Nombre string `gorm:"uniqueIndex;not null;type:varchar(100)" json:"nombre"`
|
|
Descripcion string `gorm:"type:text" json:"descripcion"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
|
}
|
|
|
|
func (Permiso) TableName() string {
|
|
return "permissions"
|
|
}
|