Init
This commit is contained in:
19
Models/Comment.cs
Normal file
19
Models/Comment.cs
Normal 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
31
Models/Stock.cs
Normal 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>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user