초기커밋

This commit is contained in:
2025-05-01 07:20:41 +09:00
commit 98bb2e3c5c
2747 changed files with 646947 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
namespace UGQDatabase.Models;
public class AccountEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public string UserGuid { get; set; } = null!;
public string Nickname { get; set; } = null!;
public string? AccountId { get; set; }
// TODO: not null
public string? RefreshToken { get; set; }
public DateTime? RefreshTokenExpiryTime { get; set; }
public int AdditionalSlotCount { get; set; }
public int? SlotCountVersion { get; set; }
[BsonRepresentation(BsonType.String)]
public UgqGradeType GradeType { get; set; } = UgqGradeType.Amature;
public double CreatorPoint { get; set; } = 0;
public int? CreatorPointVersion { get; set; }
[BsonRequired]
public DateTime CreatedAt { get; set; }
[BsonRequired]
public DateTime UpdatedAt { get; set; }
}

View File

@@ -0,0 +1,35 @@
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
namespace UGQDatabase.Models;
public enum UGQAccountRole
{
None = 0,
Admin = 1,
Service = 2,
User = 3,
}
public class AdminAccountEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public string Username { get; set; } = null!;
public string Password { get; set; } = null!;
[BsonRepresentation(BsonType.String)]
public UGQAccountRole Role { get; set; }
public string RefreshToken { get; set; } = null!;
public DateTime RefreshTokenExpiryTime { get; set; }
[BsonRequired]
public DateTime CreatedAt { get; set; }
[BsonRequired]
public DateTime UpdatedAt { get; set; }
}

View File

@@ -0,0 +1,19 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace UGQDatabase.Models;
public class BookmarkEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public long QuestId { get; set; }
public string UserGuid { get; set; } = null!;
[BsonRequired]
public DateTime CreatedAt { get; set; }
}

View File

@@ -0,0 +1,40 @@
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
namespace UGQDatabase.Models;
public enum CreatorPointHistoryKind
{
None = 0,
QuestProfit = 1,
SettleUp = 2,
Admin = 3,
}
public class CreatorPointHistoryEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public string UserGuid { get; set; } = null!;
public long QuestId { get; set; }
public long Revision { get; set; }
[BsonRepresentation(BsonType.String)]
public CreatorPointHistoryKind Kind { get; set; }
public string DetailReason { get; set; } = null!;
public double Amount { get; set; }
public double TotalAmount { get; set; }
[BsonRequired]
public DateTime CreatedAt { get; set; }
}

View File

@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
namespace UGQDatabase.Models;
public class GameQuestDialogDataEntity
{
public string Id { get; set; } = null!;
public List<DialogSequenceEntity> Sequences { get; set; } = new();
}
public class GameQuestDataEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public long QuestId { get; set; }
public long Revision { get; set; }
public string UserGuid { get; set; } = null!;
public string Author { get; set; } = null!;
public int BeaconId { get; set; }
public string? UgcBeaconGuid { get; set; }
public string? UgcBeaconNickname { get; set; }
public TextEntity Title { get; set; } = new TextEntity();
public List<string> Langs { get; set; } = new List<string>();
public string TitleImagePath { get; set; } = string.Empty;
public string BannerImagePath { get; set; } = string.Empty;
public TextEntity Description { get; set; } = new TextEntity();
[BsonRepresentation(BsonType.String)]
public UgqGradeType GradeType { get; set; } = UgqGradeType.Amature;
[BsonRepresentation(BsonType.String)]
public QuestContentState State { get; set; }
public int Cost { get; set; }
public bool Shutdown { get; set; }
public List<TaskEntity> Tasks { get; set; } = new ();
public List<GameQuestDialogDataEntity> Dialogs { get; set; } = new();
public List<QuestMetaInfo> QuestScriptMetas { get; set; } = new(); //클라에게 바로 전달 해주기 위해 Tasks를 가공한 Meta 정보
public UgqGameQuestDataForClient UgqGameQuestDataForClient { get; set; } = new(); //클라에게 바로 전달해주기 위해 Dialogs 를 가공한 데이터
public string UgqGameQuestDataForClientString { get; set; } = string.Empty; //클라에게 바로 전달해주기 위해 Dialogs 를 가공한 데이터 문자열
[BsonRequired]
public DateTime UpdatedAt { get; set; }
[BsonRequired]
public DateTime CreatedAt { get; set; }
}

View File

@@ -0,0 +1,21 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace UGQDatabase.Models;
public class LikeEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public long QuestId { get; set; }
public string UserGuid { get; set; } = null!;
[BsonRequired]
public DateTime CreatedAt { get; set; }
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
namespace UGQDatabase.Models;
public class NpcNameEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public int NpcId { get; set; }
public TextEntity NpcName { get; set; } = new TextEntity();
}

View File

@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
namespace UGQDatabase.Models;
public enum UGQAbortReason
{
None = 0,
Player = 1,
RevisionUpdated = 2,
Shutdown = 3,
}
public class QuestAbortedEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public long QuestId { get; set; }
public long Revision { get; set; }
public string Author { get; set; } = null!;
public string UserGuid { get; set; } = null!;
[BsonRepresentation(BsonType.String)]
public UGQAbortReason Reason { get; set; } = UGQAbortReason.None;
[BsonRequired]
public DateTime CreatedAt { get; set; }
}

View File

@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
namespace UGQDatabase.Models;
public enum UGQAcceptReason
{
None = 0,
Player = 1,
RevisionUpdated = 2,
}
public class QuestAcceptedEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public long QuestId { get; set; }
public long Revision { get; set; }
public string Author { get; set; } = null!;
public string UserGuid { get; set; } = null!;
[BsonRepresentation(BsonType.String)]
public UGQAcceptReason Reason { get; set; } = UGQAcceptReason.None;
[BsonRequired]
public DateTime CreatedAt { get; set; }
}

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
namespace UGQDatabase.Models;
public class QuestCompletedEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public long QuestId { get; set; }
public long Revision { get; set; }
public string Author { get; set; } = null!;
public string UserGuid { get; set; } = null!;
[BsonRequired]
public DateTime CreatedAt { get; set; }
}

View File

@@ -0,0 +1,82 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace UGQDatabase.Models;
public enum QuestContentState
{
None = 0,
Uncomplate = 1,
Editable = 2,
Test = 3,
Standby = 4,
Live = 5,
Shutdown = 6,
}
public class TaskEntity
{
public TextEntity GoalText { get; set; } = new TextEntity();
public int ActionId { get; set; }
public int ActionValue { get; set; }
public bool IsShowNpcLocation { get; set; }
public string? UgcActionValueGuid { get; set; }
public string? UgcActionValueName { get; set; }
public string? DialogId { get; set; }
}
public class QuestContentEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public string UserGuid { get; set; } = null!;
public string Author { get; set; } = null!;
[BsonRepresentation(BsonType.String)]
public UgqGradeType GradeType { get; set; } = UgqGradeType.Amature;
public long QuestId { get; set; }
public long Revision { get; set; }
public int BeaconId { get; set; }
public string? UgcBeaconGuid { get; set; }
public string? UgcBeaconNickname { get; set; }
public TextEntity Title { get; set; } = new TextEntity();
public List<string>? Tags { get; set; }
public List<string> Langs { get; set; } = new List<string>();
public int UploadCounter { get; set; }
public string TitleImagePath { get; set; } = string.Empty;
public string BannerImagePath { get; set; } = string.Empty;
public TextEntity Description { get; set; } = new TextEntity();
[BsonRepresentation(BsonType.String)]
public QuestContentState State { get; set; }
public bool? ToNextRevision { get; set; } = false;
public int Cost { get; set; }
public string Savelanguage { get; set; } = string.Empty;
public List<TaskEntity> Tasks { get; set; } = new List<TaskEntity>();
public int? ContentVersion { get; set; }
[BsonRequired]
public DateTime CreatedAt { get; set; }
[BsonRequired]
public DateTime UpdatedAt { get; set; }
public bool IsDeleted { get; set; } = false;
public DateTime DeletedAt { get; set; } = DateTime.MinValue;
}

View File

@@ -0,0 +1,54 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace UGQDatabase.Models;
public class TextEntity
{
public string Kr { get; set; } = string.Empty;
public string En { get; set; } = string.Empty;
public string Jp { get; set; } = string.Empty;
}
public enum DialogTalker
{
Player = 0,
Npc = 1,
}
public class DialogSequenceActionEntity
{
[BsonRepresentation(BsonType.String)]
public DialogTalker Talker { get; set; }
public int Type { get; set; }
public TextEntity Talk { get; set; } = new TextEntity();
public int Condition { get; set; }
public int ConditionValue { get; set; }
public int NextSequence { get; set; }
public int NpcAction { get; set; }
}
public class DialogSequenceEntity
{
public int SequenceId { get; set; }
public List<DialogSequenceActionEntity> Actions { get; set; } = new();
}
public class QuestDialogEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public List<DialogSequenceEntity> Sequences { get; set; } = new();
[BsonRequired]
public DateTime CreatedAt { get; set; }
[BsonRequired]
public DateTime UpdatedAt { get; set; }
}

View File

@@ -0,0 +1,19 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace UGQDatabase.Models;
public class QuestIdSequenceEntity
{
public string Id { get; set; } = null!;
public long Sequence { get; set; }
[BsonRequired]
public DateTime CreatedAt { get; set; }
[BsonRequired]
public DateTime UpdatedAt { get; set; }
}

View File

@@ -0,0 +1,23 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace UGQDatabase.Models;
public class ReportEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public long QuestId { get; set; }
public long Revision { get; set; }
public string UserGuid { get; set; } = null!;
public string Contents { get; set; } = null!;
[BsonRequired]
public DateTime CreatedAt { get; set; }
}

View File

@@ -0,0 +1,31 @@
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UGQDatabase.Models;
public class ReserveAccountGradeEntity
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = null!;
public string UserGuid { get; set; } = null!;
[BsonRepresentation(BsonType.Int32)]
public UgqGradeType BeforeGradeType { get; set; } = UgqGradeType.Amature;
[BsonRepresentation(BsonType.Int32)]
public UgqGradeType ReserveGradeType { get; set; } = UgqGradeType.Amature;
[BsonRequired]
public DateTime ReserveTime { get; set; }
[BsonRequired]
public DateTime UpdatedAt { get; set; }
public bool IsCompleted { get; set; }
}