entity

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEntity

type BaseEntity struct {
	ID string // the default PK

	UUID      string
	CreatedAt int64 // timestamp
	UpdatedAt int64 // timestamp
	Owner     string
	Creator   string
}

BaseEntity 是各个实体类的基本结构

type Example

type Example struct {
	BaseEntity

	F1 string
	F2 float64
	F3 uint
	F4 bool
}

type Permission

type Permission struct {
	BaseEntity

	Name string // @pk

	AllowResource string // path of HTTP
}

type Plan

type Plan struct {
	BaseEntity
}

type Repository

type Repository struct {
	BaseEntity

	Name        string
	Alias       string // 用于网络访问 (必须是唯一的)
	Label       string // 界面显示的名称
	Description string
	Path        string // the regular-path
	WantPath    string // the want-path
}

Repository 实体表示一个本地的Git仓库

type Role

type Role struct {
	BaseEntity

	Name string // @pk, like 'admin'

	Permissions string // like 'p1,p2,p3...' (Permission Names)
}

type Task

type Task struct {
	BaseEntity
}

type User

type User struct {
	BaseEntity

	Name        string
	DisplayName string
	Avatar      string
	Email       string
	Phone       string

	Secret string
	Salt   string

	Enabled bool
	Roles   string // like 'admin,basic,guest,root...'
}

Jump to

Keyboard shortcuts

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