mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2026-02-08 16:54:23 +00:00
added Data, Models, EntityFramework
This commit is contained in:
13
Models/Feed.cs
Normal file
13
Models/Feed.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace LiveGameFeed.Models
|
||||
{
|
||||
public class Feed : IEntityBase
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Description { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public int MatchId { get; set; }
|
||||
public Match Match { get; set; }
|
||||
}
|
||||
}
|
||||
12
Models/IEntityBase.cs
Normal file
12
Models/IEntityBase.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiveGameFeed.Models
|
||||
{
|
||||
public interface IEntityBase
|
||||
{
|
||||
int Id { get; set; }
|
||||
}
|
||||
}
|
||||
22
Models/Match.cs
Normal file
22
Models/Match.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace LiveGameFeed.Models
|
||||
{
|
||||
public class Match : IEntityBase
|
||||
{
|
||||
public Match()
|
||||
{
|
||||
Feeds = new List<Feed>();
|
||||
}
|
||||
public int Id { get; set; }
|
||||
public string Host { get; set; }
|
||||
public string Guest { get; set; }
|
||||
public int HostScore { get; set; }
|
||||
public int GuestScore { get; set; }
|
||||
public DateTime MatchDate { get; set; }
|
||||
public string League { get; set; }
|
||||
|
||||
public ICollection<Feed> Feeds { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user