schema

package
v0.0.0-...-3da28a4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 7 Imported by: 0

README

SQL SChema

Using ent

Add Schema

# add `User` and `Pet` table
go run -mod=mod entgo.io/ent/cmd/ent init User Pet

Generate Scripts

go generate ./ent

Export SQL

# start local mysql server
docker compose up -d

# export
go run ./scripts/main.go export

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Biography

type Biography struct {
	ent.Schema
}

Biography holds the schema definition for the Biography entity.

func (Biography) Edges

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

Edges of the Biography.

func (Biography) Fields

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

Fields of the Biography.

func (Biography) Indexes

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

type Category

type Category struct {
	ent.Schema
}

Category holds the schema definition for the Category entity.

func (Category) Edges

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

Edges of the Category.

func (Category) Fields

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

Fields of the Category.

type Contact

type Contact struct {
	ent.Schema
}

Contact holds the schema definition for the Contact entity.

func (Contact) Edges

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

Edges of the Contact.

func (Contact) Fields

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

Fields of the Contact.

func (Contact) Indexes

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

type ContactDefault

type ContactDefault struct {
	ent.Schema
}

ContactDefault holds the schema definition for the ContactDefault entity.

func (ContactDefault) Edges

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

Edges of the ContactDefault.

func (ContactDefault) Fields

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

Fields of the ContactDefault.

type Link struct {
	ent.Schema
}

Link holds the schema definition for the Link entity.

func (Link) Edges

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

Edges of the Link.

func (Link) Fields

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

Fields of the Link.

func (Link) Indexes

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

type Location

type Location struct {
	ent.Schema
}

Location holds the schema definition for the Location entity.

func (Location) Edges

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

Edges of the Location.

func (Location) Fields

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

Fields of the Location.

type Notice

type Notice struct {
	ent.Schema
}

Notice holds the schema definition for the Notice entity.

func (Notice) Edges

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

Edges of the Notice.

func (Notice) Fields

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

Fields of the Notice.

type Product

type Product struct {
	ent.Schema
}

Product holds the schema definition for the Product entity.

func (Product) Edges

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

Edges of the Product.

func (Product) Fields

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

Fields of the Product.

func (Product) Indexes

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

type Session

type Session struct {
	ent.Schema
}

Session holds the schema definition for the Session entity.

func (Session) Edges

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

Edges of the Session.

func (Session) Fields

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

Fields of the Session.

func (Session) Indexes

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

type User

type User struct {
	ent.Schema
}

User holds the schema definition for the User entity.

func (User) Edges

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

Edges of the User.

func (User) Fields

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

Fields of the User.

Jump to

Keyboard shortcuts

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