Skip to content

Commit 9df1647

Browse files
committed
Added documentation to the Model project
1 parent 6032800 commit 9df1647

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

Model/Model.cs

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,58 @@
33

44
namespace Model
55
{
6+
/// <summary>
7+
/// A record that represents a cryptocurrency portfolio
8+
/// </summary>
9+
/// <param name="Name">
10+
/// Name of the portfolio
11+
/// </param>
12+
/// <param name="Currency">
13+
/// Currency in which trades are made in the portfolio
14+
/// </param>
15+
/// <param name="Id">
16+
/// ID of the portfolio (defaults to -1)
17+
/// </param>
618
public record Portfolio(string Name, string Description, Currency Currency, int Id = -1);
719

20+
/// <summary>
21+
/// A record that represents an entry of a portfolio
22+
/// </summary>
23+
/// <param name="Symbol">
24+
/// A symbol of the cryptocurrency to be traded in within the entry
25+
/// </param>
26+
/// <param name="PortfolioId">
27+
/// ID of the portfolio this entry belongs to
28+
/// </param>
29+
/// <param name="Id">
30+
/// ID of the portfolio (defaults to -1)
31+
/// </param>
832
public record PortfolioEntry(string Symbol, int PortfolioId = -1, int Id = -1);
933

34+
/// <summary>
35+
/// A record that represents a market order
36+
/// </summary>
37+
/// <param name="FilledPrice">
38+
/// Price of the asset the moment itwas traded
39+
/// </param>
40+
/// <param name="Fee">
41+
/// A fee for the trade made
42+
/// </param>
43+
/// <param name="Size">
44+
/// Order size
45+
/// </param>
46+
/// <param name="Date">
47+
/// Date when the trade was made
48+
/// </param>
49+
/// <param name="Buy">
50+
/// A flag indicating whether the trade was a buy or a sell
51+
/// </param>
52+
/// <param name="Id">
53+
/// ID of the order
54+
/// </param>
55+
/// <param name="PortfolioEntryId">
56+
/// ID of the portfolio entry this trade belongs to
57+
/// </param>
1058
public record MarketOrder(decimal FilledPrice, decimal Fee, decimal Size,
1159
DateTime Date, bool Buy, int Id = -1, int PortfolioEntryId = -1)
1260
{
@@ -21,11 +69,13 @@ public virtual bool Equals(MarketOrder? other)
2169
}
2270
}
2371

72+
/// <summary>
73+
/// An enumerable representing currencies
74+
/// </summary>
2475
public enum Currency : int
2576
{
2677
Czk = 203,
2778
Eur = 978,
2879
Usd = 849
2980
}
30-
3181
}

0 commit comments

Comments
 (0)