data

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LookupItem

type LookupItem struct {
	ID       int
	Name     string
	ValidID  int
	IsSystem bool
	TypeID   int // For states
}

LookupItem represents a database lookup value

type LookupsRepository

type LookupsRepository struct {
	// contains filtered or unexported fields
}

LookupsRepository handles database operations for lookup values

func NewLookupsRepository

func NewLookupsRepository(db *sql.DB) *LookupsRepository

NewLookupsRepository creates a new lookups repository

func (*LookupsRepository) AddTranslation

func (r *LookupsRepository) AddTranslation(ctx context.Context, tableName, fieldValue, lang, translation string, isSystem bool) error

AddTranslation adds a new translation to the database

func (*LookupsRepository) GetAllTranslations

func (r *LookupsRepository) GetAllTranslations(ctx context.Context, lang string) (map[string]map[string]string, error)

GetAllTranslations fetches all translations for a specific language

func (*LookupsRepository) GetQueues

func (r *LookupsRepository) GetQueues(ctx context.Context) ([]LookupItem, error)

GetQueues fetches all queues from the database

func (*LookupsRepository) GetTicketPriorities

func (r *LookupsRepository) GetTicketPriorities(ctx context.Context) ([]LookupItem, error)

GetTicketPriorities fetches all ticket priorities from the database

func (*LookupsRepository) GetTicketStates

func (r *LookupsRepository) GetTicketStates(ctx context.Context) ([]LookupItem, error)

GetTicketStates fetches all ticket states from the database

func (*LookupsRepository) GetTicketTypes

func (r *LookupsRepository) GetTicketTypes(ctx context.Context) ([]LookupItem, error)

GetTicketTypes fetches all ticket types from the database

func (*LookupsRepository) GetTranslation

func (r *LookupsRepository) GetTranslation(ctx context.Context, tableName, fieldValue, lang string) (string, error)

GetTranslation fetches a translation from the lookup_translations table

Jump to

Keyboard shortcuts

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