Created
February 26, 2022 21:24
-
-
Save mohamed-gara/7b917de09b9d7e11d7614d2c569830b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomerAllocatedCapacity( | |
val id: CustomerAllocatedCapacityId, | |
val allocationStartInstant: Instant, | |
val allocationEndInstant: Instant, | |
val quantity: EnergyQuantity | |
) { | |
val allocationPeriod | |
get () = DateRange(allocationStartInstant, allocationEndInstant) | |
fun asQuantityOverDateRange() = QuantityOverDateRange(allocationPeriod, quantity.inKwhj25(), id) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment