DTOs for index mostly done, doing DB models
This commit is contained in:
12
SVSim.Database/Models/ClassEntry.cs
Normal file
12
SVSim.Database/Models/ClassEntry.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using DCGEngine.Database.Models;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
public class ClassEntry : BaseEntity<int>
|
||||
{
|
||||
/// <summary>
|
||||
/// The name of the class.
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
10
SVSim.Database/Models/CollectionInfo.cs
Normal file
10
SVSim.Database/Models/CollectionInfo.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
[Owned]
|
||||
public class CollectionInfo
|
||||
{
|
||||
public int CraftCost { get; set; }
|
||||
public int DustReward { get; set; }
|
||||
}
|
||||
8
SVSim.Database/Models/DegreeEntry.cs
Normal file
8
SVSim.Database/Models/DegreeEntry.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using DCGEngine.Database.Models;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
public class DegreeEntry : BaseEntity<int>
|
||||
{
|
||||
|
||||
}
|
||||
8
SVSim.Database/Models/EmblemEntry.cs
Normal file
8
SVSim.Database/Models/EmblemEntry.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using DCGEngine.Database.Models;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
public class EmblemEntry : BaseEntity<long>
|
||||
{
|
||||
|
||||
}
|
||||
8
SVSim.Database/Models/FormatEntry.cs
Normal file
8
SVSim.Database/Models/FormatEntry.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using DCGEngine.Database.Models;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
public class FormatEntry : BaseEntity<int>
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -1,12 +1,37 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using DCGEngine.Database.Models;
|
||||
using SVSim.Database.Enums;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
public class ShadowverseCardEntry : CardEntry
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public override long Id { get; set; }
|
||||
/// <summary>
|
||||
/// The rarity of this card.
|
||||
/// </summary>
|
||||
public Rarity Rarity { get; set; }
|
||||
|
||||
#region Owned
|
||||
|
||||
/// <summary>
|
||||
/// Info about this card in the collection, if it can be collected.
|
||||
/// </summary>
|
||||
public CollectionInfo? CollectionInfo { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Navigation Properties
|
||||
|
||||
/// <summary>
|
||||
/// The class this card belongs to, or optionally none for neutral cards.
|
||||
/// </summary>
|
||||
public ClassEntry? Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The set this card belongs to.
|
||||
/// </summary>
|
||||
public CardSetEntry CardSet { get; set; } = new ShadowverseCardSetEntry();
|
||||
|
||||
#endregion
|
||||
}
|
||||
8
SVSim.Database/Models/ShadowverseCardSetEntry.cs
Normal file
8
SVSim.Database/Models/ShadowverseCardSetEntry.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using DCGEngine.Database.Models;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
public class ShadowverseCardSetEntry : CardSetEntry
|
||||
{
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using DCGEngine.Database.Models;
|
||||
using SVSim.Database.Enums;
|
||||
|
||||
@@ -8,6 +9,9 @@ namespace SVSim.Database.Models;
|
||||
/// </summary>
|
||||
public class SocialAccountConnection : BaseEntity<Guid>
|
||||
{
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public override Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of the social account.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using DCGEngine.Database.Models;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
@@ -7,6 +8,9 @@ namespace SVSim.Database.Models;
|
||||
/// </summary>
|
||||
public class Viewer : BaseEntity<ulong>
|
||||
{
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public override ulong Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This user's name displayed in game.
|
||||
/// </summary>
|
||||
@@ -16,6 +20,18 @@ public class Viewer : BaseEntity<ulong>
|
||||
/// This user's short identifier.
|
||||
/// </summary>
|
||||
public ulong ShortUdid { get; set; }
|
||||
|
||||
public DateTime LastLogin { get; set; }
|
||||
|
||||
#region Owned
|
||||
|
||||
public ViewerInfo Info { get; set; } = new ViewerInfo();
|
||||
|
||||
public ViewerMissionData MissionData { get; set; } = new ViewerMissionData();
|
||||
|
||||
public ViewerCurrency Currency { get; set; } = new ViewerCurrency();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Navigation Properties
|
||||
|
||||
|
||||
18
SVSim.Database/Models/ViewerCurrency.cs
Normal file
18
SVSim.Database/Models/ViewerCurrency.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
[Owned]
|
||||
public class ViewerCurrency
|
||||
{
|
||||
public ulong Crystals { get; set; }
|
||||
public ulong AndroidCrystals { get; set; }
|
||||
public ulong IosCrystals { get; set; }
|
||||
public ulong SteamCrystals { get; set; }
|
||||
public ulong DmmCrystals { get; set; }
|
||||
public ulong FreeCrystals { get; set; }
|
||||
public ulong TotalCrystals { get; set; }
|
||||
public ulong LifeTotalCrystals { get; set; }
|
||||
public ulong RedEther { get; set; }
|
||||
public ulong Rupees { get; set; }
|
||||
}
|
||||
21
SVSim.Database/Models/ViewerInfo.cs
Normal file
21
SVSim.Database/Models/ViewerInfo.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
[Owned]
|
||||
public class ViewerInfo
|
||||
{
|
||||
public DateTime BirthDate { get; set; }
|
||||
public string CountryCode { get; set; } = string.Empty;
|
||||
public int MaxFriends { get; set; }
|
||||
public bool IsOfficial { get; set; }
|
||||
public bool IsOfficialMarkDisplayed { get; set; }
|
||||
|
||||
#region Navigation Properties
|
||||
|
||||
public EmblemEntry SelectedEmblem { get; set; } = new EmblemEntry();
|
||||
|
||||
public DegreeEntry SelectedDegree { get; set; } = new DegreeEntry();
|
||||
|
||||
#endregion
|
||||
}
|
||||
12
SVSim.Database/Models/ViewerMissionData.cs
Normal file
12
SVSim.Database/Models/ViewerMissionData.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
[Owned]
|
||||
public class ViewerMissionData
|
||||
{
|
||||
public bool HasReceivedPickTwoMission { get; set; }
|
||||
public int MissionReceiveType { get; set; }
|
||||
public DateTime MissionChangeTime { get; set; }
|
||||
public int TutorialState { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user