mixin

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package mixin is the mixin package

Package mixin is the mixin package

Index

Constants

This section is empty.

Variables

View Source
var ZeroTime = time.Time{}

ZeroTime represents the zero value for time.Time.

Functions

func FieldID added in v0.0.9

func FieldID(name string) ent.Field

FieldID returns an optional string field with a maximum length of 36 characters.

func FieldIndex added in v0.0.9

func FieldIndex(name string) ent.Field

FieldIndex returns a unique integer field.

func FieldTime added in v0.0.9

func FieldTime(name string) ent.Field

FieldTime returns a time field with a default value of ZeroTime and a custom schema type for MySQL.

Types

type Audit added in v0.0.7

type Audit struct {
	mixin.Schema
}

Audit schema to include control and time fields.

func (Audit) Fields added in v0.0.7

func (Audit) Fields() []ent.Field

Fields of the mixin.

func (Audit) Indexes added in v0.0.7

func (Audit) Indexes() []ent.Index

Indexes of the mixin.

type CreateSchema added in v0.0.8

type CreateSchema struct {
	mixin.Schema
}

CreateSchema schema to include control and time fields.

func (CreateSchema) Fields added in v0.0.8

func (CreateSchema) Fields() []ent.Field

Fields of the mixin.

func (CreateSchema) Indexes added in v0.0.8

func (CreateSchema) Indexes() []ent.Index

Indexes of the mixin.

type CreateUpdateSchema added in v0.0.8

type CreateUpdateSchema struct {
	mixin.Schema
}

CreateUpdateSchema schema to include control and time fields.

func (CreateUpdateSchema) Fields added in v0.0.8

func (CreateUpdateSchema) Fields() []ent.Field

Fields of the mixin.

func (CreateUpdateSchema) Indexes added in v0.0.8

func (CreateUpdateSchema) Indexes() []ent.Index

Indexes of the mixin.

type DeleteSchema added in v0.0.8

type DeleteSchema struct {
	mixin.Schema
}

DeleteSchema schema to include control and time fields.

func (DeleteSchema) Fields added in v0.0.8

func (DeleteSchema) Fields() []ent.Field

Fields of the Model.

func (DeleteSchema) Indexes added in v0.0.8

func (DeleteSchema) Indexes() []ent.Index

Indexes of the mixin.

type ID added in v0.0.7

type ID struct {
	mixin.Schema
}

ID schema to include control and time fields.

func (ID) Fields added in v0.0.7

func (ID) Fields() []ent.Field

Fields of the mixin.

func (ID) Indexes added in v0.0.7

func (ID) Indexes() []ent.Index

Indexes of the mixin.

type SoftDeleteSchema

type SoftDeleteSchema = DeleteSchema

SoftDeleteSchema schema to include control and time fields.

type UpdateSchema added in v0.0.8

type UpdateSchema struct {
	mixin.Schema
}

UpdateSchema schema to include control and time fields.

func (UpdateSchema) Fields added in v0.0.8

func (UpdateSchema) Fields() []ent.Field

Fields of the mixin.

func (UpdateSchema) Indexes added in v0.0.8

func (UpdateSchema) Indexes() []ent.Index

Indexes of the mixin.

Jump to

Keyboard shortcuts

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