databaseschema

package
v0.0.0-...-d65b329 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name              Name
	ObjectName        string
	DataType          string
	Primary           bool
	DefaultValue      string
	Nullable          bool
	ObjectType        string
	APIReturnable     bool
	APIUpdatable      bool
	APIType           string
	APIObjectType     string
	FakerType         string
	IsCommonColumn    bool
	TableName         Name
	RelationTableName Name
	IsSystemUseColumn bool
}

Column ...

type Entity

type Entity struct {
	Name          Name
	Columns       []*Column
	Relations     []*Relation
	PrimaryKey    *Column
	Description   string
	HasDecimal    bool
	HasJSON       bool
	PackageName   string
	UseSoftDelete bool
}

Entity ...

type Name

type Name struct {
	Original string
	Singular NameForm
	Plural   NameForm
}

Name ...

type NameForm

type NameForm struct {
	Camel string
	Title string
	Snake string
	Kebab string
}

NameForm ...

type Relation

type Relation struct {
	Entity           *Entity
	Column           *Column
	RelationType     string
	ObjectName       string
	MultipleEntities bool
}

Relation ...

type Schema

type Schema struct {
	FilePath           string
	ProjectName        string
	OrganizationName   string
	PackageName        string
	PrimaryKeyDataType string
	Entities           []*Entity
}

Schema ...

func Parse

func Parse(filePath string, projectName string, organizationName string) (*Schema, error)

Parse ...

Jump to

Keyboard shortcuts

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