badge.md•2.39 kB
# Diagrama de Classes - Badge System
:::mermaid
classDiagram
direction TB
class IBadge {
<<interface>>
+string Name
+string Description
+bool IsEnabled
+bool IsHidden
+IBadgeRegisterConfig RegisterConfig
+List<IBadgeEntity> Entities
+List<IBadgeRule> Rules
+List<IBadgeUserRegister> UserRegisters
+List<IBadgeRegisterConfig> RequiredForRegister
}
class IBadgeRule {
<<interface>>
+long? MinimumPoints
+List<IBadgeCondition> AnyConditions
+List<IBadgeCondition> AllConditions
}
class IBadgeCondition {
<<interface>>
+ObjectType? ReferenceType
+Guid? ReferenceUid
}
class IBadgeEntity {
<<interface>>
}
class IBadgeAuthorization {
<<interface>>
IBaseAuthorizationV4
}
class IBadgeRegisterConfig {
<<interface>>
+BadgeRegisterType AuthorizeRegisterType
+TimeSpan? ExpireAfterAt
+DateTime? ExpireAt
+long? MaxUsers
+long? RequiredPoints
+List<IBadge> RequiredBadges
}
class IBadgeUserRegister {
<<interface>>
+IUserBadgeReferente UserReference
+BadgeRegisterType RegisterType
+DateTime? ExpireAt
}
class IUserBadgeReferente {
<<interface>>
+Guid UserUid
+long Points
+DateTime? NextPointToExpire
+List<IBadgeUserRegister> Registers
}
class IUserPoints {
<<interface>>
+long Points
+string Description
+DateTime? ExpireAt
+ObjectType? ReferenceType
+Guid? ReferenceUid
}
class BadRuleLimitation {
<<enum>>
None,
Once,
Daily,
Weekly,
Monthly,
Yearly
}
class BadgeRegisterType {
<<enum>>
ByUser
ByManager
ByPoints
}
IBadge --> IBadgeRegisterConfig
IBadge --> IBadgeUserRegister
IBadge --> IBadgeAuthorization
IBadge --> IBadgeEntity
IBadge --> IBadgeRule
IBadgeRegisterConfig --> IBadge
IBadgeRegisterConfig --> BadgeRegisterType
IBadgeUserRegister --> IUserBadgeReferente
IUserBadgeReferente --> IBadgeUserRegister
IUserPoints --> IUserBadgeReferente
IBadgeRule --> IBadgeCondition
IBadgeRule --> BadRuleLimitation