models

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const IDFieldType = "id"

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name     string `yaml:"name"`
	Type     string `yaml:"type"`
	Value    string `yaml:"-"`
	Nullable bool   `yaml:"nullable" default:"true"`
}

func (Field) FieldName added in v0.0.2

func (f Field) FieldName() string

func (Field) FieldNameCamelCase

func (f Field) FieldNameCamelCase() string

func (Field) FieldNameCamelCaseUpper added in v0.0.2

func (f Field) FieldNameCamelCaseUpper() string

func (Field) FieldNameHumanReadable

func (f Field) FieldNameHumanReadable() string

func (Field) FieldNameSnakeCase added in v0.0.2

func (f Field) FieldNameSnakeCase() string

func (Field) FieldNameSnakeCaseLower added in v0.0.3

func (f Field) FieldNameSnakeCaseLower() string

func (Field) FieldNameVarName added in v0.0.2

func (f Field) FieldNameVarName() string

func (Field) FieldType added in v0.0.2

func (f Field) FieldType() string

func (Field) FieldValue added in v0.0.2

func (f Field) FieldValue() string

func (Field) Validate

func (f Field) Validate() error

type Record added in v0.0.3

type Record struct {
	Fields []Field
}

type Role

type Role struct {
	ID   Field
	Code Field
	Name Field
	Userlog
}

type User

type User struct {
	ID        Field
	Email     Field
	FirstName Field
	LastName  Field
	Password  Field
	Active    Field

	Userlog
}

func (User) ToFields added in v0.0.3

func (u User) ToFields() []Field

type UserRole added in v0.0.3

type UserRole struct {
	UserID Field
	RoleID Field

	Userlog
}

func (UserRole) ToFields added in v0.0.3

func (u UserRole) ToFields() []Field

type Userlog

type Userlog struct {
	CreationUserID Field
	UpdateUserID   Field
	CreatedAt      Field
	UpdatedAt      Field
}

func (Userlog) ToFields added in v0.0.3

func (u Userlog) ToFields() []Field

Jump to

Keyboard shortcuts

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