schema

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package schema - the workflow module's own ent schema: its states and transitions, which content types follow it, each item's state and the transitions made.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type History

type History struct{ ent.Schema }

History - a transition made: an item from from_state to to_state by uid at created_at, with comment.

func (History) Annotations

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

Annotations of the History.

func (History) Edges

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

Edges of the History.

func (History) Fields

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

Fields of the History.

func (History) Indexes

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

Indexes of the History.

type Lock

type Lock struct{ ent.Schema }

Lock - an item edited by uid in its form since locked_at, last active at touched_at.

func (Lock) Annotations

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

Annotations of the Lock.

func (Lock) Edges

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

Edges of the Lock.

func (Lock) Fields

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

Fields of the Lock.

func (Lock) Indexes

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

Indexes of the Lock.

type Node

type Node struct{ ent.Schema }

Node - the core's nodes (their id only): an item's state, history and lock, deleted with it (ON DELETE CASCADE). The module reads them through the core.

func (Node) Annotations

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

Annotations of the Node.

func (Node) Fields

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

Fields of the Node.

type NodeState

type NodeState struct{ ent.Schema }

NodeState - an item's state since changed_at, by changed_by (0 - nobody: set when its type joined the workflow).

func (NodeState) Annotations

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

Annotations of the NodeState.

func (NodeState) Edges

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

Edges of the NodeState.

func (NodeState) Fields

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

Fields of the NodeState.

func (NodeState) Indexes

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

Indexes of the NodeState.

type User added in v0.1.2

type User struct{ ent.Schema }

User - the core's users (their id only): a user's settings, deleted with them (ON DELETE CASCADE).

func (User) Annotations added in v0.1.2

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

Annotations of the User.

func (User) Fields added in v0.1.2

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

Fields of the User.

type UserSettings added in v0.1.2

type UserSettings struct{ ent.Schema }

UserSettings - a user's settings of the module (their profile form): whether they get its e-mails. No row - the default (on).

func (UserSettings) Annotations added in v0.1.2

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

Annotations of the UserSettings.

func (UserSettings) Edges added in v0.1.2

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

Edges of the UserSettings.

func (UserSettings) Fields added in v0.1.2

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

Fields of the UserSettings.

func (UserSettings) Indexes added in v0.1.2

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

Indexes of the UserSettings.

type WorkflowSettings

type WorkflowSettings struct{ ent.Schema }

WorkflowSettings - the module's settings (one row, id 1): content_types - the types whose items follow the workflow; lock_minutes - how long an item's form stays locked without its editor's activity (0 - items aren't locked).

func (WorkflowSettings) Annotations

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

Annotations of the WorkflowSettings.

func (WorkflowSettings) Fields

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

Fields of the WorkflowSettings.

type WorkflowState

type WorkflowState struct{ ent.Schema }

WorkflowState - a state of an item: machine_name, label, published - the item is on the site in it, color - its mark (a palette name), initial - a new item's (one), weight - its order.

func (WorkflowState) Annotations

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

Annotations of the WorkflowState.

func (WorkflowState) Fields

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

Fields of the WorkflowState.

func (WorkflowState) Indexes

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

Indexes of the WorkflowState.

type WorkflowTransition

type WorkflowTransition struct{ ent.Schema }

WorkflowTransition - a move from one of from_states to to_state by the button label, for the roles (role names; the full-access ones may make any); comment - "optional", "required" or "none".

func (WorkflowTransition) Annotations

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

Annotations of the WorkflowTransition.

func (WorkflowTransition) Fields

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

Fields of the WorkflowTransition.

Jump to

Keyboard shortcuts

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