package entity

import (
	"gateway/internal/model/auth/domain/enum"

	"go.mongodb.org/mongo-driver/v2/bson"
)

// RegistrationMetadata captures audit fields for a member registration event.
type RegistrationMetadata struct {
	ID                  bson.ObjectID            `bson:"_id,omitempty"`
	TenantID            string                   `bson:"tenant_id"`
	UID                 string                   `bson:"uid"`
	InviteCodeID        string                   `bson:"invite_code_id,omitempty"`
	AcceptTermsVersion  string                   `bson:"accept_terms_version"`
	MarketingOptIn      bool                     `bson:"marketing_opt_in"`
	RegistrationChannel enum.RegistrationChannel `bson:"registration_channel"`
	ClientIP            string                   `bson:"client_ip,omitempty"`
	UserAgent           string                   `bson:"user_agent,omitempty"`
	OccurredAt          int64                    `bson:"occurred_at"`
	CreateAt            int64                    `bson:"create_at"`
}

// CollectionName returns the MongoDB collection for registration metadata.
func (RegistrationMetadata) CollectionName() string {
	return "registration_metadata"
}
