Skip to main content

Equipment Specialized

Entities Definition

This file defines the equipment specialized structure within the Roll Claw domain model.

Implementation

Equipment Specialized Definition

File: domain/entities/equipment_specialized.pseudo

// Specialized Equipment Entities

class WaterSource extends Equipment {
// Properties
float capacityInLiters
boolean isAutomated
Date lastRefilled
string waterType // "tap", "filtered", etc.

// Constructor
constructor(string name, Location location) {
super(name, "water source", location)
}

// Methods
function checkWaterLevel()
function refill(Date date)
function requiresDailyCheck()
}

class FoodSource extends Equipment {
// Nested Enums
enum FoodType { WET, DRY, MIXED }
enum FeedingMode { MANUAL, AUTOMATIC, SCHEDULED }

// Properties
FoodType foodType
FeedingMode feedingMode
Date lastFilled
float capacityCups
float currentLevelCups
List<Time> scheduledFeedingTimes

// Constructor
constructor(string name, Location location, FeedingMode mode) {
super(name, mode == FeedingMode.AUTOMATIC ? "auto-feeder" : "food bowl", location)
this.feedingMode = mode
}

// Methods
function checkFoodLevel()
function fill(FoodType foodType, float amountCups, Date date)
function estimateRemainingDays()
function isScheduled() { return this.feedingMode == FeedingMode.SCHEDULED }
function getNextScheduledFeeding()
}

class LitterBox extends Equipment {
// Nested Enums
enum LitterType { CLAY, CLUMPING, CRYSTAL, PINE, PAPER, OTHER }
enum CleaningMode { MANUAL, AUTOMATED }
enum BoxType { TRADITIONAL, COVERED, ROBOT, DISPOSABLE }

// Properties
LitterType litterType
CleaningMode cleaningMode
BoxType boxType
Date lastCleaned
Date lastDeepCleaned
Date lastLitterChanged
float capacityLiters
boolean needsBags
string modelName // for Litter Robots
string nickname
int cleaningCycleMinutes // for automated litter boxes

// Constructor
constructor(string name, Location location, CleaningMode mode, BoxType type) {
super(name, mode == CleaningMode.AUTOMATED ? "automated litter box" : "litter box", location)
this.cleaningMode = mode
this.boxType = type
}

// Methods
function scoop(Date date)
function emptyWasteDrawer(Date date)
function changeLitter(LitterType newLitterType, Date date)
function deepClean(Date date)
function needsEmptying()
function daysSinceLastDeepClean()
function isRobot() { return this.boxType == BoxType.ROBOT }
function checkBagSupply()
}
  • See the Domain Model Overview for more information on how this component fits into the overall domain model.