package entity import ( "go.mongodb.org/mongo-driver/v2/bson" ) // InviteCode stores tenant-scoped registration invite metadata. type InviteCode struct { ID bson.ObjectID `bson:"_id,omitempty"` TenantID string `bson:"tenant_id"` CodeHash string `bson:"code_hash"` MaxUses int64 `bson:"max_uses"` UsedCount int64 `bson:"used_count"` ExpiresAt int64 `bson:"expires_at,omitempty"` NewUsersOnly bool `bson:"new_users_only"` CreateAt int64 `bson:"create_at"` UpdateAt int64 `bson:"update_at"` } // CollectionName returns the MongoDB collection for invite codes. func (InviteCode) CollectionName() string { return "invite_codes" }