go项目脚手架
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sorbet/internal/entities/system_permission.go

19 lines
1.0 KiB

package entities
import (
"gorm.io/gorm"
"time"
)
type SystemPermission struct {
ID uint `json:"id" xml:"id" gorm:"primaryKey;not null;comment:权限编号"`
PID *uint `json:"pid" xml:"pid" gorm:"column:pid;comment:上级权限编号"`
Name string `json:"name" xml:"name" gorm:"size:25;not null;comment:权限名称"`
Type string `json:"type" xml:"type" gorm:"size:25;not null;index;comment:权限类型"`
Identifier string `json:"identifier" xml:"identifier" gorm:"size:25;not null;uniqueIndex;comment:权限标识"`
CreatedAt time.Time `json:"create_time" xml:"create_time" gorm:"<-:false;comment:创建时间"`
UpdatedAt time.Time `json:"update_time" xml:"update_time" gorm:"<-:false;comment:更新时间"`
DeletedAt gorm.DeletedAt `json:"-" xml:"-" gorm:"comment:删除时间"`
Children []*SystemPermission `json:"children" xml:"children" gorm:"foreignKey:PID"`
}