Added mongodb as database
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using Prospect.Server.Api.Services.Database.Generator;
|
||||
|
||||
namespace Prospect.Server.Api.Services.Database.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// title_player_account
|
||||
/// </summary>
|
||||
public class PlayFabEntity
|
||||
{
|
||||
[BsonId(IdGenerator = typeof(PlayFabIdGenerator))]
|
||||
public string Id { get; set; }
|
||||
|
||||
[BsonRequired]
|
||||
[BsonElement("UserId")]
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using Prospect.Server.Api.Services.Database.Generator;
|
||||
|
||||
namespace Prospect.Server.Api.Services.Database.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// master_player_account
|
||||
/// </summary>
|
||||
public class PlayFabUser
|
||||
{
|
||||
[BsonId(IdGenerator = typeof(PlayFabIdGenerator))]
|
||||
public string Id { get; set; }
|
||||
|
||||
[BsonRequired]
|
||||
[BsonElement("DisplayName")]
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
[BsonRequired]
|
||||
[BsonElement("Auth")]
|
||||
public List<PlayFabUserAuth> Auth { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace Prospect.Server.Api.Services.Database.Models
|
||||
{
|
||||
public class PlayFabUserAuth
|
||||
{
|
||||
[BsonElement("Type")]
|
||||
public PlayFabUserAuthType Type { get; set; }
|
||||
|
||||
[BsonElement("Key")]
|
||||
public string Key { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Prospect.Server.Api.Services.Database.Models
|
||||
{
|
||||
public enum PlayFabUserAuthType
|
||||
{
|
||||
Epic,
|
||||
Steam
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user