schema

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

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 holds the schema definition for the Comment entity, mirroring the `comments` table defined in sync/db.go. Note: unlike most other entities, `product` is nullable here (no NOT NULL in the original schema).

func (Comment) Fields

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

Fields of the Comment.

func (Comment) Indexes

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

Indexes of the Comment.

type Epic

type Epic struct {
	ent.Schema
}

Epic holds the schema definition for the Epic entity, mirroring the `epics` table defined in sync/db.go.

func (Epic) Fields

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

Fields of the Epic.

func (Epic) Indexes

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

Indexes of the Epic.

type Feature

type Feature struct {
	ent.Schema
}

Feature holds the schema definition for the Feature entity, mirroring the `features` table defined in sync/db.go.

func (Feature) Fields

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

Fields of the Feature.

func (Feature) Indexes

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

Indexes of the Feature.

type Goal

type Goal struct {
	ent.Schema
}

Goal holds the schema definition for the Goal entity, mirroring the `goals` table defined in sync/db.go.

func (Goal) Fields

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

Fields of the Goal.

func (Goal) Indexes

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

Indexes of the Goal.

type Idea

type Idea struct {
	ent.Schema
}

Idea holds the schema definition for the Idea entity, mirroring the `ideas` table defined in sync/db.go.

func (Idea) Fields

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

Fields of the Idea.

func (Idea) Indexes

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

Indexes of the Idea.

type IdeaEndorsement

type IdeaEndorsement struct {
	ent.Schema
}

IdeaEndorsement holds the schema definition for the IdeaEndorsement entity, mirroring an idea's endorsements ("votes" in the Aha UI) as returned by GET /ideas/:idea_id/endorsements. Unlike Relationship, each endorsement carries Aha's own natural id, so this follows Comment's template (natural string PK, parent-ref column, flattened nested-object fields) rather than Relationship's synthetic-key/composite-unique-index shape.

func (IdeaEndorsement) Fields

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

Fields of the IdeaEndorsement.

func (IdeaEndorsement) Indexes

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

Indexes of the IdeaEndorsement.

type IdeaOrganization

type IdeaOrganization struct {
	ent.Schema
}

IdeaOrganization holds the schema definition for the IdeaOrganization entity, mirroring GET /idea_organizations -- Aha's own CRM-style customer/account records, account-wide (not scoped to a single idea). email_domains is Aha's own authoritative domain-to-organization mapping; revenue and endorsements_count only appear on the single-GET response, so they're populated only when synced with SyncOptions.Detailed=true (the bulk list response omits them).

func (IdeaOrganization) Fields

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

Fields of the IdeaOrganization.

func (IdeaOrganization) Indexes

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

Indexes of the IdeaOrganization.

type IdeaUser

type IdeaUser struct {
	ent.Schema
}

IdeaUser holds the schema definition for the IdeaUser entity, mirroring GET /idea_users -- voter identities, account-wide (not scoped to a single idea, like Comment/IdeaEndorsement are). idea_organizations membership is stored as a JSON array of light {id, name} refs rather than a join table: membership is small (0-2 orgs per sample seen) and only ever read alongside its parent IdeaUser row, matching the "JSON catch-all for less-critical relational data" convention already used by Comment.data.

func (IdeaUser) Fields

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

Fields of the IdeaUser.

func (IdeaUser) Indexes

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

Indexes of the IdeaUser.

type Initiative

type Initiative struct {
	ent.Schema
}

Initiative holds the schema definition for the Initiative entity, mirroring the `initiatives` table defined in sync/db.go. See /Users/johnwang/.claude/plans/sprightly-waddling-platypus.md.

func (Initiative) Fields

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

Fields of the Initiative.

func (Initiative) Indexes

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

Indexes of the Initiative.

type Product

type Product struct {
	ent.Schema
}

Product holds the schema definition for the Product entity, mirroring the `products` table defined in sync/db.go. No indexes on this table today.

func (Product) Fields

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

Fields of the Product.

type Relationship

type Relationship struct {
	ent.Schema
}

Relationship holds the schema definition for the Relationship entity, a generic directed-edge table for offline joins between entity types (`from_type`/`from_id` -> `rel_type` -> `to_type`/`to_id`), mirroring the `relationships` table defined in sync/db.go.

Unlike most other tables, this one has a surrogate `INTEGER PRIMARY KEY AUTOINCREMENT` id in the original schema, so no `field.String("id")` override here — Ent's default int-autoincrement ID matches it directly. Uniqueness is enforced via the composite index below (mirroring the original UNIQUE(from_type, from_id, rel_type, to_type, to_id) constraint), same pattern as visionstudio's initiativedependency.go et al.

func (Relationship) Fields

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

Fields of the Relationship.

func (Relationship) Indexes

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

Indexes of the Relationship.

type Release

type Release struct {
	ent.Schema
}

Release holds the schema definition for the Release entity, mirroring the `releases` table defined in sync/db.go.

func (Release) Fields

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

Fields of the Release.

func (Release) Indexes

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

Indexes of the Release.

type Requirement

type Requirement struct {
	ent.Schema
}

Requirement holds the schema definition for the Requirement entity, mirroring the `requirements` table defined in sync/db.go.

func (Requirement) Fields

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

Fields of the Requirement.

func (Requirement) Indexes

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

Indexes of the Requirement.

type SavedFilter

type SavedFilter struct {
	ent.Schema
}

SavedFilter holds the schema definition for the SavedFilter entity, mirroring the `saved_filters` table defined in sync/db.go. No `data` JSON column on this table. `created_at`/`updated_at` had `DEFAULT CURRENT_TIMESTAMP` in the original SQL; Ent v0.14 doesn't portably push that into DDL, so the default moves to the Go layer here (CreateFilter/UpdateFilter already set timestamps manually today, so this is like-for-like, not new behavior).

func (SavedFilter) Fields

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

Fields of the SavedFilter.

func (SavedFilter) Indexes

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

Indexes of the SavedFilter.

type SyncMeta

type SyncMeta struct {
	ent.Schema
}

SyncMeta holds the schema definition for the SyncMeta entity, mirroring the `sync_meta` table defined in sync/db.go. Original schema has a composite natural key (entity, product), no surrogate id column; Ent has no native composite-PK support for regular node schemas, so this uses the same workaround as Relationship: default int-autoincrement ID + a unique composite index. Table name is explicitly pinned via entsql.Annotation since Ent's default pluralization of "SyncMeta" would produce "sync_metas", not the existing "sync_meta".

func (SyncMeta) Annotations

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

Annotations of the SyncMeta.

func (SyncMeta) Fields

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

Fields of the SyncMeta.

func (SyncMeta) Indexes

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

Indexes of the SyncMeta.

type User

type User struct {
	ent.Schema
}

User holds the schema definition for the User entity, mirroring the `users` table defined in sync/db.go. No indexes on this table today.

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