This commit is contained in:
adlerhurst
2025-07-16 18:36:21 +02:00
parent d63fe8e227
commit a0329bd221
5 changed files with 133 additions and 80 deletions

View File

@@ -2,6 +2,7 @@ package domain
import (
"context"
"time"
"github.com/zitadel/zitadel/backend/v3/storage/database"
)
@@ -25,6 +26,13 @@ type AddOrganizationDomain struct {
IsVerified bool `json:"isVerified,omitempty" db:"is_verified"`
IsPrimary bool `json:"isPrimary,omitempty" db:"is_primary"`
VerificationType DomainVerificationType `json:"verificationType,omitempty" db:"verification_type"`
// CreatedAt is the time when the domain was added.
// It is set by the repository and should not be set by the caller.
CreatedAt time.Time `json:"createdAt,omitzero" db:"created_at"`
// UpdatedAt is the time when the domain was added.
// It is set by the repository and should not be set by the caller.
UpdatedAt time.Time `json:"updatedAt,omitzero" db:"updated_at"`
}
type organizationDomainColumns interface {
@@ -51,7 +59,7 @@ type OrganizationDomainRepository interface {
// Add adds a new domain to the organization.
Add(ctx context.Context, domain *AddOrganizationDomain) error
// Update updates an existing domain in the organization.
Update(ctx context.Context, condition database.Condition, changes ...database.Change) error
Update(ctx context.Context, condition database.Condition, changes ...database.Change) (int64, error)
// Remove removes a domain from the organization.
Remove(ctx context.Context, condition database.Condition) error
Remove(ctx context.Context, condition database.Condition) (int64, error)
}