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 ¶
func (t *OrganizationPostgreSQLModel) ToEntity() *mmodel.Organization
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.
Click to show internal directories.
Click to hide internal directories.