Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LedgerPostgreSQLModel ¶
type LedgerPostgreSQLModel struct { ID string Name string OrganizationID string Status string StatusDescription *string CreatedAt time.Time UpdatedAt time.Time DeletedAt sql.NullTime Metadata map[string]any }
LedgerPostgreSQLModel represents the entity.Ledger into SQL context in Database
func (*LedgerPostgreSQLModel) FromEntity ¶
func (t *LedgerPostgreSQLModel) FromEntity(ledger *mmodel.Ledger)
FromEntity converts an entity.Ledger to LedgerPostgreSQLModel
func (*LedgerPostgreSQLModel) ToEntity ¶
func (t *LedgerPostgreSQLModel) ToEntity() *mmodel.Ledger
ToEntity converts an LedgerPostgreSQLModel to entity.Ledger
type Repository ¶
type Repository interface { Create(ctx context.Context, ledger *mmodel.Ledger) (*mmodel.Ledger, error) Find(ctx context.Context, organizationID, id uuid.UUID) (*mmodel.Ledger, error) FindAll(ctx context.Context, organizationID uuid.UUID, limit, page int) ([]*mmodel.Ledger, error) FindByName(ctx context.Context, organizationID uuid.UUID, name string) (bool, error) ListByIDs(ctx context.Context, organizationID uuid.UUID, ids []uuid.UUID) ([]*mmodel.Ledger, error) Update(ctx context.Context, organizationID, id uuid.UUID, ledger *mmodel.Ledger) (*mmodel.Ledger, error) Delete(ctx context.Context, organizationID, id uuid.UUID) error }
Repository provides an interface for operations related to ledger entities.
Click to show internal directories.
Click to hide internal directories.