schema

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletedAtHook

func DeletedAtHook(next ent.Mutator) ent.Mutator

func UpdatedAtHook

func UpdatedAtHook(next ent.Mutator) ent.Mutator

func WithStatus

func WithStatus(ctx context.Context, status Status) context.Context

Types

type ActiveStatus

type ActiveStatus string
const (
	StatusActive   ActiveStatus = "active"
	StatusInactive ActiveStatus = "inactive"
)

func (*ActiveStatus) Scan

func (s *ActiveStatus) Scan(value any) error

func (ActiveStatus) Value

func (s ActiveStatus) Value() (driver.Value, error)

type ActiveStatusSchema

type ActiveStatusSchema struct {
	mixin.Schema
}

func (ActiveStatusSchema) Fields

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

type BaseEntitySchema

type BaseEntitySchema struct {
	mixin.Schema
}

func (BaseEntitySchema) Fields

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

func (BaseEntitySchema) Indexes

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

type CasbinPolicy

type CasbinPolicy struct {
	ent.Schema
}

CasbinPolicy holds the schema definition for the CasbinPolicy entity. 用于存储 Casbin RBAC/ABAC 策略规则

func (CasbinPolicy) Fields

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

Fields of the CasbinPolicy.

func (CasbinPolicy) Indexes

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

Indexes of the CasbinPolicy.

type Media

type Media struct {
	ent.Schema
}

func (Media) Edges

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

func (Media) Fields

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

func (Media) Indexes

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

func (Media) Mixin

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

type MediaFormat

type MediaFormat struct {
	ent.Schema
}

func (MediaFormat) Edges

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

func (MediaFormat) Fields

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

func (MediaFormat) Indexes

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

func (MediaFormat) Mixin

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

type Status

type Status string
const (
	Draft     Status = "draft"
	Published Status = "published"
	Archived  Status = "archived"
)

func StatusFromContext

func StatusFromContext(ctx context.Context) (Status, bool)

type StatusContextKey

type StatusContextKey struct{}

Jump to

Keyboard shortcuts

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