mdl

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache added in v1.0.1

type Cache struct {
	Id          int64  `json:"id"`
	Key         string `json:"key"`
	Value       any    `json:"value"`
	ValueString string `json:"valueString"`
	Expiration  int64  `json:"expiration"`
}

type Dept

type Dept struct {
	mdl.Mdl
	ParentId int64  `gorm:"not null" json:"parentId"`
	Name     string `gorm:"not null" json:"name"`
	Phone    string `gorm:"" json:"phone"`
	Addr     string `gorm:"" json:"addr"`
	Sequence int    `gorm:"not null" json:"sequence"`
	Children []Dept `gorm:"foreignKey:ParentId" json:"children"`
}

func (Dept) TableName

func (m Dept) TableName() string

type Dict

type Dict struct {
	mdl.Mdl
	Type     string `gorm:"not null" json:"type"`
	Code     int8   `gorm:"not null" json:"code"`
	Name     string `gorm:"not null" json:"name"`
	Sequence int    `gorm:"not null" json:"sequence"`
}

func (Dict) TableName

func (m Dict) TableName() string

type Disk

type Disk struct {
	disk.PartitionStat
	*disk.UsageStat
}

type Job

type Job struct {
	mdl.Mdl
	Name     string `gorm:"uniqueIndex;not null" json:"name"`
	Desc     string `gorm:"" json:"desc"`
	Cron     string `gorm:"not null" json:"cron"`
	Arg      string `gorm:"" json:"arg"`
	ArgDesc  string `gorm:"" json:"argDesc"`
	Instance int    `gorm:"not null" json:"instance"`
	State    int    `gorm:"not null" json:"state"`
}

func (Job) TableName

func (m Job) TableName() string

type Resource

type Resource struct {
	mdl.Mdl
	ParentId int64      `gorm:"not null" json:"parentId"`
	Name     string     `gorm:"not null" json:"name"`
	Type     int8       `gorm:"not null" json:"type"`
	Icon     string     `gorm:"" json:"icon"`
	Uri      string     `gorm:"not null" json:"uri"`
	Act      string     `gorm:"" json:"act"`
	Sequence int        `gorm:"not null" json:"sequence"`
	Children []Resource `gorm:"foreignKey:ParentId" json:"children"`
}

func (Resource) TableName

func (m Resource) TableName() string

type Role

type Role struct {
	mdl.Mdl
	Name string `gorm:"not null" json:"name"`
}

func (Role) TableName

func (m Role) TableName() string

type Server

type Server struct {
	mdl.Mdl
	Host host.InfoStat `json:"host"`
	Cpu  struct {
		cpu.InfoStat
		Usage float64 `json:"usage"`
		Load  float64 `json:"load"`
	} `json:"cpu"`
	Memory mem.VirtualMemoryStat `json:"memory"`
	Net    net.IOCountersStat    `json:"net"`
	Disks  []Disk                `json:"disks"`
}

type User

type User struct {
	mdl.Mdl
	DeptId   int64  `gorm:"not null" json:"deptId"`
	UserName string `gorm:"uniqueIndex;size:60;not null" json:"userName"`
	FullName string `gorm:"" json:"fullName"`
	Mobile   string `gorm:"not null" json:"mobile"`
	Password string `gorm:"size:60;not null" json:"password"`
	Frozen   bool   `gorm:"not null" json:"frozen"`
	Token    string `gorm:"-" json:"token"`
	Dept     *Dept  `gorm:"" json:"dept"`
}

func (User) TableName

func (m User) TableName() string

type Visit

type Visit struct {
	mdl.Mdl
	UserId    int64  `gorm:"not null" json:"userId"`
	UserName  string `gorm:"not null" json:"userName"`
	Ip        string `gorm:"not null" json:"ip"`
	Method    string `gorm:"not null" json:"method"`
	Url       string `gorm:"not null" json:"url"`
	UserAgent string `gorm:"not null" json:"userAgent"`
	Req       string `gorm:"size:1000;not null" json:"req"`
	Resp      string `gorm:"size:1000;not null" json:"resp"`
}

func (Visit) TableName

func (m Visit) TableName() string

Jump to

Keyboard shortcuts

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