organization

package
v1.29.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrganizationPostgreSQLModel

type OrganizationPostgreSQLModel struct {
	ID                   string
	ParentOrganizationID *string
	LegalName            string
	DoingBusinessAs      *string
	LegalDocument        string
	Address              mmodel.Address
	Status               string
	StatusDescription    *string
	CreatedAt            time.Time
	UpdatedAt            time.Time
	DeletedAt            sql.NullTime
	Metadata             map[string]any
}

OrganizationPostgreSQLModel represents the entity Organization into SQL context in Database

func (*OrganizationPostgreSQLModel) FromEntity

func (t *OrganizationPostgreSQLModel) FromEntity(organization *mmodel.Organization)

FromEntity converts an entity.Organization to OrganizationPostgresModel

func (*OrganizationPostgreSQLModel) ToEntity

ToEntity converts an OrganizationPostgreSQLModel to entity.Organization

type Repository

type Repository interface {
	Create(ctx context.Context, organization *mmodel.Organization) (*mmodel.Organization, error)
	Update(ctx context.Context, id uuid.UUID, organization *mmodel.Organization) (*mmodel.Organization, error)
	Find(ctx context.Context, id uuid.UUID) (*mmodel.Organization, error)
	FindAll(ctx context.Context, limit, page int) ([]*mmodel.Organization, error)
	ListByIDs(ctx context.Context, ids []uuid.UUID) ([]*mmodel.Organization, error)
	Delete(ctx context.Context, id uuid.UUID) error
}

Repository provides an interface for operations related to organization entities.

Jump to

Keyboard shortcuts

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