entity

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TableNamePrefix = "wpm_"
)

表名前缀

Variables

This section is empty.

Functions

func ListPrototypes

func ListPrototypes() []any

ListPrototypes 罗列出所有的 entity 原型

Types

type Base

type Base struct {
	UUID dxo.UUID

	Committer dxo.UserID
	Creator   dxo.UserID
	Owner     dxo.UserID

	// ID        uint           `gorm:"primaryKey"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

Base ...

type Example

type Example struct {
	ID dxo.ExampleID `gorm:"primaryKey"`
	Base
}

Example ...

type Executable

type Executable struct {
	ID dxo.ExecutableID `gorm:"primaryKey"`
	Base

	Name             string
	Title            string
	IconURL          string
	Description      string
	Path             string
	Size             int64
	SHA256SUM        util.Hex
	OpenWithPriority int // 如果 value<=0, 表示 disable

}

Executable ...

func (Executable) TableName

func (Executable) TableName() string

TableName ...

type IntentTemplate

type IntentTemplate struct {
	ID dxo.IntentTemplateID `gorm:"primaryKey"`
	Base

	Executable dxo.ExecutableID
}

IntentTemplate ...

func (IntentTemplate) TableName

func (IntentTemplate) TableName() string

TableName ...

type LocalRepository

type LocalRepository struct {
	ID dxo.LocalRepositoryID `gorm:"primaryKey"`
	Base
	LocalRepositoryBase
}

LocalRepository ...

func (LocalRepository) TableName

func (LocalRepository) TableName() string

TableName ...

type LocalRepositoryBase

type LocalRepositoryBase struct {
	Name        string
	DisplayName string
	Description string

	Path           string
	ConfigFile     string
	DotGitPath     string
	RepositoryPath string
	WorkingPath    string
}

LocalRepositoryBase ...

type Media

type Media struct {
	ID dxo.MediaID `gorm:"primaryKey"`
	Base

	Path        string
	SHA256SUM   util.Hex
	FileSize    int64
	ContentType string
}

Media ...

func (Media) TableName

func (Media) TableName() string

TableName ...

type Project

type Project struct {
	ID dxo.ProjectID `gorm:"primaryKey"`
	Base

	Name            string
	Path            string
	Description     string
	ProjectType     string
	OwnerRepository dxo.LocalRepositoryID
}

Project ...

func (Project) TableName

func (Project) TableName() string

TableName ...

type RemoteRepository

type RemoteRepository struct {
	ID dxo.RemoteRepositoryID `gorm:"primaryKey"`
	Base

	Name        string
	URL         string
	DisplayName string
}

RemoteRepository ...

func (RemoteRepository) TableName

func (RemoteRepository) TableName() string

TableName ...

type SystemConfig

type SystemConfig struct {
	Name        string
	ContentType string
}

type User

type User struct {
	ID dxo.UserID
	Base

	Name     dxo.UserName
	Avatar   string
	Nickname string
	Home     string // the home dir path
}

User ...

func (User) TableName

func (User) TableName() string

TableName ...

type UserConfig

type UserConfig struct {
	Name        string
	ContentType string
}

Jump to

Keyboard shortcuts

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