package mixin
import "entgo.io/ent/schema/mixin"
Index ¶
- func AnnotateEdges(m ent.Mixin, annotations ...schema.Annotation) ent.Mixin
- func AnnotateFields(m ent.Mixin, annotations ...schema.Annotation) ent.Mixin
- type CreateTime
- type Schema
- func (Schema) Annotations() []schema.Annotation
- func (Schema) Edges() []ent.Edge
- func (Schema) Fields() []ent.Field
- func (Schema) Hooks() []ent.Hook
- func (Schema) Indexes() []ent.Index
- func (Schema) Interceptors() []ent.Interceptor
- func (Schema) Policy() ent.Policy
- type Time
- type UpdateTime
Functions ¶
func AnnotateEdges ¶
AnnotateEdges adds edge annotations to underlying mixin edges.
func AnnotateFields ¶
AnnotateFields adds field annotations to underlying mixin fields.
Types ¶
type CreateTime ¶
type CreateTime struct{ Schema }
CreateTime adds created at time field.
func (CreateTime) Fields ¶
func (CreateTime) Fields() []ent.Field
Fields of the create time mixin.
type Schema ¶
type Schema struct{}
Schema is the default implementation for the ent.Mixin interface. It should be embedded in end-user mixin as follows:
type M struct { mixin.Schema }
func (Schema) Annotations ¶
func (Schema) Annotations() []schema.Annotation
Annotations of the mixin.
func (Schema) Edges ¶
Edges of the mixin.
func (Schema) Fields ¶
Fields of the mixin.
func (Schema) Hooks ¶
Hooks of the mixin.
func (Schema) Indexes ¶
Indexes of the mixin.
func (Schema) Interceptors ¶
func (Schema) Interceptors() []ent.Interceptor
Interceptors of the schema.
func (Schema) Policy ¶
Policy of the mixin.
type Time ¶
type Time struct{ Schema }
Time composes create/update time mixin.
func (Time) Fields ¶
Fields of the time mixin.
type UpdateTime ¶
type UpdateTime struct{ Schema }
UpdateTime adds updated at time field.
func (UpdateTime) Fields ¶
func (UpdateTime) Fields() []ent.Field
Fields of the update time mixin.
Source Files ¶
mixin.go
- Version
- v0.14.4 (latest)
- Published
- Mar 17, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 1 day ago –
Tools for package owners.