This commit is contained in:
Marc Wieland
2025-09-26 08:51:10 +02:00
commit da8f1f8ba3
195 changed files with 8237 additions and 0 deletions

19
Models/Comment.cs Normal file
View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace api.Models
{
public class Comment
{
public int Id { get; set; }
public string Title { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public DateTime CreatedOn { get; set; }
public int? StockId { get; set; }
//Navigation property
public Stock? Stock { get; set; }
}
}

31
Models/Stock.cs Normal file
View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics.X86;
using System.Threading.Tasks;
using System.Xml;
namespace api.Models
{
public class Stock
{
public int Id { get; set; }
public string Symbol { get; set; } = string.Empty;
public string CompanyName { get; set; } = string.Empty;
[Column(TypeName = "decimal(18,2)")]
public decimal Purchase { get; set; }
[Column(TypeName = "decimal(18,2)")]
public decimal LastDiv { get; set; }
public string Industry { get; set; } = string.Empty;
public long MarketCap { get; set; }
public List<Comment> Comments { get; set; } = new List<Comment>();
}
}