plan

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plan

type Plan struct {
	ID            string `db:"id" json:"id"`
	Name          string `db:"name" json:"name"`
	LookupKey     string `db:"lookup_key" json:"lookup_key"`
	Description   string `db:"description" json:"description"`
	EnvironmentID string `db:"environment_id" json:"environment_id"`
	types.BaseModel
}

func FromEnt

func FromEnt(e *ent.Plan) *Plan

FromEnt converts an Ent Plan to a domain Plan

func FromEntList

func FromEntList(list []*ent.Plan) []*Plan

FromEntList converts a list of Ent Plans to domain Plans

type Repository

type Repository interface {
	// Core operations
	Create(ctx context.Context, plan *Plan) error
	Get(ctx context.Context, id string) (*Plan, error)
	List(ctx context.Context, filter *types.PlanFilter) ([]*Plan, error)
	ListAll(ctx context.Context, filter *types.PlanFilter) ([]*Plan, error)
	Count(ctx context.Context, filter *types.PlanFilter) (int, error)
	Update(ctx context.Context, plan *Plan) error
	Delete(ctx context.Context, id string) error

	// Lookup operations
	GetByLookupKey(ctx context.Context, lookupKey string) (*Plan, error)
}

Repository defines the interface for plan persistence operations

Jump to

Keyboard shortcuts

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