๐Ÿ“ฆ sleepyfran / duets

๐Ÿ“„ Bank.Types.fs ยท 20 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20namespace Duets.Entities

[<AutoOpen>]
module BankTypes =
    /// Holder of an account in the in-game bank.
    type BankAccountHolder =
        | Character of CharacterId
        | Band of BandId

    /// Represents a transaction between two accounts in the game.
    type BankTransaction =
        | Incoming of amount: Amount * updatedBalance: Amount
        | Outgoing of amount: Amount * updatedBalance: Amount

    /// Represents a bank account in the game. We only keep track of accounts
    /// from the main character and its bands.
    type BankAccount =
        { Holder: BankAccountHolder
          Balance: Amount }