schema

package
v0.0.0-...-23bdc36 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Car

type Car struct {
	ent.Schema
}

Car holds the schema definition for the Car entity.

func (Car) Annotations

func (Car) Annotations() []schema.Annotation

Annotations of the Car.

func (Car) Edges

func (Car) Edges() []ent.Edge

Edges of the Car.

func (Car) Fields

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

Fields of the Car.

func (Car) Mixin

func (Car) Mixin() []ent.Mixin

type DetailsMixin

type DetailsMixin struct {
	// We embed the `mixin.Schema` to avoid
	// implementing the rest of the methods.
	mixin.Schema
}

DetailsMixin implements the ent.Mixin for sharing entity details fields with package schemas.

func (DetailsMixin) Fields

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

type Group

type Group struct {
	ent.Schema
}

Group holds the schema definition for the Group entity.

func (Group) Annotations

func (Group) Annotations() []schema.Annotation

Annotations of the Group.

func (Group) Edges

func (Group) Edges() []ent.Edge

Edges of the Group.

func (Group) Fields

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

Fields of the Group.

func (Group) Mixin

func (Group) Mixin() []ent.Mixin

type Pet

type Pet struct {
	ent.Schema
}

Pet schema mixed-in the DetailsMixin fields and therefore has 3 fields: `age`, `name` and `weight`.

func (Pet) Fields

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

func (Pet) Mixin

func (Pet) Mixin() []ent.Mixin

type TimeMixin

type TimeMixin struct {
	// We embed the `mixin.Schema` to avoid
	// implementing the rest of the methods.
	mixin.Schema
}

TimeMixin implements the ent.Mixin for sharing time fields with package schemas.

func (TimeMixin) Fields

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

* field.Time("created_at").

SchemaType(map[string]string{
    dialect.MySQL:    "datetime",
    dialect.Postgres: "date",
})

type User

type User struct {
	ent.Schema
}

User holds the schema definition for the User entity.

func (User) Annotations

func (User) Annotations() []schema.Annotation

Annotations of the User.

func (User) Edges

func (User) Edges() []ent.Edge

Edges of the User.

func (User) Fields

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

Fields of the User.

func (User) Mixin

func (User) Mixin() []ent.Mixin

Jump to

Keyboard shortcuts

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