schema

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Overview

Package schema - the subscriptions module's own ent schema: its tables, apart from the core's. Their users, content, comments and terms are the core's: the stand-ins here are their tables (migrations.Sets), for the foreign keys only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct{ ent.Schema }

Comment - the core's comments: the one a notification tells of (ON DELETE CASCADE).

func (Comment) Annotations

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

Annotations of the Comment.

func (Comment) Fields

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

Fields of the Comment.

type Node

type Node struct{ ent.Schema }

Node - the core's content: what is subscribed to and told of (ON DELETE CASCADE).

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 Subscription

type Subscription struct{ ent.Schema }

Subscription - a user following a content item's comments (node_id) or a term's new content (term_id). Muted - they unsubscribed: the row stays so commenting doesn't subscribe them again. Token - the unsubscribe link of its e-mails.

func (Subscription) Annotations

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

Annotations of the Subscription.

func (Subscription) Edges

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

Edges of the Subscription.

func (Subscription) Fields

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

Fields of the Subscription.

func (Subscription) Indexes

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

Indexes of the Subscription.

type SubscriptionNotification

type SubscriptionNotification struct{ ent.Schema }

SubscriptionNotification - something told to a user: kind "reply" (a reply to their comment), "comment" (a comment on content they follow), "content" (new content with a term they follow, term_id). read_at - when they opened it; mail_state - 0 waiting for the e-mail, 1 mailed, 2 not to be mailed.

func (SubscriptionNotification) Annotations

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

Annotations of the SubscriptionNotification.

func (SubscriptionNotification) Edges

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

Edges of the SubscriptionNotification.

func (SubscriptionNotification) Fields

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

Fields of the SubscriptionNotification.

func (SubscriptionNotification) Indexes

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

Indexes of the SubscriptionNotification.

type SubscriptionSettings

type SubscriptionSettings struct{ ent.Schema }

SubscriptionSettings - the module's settings (one row, id 1): the e-mail's template (blank - the default) and the day the last digest went out.

func (SubscriptionSettings) Annotations

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

Annotations of the SubscriptionSettings.

func (SubscriptionSettings) Fields

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

Fields of the SubscriptionSettings.

type SubscriptionUserSettings

type SubscriptionUserSettings struct{ ent.Schema }

SubscriptionUserSettings - a user's settings of the module (their profile form): mail - "now", "daily" or "never"; replies - told of replies to their comments; auto_own / auto_commented - subscribed to their content, to content they comment on. No row - the defaults.

func (SubscriptionUserSettings) Annotations

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

Annotations of the SubscriptionUserSettings.

func (SubscriptionUserSettings) Edges

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

Edges of the SubscriptionUserSettings.

func (SubscriptionUserSettings) Fields

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

Fields of the SubscriptionUserSettings.

func (SubscriptionUserSettings) Indexes

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

Indexes of the SubscriptionUserSettings.

type Term

type Term struct{ ent.Schema }

Term - the core's taxonomy terms: one followed (ON DELETE CASCADE).

func (Term) Annotations

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

Annotations of the Term.

func (Term) Fields

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

Fields of the Term.

type User

type User struct{ ent.Schema }

User - the core's users: a subscriber, a notification's recipient (ON DELETE CASCADE) and its actor (SET NULL).

func (User) Annotations

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

Annotations 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