55 lines
1.2 KiB
C#
55 lines
1.2 KiB
C#
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; }
|
|
}
|
|
|
|
|