Add persistence entities for lodestone

This commit is contained in:
Daniel_I_Am 2020-06-04 20:32:14 +02:00
parent 6d25611c4e
commit 33d5668bcc
No known key found for this signature in database
GPG Key ID: 80C428FCC9743E84
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,29 @@
using ChaosBot.Attribute;
using ChaosBot.Lodestone;
namespace ChaosBot.Database.Entity
{
[DBEntity("LodestoneCharacter")]
public class LodestoneCharacter
{
[DBUnique]
[DBPrimaryKey]
public int id { get; }
public string name { get; }
public string avatar { get; }
public LodestoneCharacter(int id, string name, string avatar)
{
this.id = id;
this.name = name;
this.avatar = avatar;
}
public LodestoneCharacter(Character character)
{
this.id = (int)character.ID;
this.name = character.Name;
this.avatar = character.Avatar;
}
}
}

View File

@ -0,0 +1,18 @@
using ChaosBot.Attribute;
namespace ChaosBot.Database.Entity
{
[DBEntity("LodestoneFreeCompany")]
public class LodestoneFreeCompany
{
[DBUnique]
public string id { get; }
public string name { get; }
public LodestoneFreeCompany(string id, string name)
{
this.id = id;
this.name = name;
}
}
}