model

package
v2.11.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpApi

type HttpApi struct {
	Id        uint `gorm:"<-:false"`
	Method    string
	Path      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Permission

type Permission struct {
	Id        uint `gorm:"<-:false"`
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Role

type Role struct {
	Id          uint `gorm:"<-:false"`
	Name        string
	IsPublic    bool
	CreatedAt   time.Time
	UpdatedAt   time.Time
	Permissions []Permission `gorm:"many2many:role_permissions"`
	Users       []User       `gorm:"many2many:user_roles"`
}

type RolePermission

type RolePermission struct {
	Id           uint `gorm:"<-:false"`
	RoleId       uint
	PermissionId uint
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

type User

type User struct {
	Id        uint `gorm:"<-:false"`
	Name      string
	Email     string
	Password  string
	CreatedAt time.Time
	UpdatedAt time.Time
	Roles     []Role `gorm:"many2many:user_roles"`
}

type UserRole

type UserRole struct {
	Id        uint `gorm:"<-:false"`
	UserId    uint
	RoleId    uint
	CreatedAt time.Time
	UpdatedAt time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL