Colony Event
Events Definition
This file defines the colony event structure within the Roll Claw domain model.
Implementation
Colony Event Definition
File: domain/events/colony_event.pseudo
// Colony Event - Domain Event
class ColonyEvent {
// Identity
string id
// Properties
Date date
Time time
string description
ColonyEventType type
List<Cat> involvedCats
string notes
Person reporter
Location location
// Methods
function getRelatedEvents()
function getCausedBy() // related events that caused this one
function getImpactedCats()
function getColony()
function getAffectedEquipment()
function getEnvironmentalFactors()
}
// Specific event types for stronger typing
class BirthEvent extends ColonyEvent {
Cat mother
List<Cat> kittens
Cat fatherIfKnown
RelationshipConfidence paternalConfidence
constructor() {
super.type = ColonyEventType.BIRTH
}
// Methods
function getOtherSiblings()
function getLitterSize()
}
class DeathEvent extends ColonyEvent {
DeathCause cause
MedicalCondition relatedCondition // if applicable
string circumstanceDetails
constructor() {
super.type = ColonyEventType.DEATH
}
// Methods
function wasPreventable()
function getAgeAtDeath()
}
class InjuryEvent extends ColonyEvent {
string injuryDescription
MedicalCondition resultingCondition
string treatmentProvided
boolean requiredVetVisit
constructor() {
super.type = ColonyEventType.INJURY
}
// Methods
function getSeverity()
function getRecoveryTimeline()
}
class RelocationEvent extends ColonyEvent {
Colony sourceColony
Colony destinationColony
string reason
boolean isTemporary
constructor() {
super.type = ColonyEventType.RELOCATION
}
// Methods
function wasSuccessful()
function getDistanceRelocated()
}
class DisappearanceEvent extends ColonyEvent {
Sighting lastSighting
string circumstances
constructor() {
super.type = ColonyEventType.DISAPPEARANCE
}
// Methods
function getDaysMissing()
function getPossibleCauses()
function getSearchEfforts()
}
class AdoptionEvent extends ColonyEvent {
Person adopter
string newName // if renamed
constructor() {
super.type = ColonyEventType.ADOPTION
}
// Methods
function getAdopterContact()
function wasKitten()
}
class MedicalProcedureEvent extends ColonyEvent {
MedicalProvider provider
string procedureType // "spay", "neuter", "vaccination", "dental", etc.
string procedureDetails
string outcome
constructor() {
super.type = ColonyEventType.MEDICAL_PROCEDURE
}
// Methods
function wasSuccessful()
function requiresFollowUp()
function getCost()
}
class VaccinationEvent extends MedicalProcedureEvent {
VaccinationType vaccineType
Date expirationDate
constructor() {
super.type = ColonyEventType.VACCINATION
}
// Methods
function isExpired(Date currentDate)
function getDaysUntilExpiration(Date currentDate)
}
class TNREvent extends MedicalProcedureEvent {
boolean isEarTipped
string earTippedSide // "left" or "right"
constructor() {
super.type = ColonyEventType.TNR
}
// Methods
function getRecoveryDetails()
}
class QuarantineEvent extends ColonyEvent {
string reason
Date startDate
Date endDate
string outcome
constructor() {
super.type = ColonyEventType.QUARANTINE
}
// Methods
function getDurationDays()
function isCompleted()
}
class IllnessEvent extends ColonyEvent {
string symptoms
string diagnosis
string treatmentPlan
constructor() {
super.type = ColonyEventType.ILLNESS
}
// Methods
function getSeverity()
function isResolved()
function wasContagious()
}
class TerritoryChangeEvent extends ColonyEvent {
Location previousMainLocation
Location newMainLocation
string reason
constructor() {
super.type = ColonyEventType.TERRITORY_CHANGE
}
// Methods
function wasForced()
function getAffectedCats()
}
class AccessLevelChangeEvent extends ColonyEvent {
AccessLevel previousAccess
AccessLevel newAccess
string reason
constructor() {
super.type = ColonyEventType.ACCESS_CHANGE
}
// Methods
function wasTemporary()
function getAuthorizingPerson()
}
class SocialBondEvent extends ColonyEvent {
List<Cat> catGroup
Relationship bondType
string groupName // e.g., "Diamond Dogs"
constructor() {
super.type = ColonyEventType.SOCIAL_BOND
}
// Methods
function getStability()
function getGroupSize()
}
class ConflictEvent extends ColonyEvent {
List<Cat> involvedCats
string severity // "mild", "moderate", "severe"
string resolution
constructor() {
super.type = ColonyEventType.CONFLICT
}
// Methods
function wasResolved()
function requiresSeparation()
function getResolutionStrategy()
}
class EquipmentEvent extends ColonyEvent {
Equipment equipment
// Methods
function getEquipmentType()
function getEquipmentLocation()
}
class EquipmentAddedEvent extends EquipmentEvent {
string purpose
constructor() {
super.type = ColonyEventType.EQUIPMENT_ADDED
}
// Methods
function getInitialSetupNotes()
}
class EquipmentMaintenanceEvent extends EquipmentEvent {
string maintenanceType // "cleaning", "repair", "replacement"
string details
constructor() {
super.type = ColonyEventType.EQUIPMENT_MAINTENANCE
}
// Methods
function getNextMaintenanceDate()
function wasScheduled()
}
class EquipmentFailureEvent extends EquipmentEvent {
string failureDescription
string impact
string resolutionPlan
constructor() {
super.type = ColonyEventType.EQUIPMENT_FAILURE
}
// Methods
function getDowntimeDuration()
function getCauseOfFailure()
}
class FeedingScheduleEvent extends ColonyEvent {
string previousSchedule
string newSchedule
string reason
constructor() {
super.type = ColonyEventType.FEEDING_SCHEDULE
}
// Methods
function getImpactOnFeeding()
function isTemporary()
}
class WeatherEventImpact extends ColonyEvent {
WeatherCondition weatherCondition
string impact
string mitigationEfforts
constructor() {
super.type = ColonyEventType.WEATHER_IMPACT
}
// Methods
function getDuration()
function getSeverity()
function getPreparationLevel()
}
class ThreatEvent extends ColonyEvent {
ThreatType threatType
string severityLevel
string responseActions
constructor() {
super.type = ColonyEventType.THREAT
}
// Methods
function wasAddressed()
function getPreventionMeasures()
function getImpactedAreas()
}
class NicknameAssignmentEvent extends ColonyEvent {
Cat cat
string nickname
constructor() {
super.type = ColonyEventType.NICKNAME_ASSIGNMENT
}
// Methods
function replacedPreviousNickname()
function getOriginOfNickname()
}
class ColonyStatusChangeEvent extends ColonyEvent {
string previousStatus // "active", "inactive", "relocated"
string newStatus
string reason
constructor() {
super.type = ColonyEventType.COLONY_STATUS_CHANGE
}
// Methods
function getImpactOnCats()
function getAuthorizingPerson()
}
class ResourceManagementEvent extends ColonyEvent {
string resourceType
// Methods
function getCategory()
function getImpactOnColony()
}
class ResourceDeliveryEvent extends ResourceManagementEvent {
int quantity
string supplier
Map<string, string> details
constructor() {
super.type = ColonyEventType.RESOURCE_DELIVERY
}
// Methods
function getCost()
function getExpectedDuration()
}
class ResourceDepletionEvent extends ResourceManagementEvent {
string impact
boolean isEmergency
constructor() {
super.type = ColonyEventType.RESOURCE_DEPLETION
}
// Methods
function getResolutionPlan()
function getTimeToDepletion()
}
class InventoryCheckEvent extends ColonyEvent {
Map<string, int> inventoryLevels
List<string> neededItems
constructor() {
super.type = ColonyEventType.INVENTORY_CHECK
}
// Methods
function getItemsToReorder()
function getConsumptionRate()
}
Related Components
- See the Domain Model Overview for more information on how this component fits into the overall domain model.