141 lines
3.9 KiB
C#
141 lines
3.9 KiB
C#
namespace AssetManager.Models.DTOs;
|
|
|
|
public class CreatePortfolioRequest
|
|
{
|
|
public string name { get; set; }
|
|
public string strategyId { get; set; }
|
|
public string currency { get; set; }
|
|
public List<StockItem> stocks { get; set; }
|
|
}
|
|
|
|
public class StockItem
|
|
{
|
|
public string name { get; set; }
|
|
public string code { get; set; }
|
|
public double price { get; set; }
|
|
public int amount { get; set; }
|
|
public string date { get; set; }
|
|
public string currency { get; set; }
|
|
}
|
|
|
|
public class CreatePortfolioResponse
|
|
{
|
|
public string id { get; set; }
|
|
public double totalValue { get; set; }
|
|
public double returnRate { get; set; }
|
|
public string currency { get; set; }
|
|
public string createdAt { get; set; }
|
|
}
|
|
|
|
public class PortfolioDetailResponse
|
|
{
|
|
public string id { get; set; }
|
|
public string name { get; set; }
|
|
public string currency { get; set; }
|
|
public StrategyInfo strategy { get; set; }
|
|
public double portfolioValue { get; set; }
|
|
public double totalReturn { get; set; }
|
|
public double todayProfit { get; set; }
|
|
public string todayProfitCurrency { get; set; }
|
|
public List<PositionItem> positions { get; set; }
|
|
}
|
|
|
|
public class StrategyInfo
|
|
{
|
|
public string id { get; set; }
|
|
public string name { get; set; }
|
|
public string description { get; set; }
|
|
}
|
|
|
|
public class PositionItem
|
|
{
|
|
public string id { get; set; }
|
|
public string stockCode { get; set; }
|
|
public string stockName { get; set; }
|
|
public int amount { get; set; }
|
|
public double averagePrice { get; set; }
|
|
public double currentPrice { get; set; }
|
|
public double totalValue { get; set; }
|
|
public double profit { get; set; }
|
|
public double profitRate { get; set; }
|
|
public string currency { get; set; }
|
|
}
|
|
|
|
public class TransactionItem
|
|
{
|
|
public string id { get; set; }
|
|
public string portfolioId { get; set; }
|
|
public string date { get; set; }
|
|
public string time { get; set; }
|
|
public string type { get; set; }
|
|
public string title { get; set; }
|
|
public double amount { get; set; }
|
|
public string currency { get; set; }
|
|
public string status { get; set; }
|
|
public string remark { get; set; }
|
|
}
|
|
|
|
public class GetTransactionsRequest
|
|
{
|
|
public string portfolioId { get; set; }
|
|
public int limit { get; set; }
|
|
public int offset { get; set; }
|
|
}
|
|
|
|
public class GetTransactionsResponse
|
|
{
|
|
public List<TransactionItem> items { get; set; }
|
|
public int total { get; set; }
|
|
public int page { get; set; }
|
|
public int pageSize { get; set; }
|
|
}
|
|
|
|
public class CreateTransactionRequest
|
|
{
|
|
public string portfolioId { get; set; }
|
|
public string type { get; set; }
|
|
public string stockCode { get; set; }
|
|
public int amount { get; set; }
|
|
public double price { get; set; }
|
|
public string currency { get; set; }
|
|
public string remark { get; set; }
|
|
}
|
|
|
|
public class CreateTransactionResponse
|
|
{
|
|
public string id { get; set; }
|
|
public double totalAmount { get; set; }
|
|
public string status { get; set; }
|
|
public string createdAt { get; set; }
|
|
}
|
|
|
|
public class PortfolioListItem
|
|
{
|
|
public string id { get; set; }
|
|
public string name { get; set; }
|
|
public string tags { get; set; }
|
|
public string status { get; set; }
|
|
public string statusType { get; set; }
|
|
public string iconChar { get; set; }
|
|
public string iconBgClass { get; set; }
|
|
public string iconTextClass { get; set; }
|
|
public double value { get; set; }
|
|
public string currency { get; set; }
|
|
public double returnRate { get; set; }
|
|
public string returnType { get; set; }
|
|
}
|
|
|
|
public class GetPortfoliosResponse
|
|
{
|
|
public List<PortfolioListItem> items { get; set; }
|
|
}
|
|
|
|
public class TotalAssetsResponse
|
|
{
|
|
public double totalValue { get; set; }
|
|
public string currency { get; set; }
|
|
public double todayProfit { get; set; }
|
|
public string todayProfitCurrency { get; set; }
|
|
public double totalReturnRate { get; set; }
|
|
}
|