BeamFi has 3 major models (opens in a new tab):
BeamOutType is used for creating unique Beam Link URLs which the creator can share with others to receive money.
See the feature at https://beamfi.app/getpaid (opens in a new tab).
BeamType represents a streaming payment created by buyers when they deposit payment to BeamFi to stream to creators as set in BeamOutType.
It stores the streaming-related data e.g. start date, end date, beam rate and status. However, it has no information about the actual payment token type.
EscrowType is where the actual payment token is deposited to. It contains BeamEscrowContract which stores the token type, amount, buyer and recipient's principal address, the token allocation for each party and how much tokens have been claimed. It has no information and control about the streaming data.
It also carries the important responsibility of taking ownership of the payment token and distributing it to the right parties through the BeamEscrow service.
escrow folder, there are also token-specific models for ICP, XTC and even BTC for future extension.
Each model type is usually accompanied by a store helper for persistence.