Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
// codeberg.org/mapleopentech/monorepo/cloud/maplefile-backend/internal/domain/blockedemail/entity.go
|
||||
package blockedemail
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/gocql/gocql"
|
||||
)
|
||||
|
||||
// BlockedEmail represents a blocked email entry for a user
|
||||
type BlockedEmail struct {
|
||||
UserID gocql.UUID `json:"user_id"`
|
||||
BlockedEmail string `json:"blocked_email"`
|
||||
BlockedUserID gocql.UUID `json:"blocked_user_id"`
|
||||
Reason string `json:"reason"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
// codeberg.org/mapleopentech/monorepo/cloud/maplefile-backend/internal/domain/blockedemail/interface.go
|
||||
package blockedemail
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gocql/gocql"
|
||||
)
|
||||
|
||||
// BlockedEmailRepository defines the interface for blocked email data access
|
||||
type BlockedEmailRepository interface {
|
||||
// Create adds a new blocked email entry
|
||||
Create(ctx context.Context, blockedEmail *BlockedEmail) error
|
||||
|
||||
// Get retrieves a specific blocked email entry
|
||||
Get(ctx context.Context, userID gocql.UUID, blockedEmail string) (*BlockedEmail, error)
|
||||
|
||||
// List retrieves all blocked emails for a user
|
||||
List(ctx context.Context, userID gocql.UUID) ([]*BlockedEmail, error)
|
||||
|
||||
// Delete removes a blocked email entry
|
||||
Delete(ctx context.Context, userID gocql.UUID, blockedEmail string) error
|
||||
|
||||
// IsBlocked checks if an email is blocked by a user
|
||||
IsBlocked(ctx context.Context, userID gocql.UUID, email string) (bool, error)
|
||||
|
||||
// Count returns the number of blocked emails for a user
|
||||
Count(ctx context.Context, userID gocql.UUID) (int, error)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue