2023-11-20 18:58:30 +00:00
|
|
|
// // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
|
|
|
|
|
2023-11-15 19:00:08 +00:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2023-11-16 11:06:36 +00:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
2023-11-13 20:12:12 +00:00
|
|
|
using Wonderking.Game.Data.Character;
|
2023-11-14 20:25:28 +00:00
|
|
|
using Wonderking.Packets.Outgoing.Data;
|
2023-11-13 20:12:12 +00:00
|
|
|
|
2023-10-12 07:15:34 +00:00
|
|
|
namespace Server.DB.Documents;
|
2023-08-14 20:30:35 +00:00
|
|
|
|
2023-11-19 16:07:28 +00:00
|
|
|
[Index(nameof(Name), IsUnique = true)]
|
|
|
|
[Index(nameof(Id), IsUnique = true)]
|
2023-08-14 20:30:35 +00:00
|
|
|
public class Character
|
|
|
|
{
|
2023-11-15 19:00:08 +00:00
|
|
|
public virtual Account Account { get; set; }
|
|
|
|
|
|
|
|
[Key]
|
|
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
2023-08-14 20:30:35 +00:00
|
|
|
public Guid Id { get; set; }
|
2023-11-15 19:00:08 +00:00
|
|
|
|
2023-08-14 20:30:35 +00:00
|
|
|
public ushort MapId { get; set; }
|
2023-11-16 11:06:36 +00:00
|
|
|
|
|
|
|
[Column(TypeName = "varchar(20)")]
|
|
|
|
[MaxLength(20)]
|
2023-08-14 20:30:35 +00:00
|
|
|
public string Name { get; set; }
|
2023-11-16 11:06:36 +00:00
|
|
|
|
2023-08-14 21:05:53 +00:00
|
|
|
public short LastXCoordinate { get; set; }
|
|
|
|
public short LastYCoordinate { get; set; }
|
|
|
|
public PvPLevel PvPLevel { get; set; }
|
|
|
|
public Gender Gender { get; set; }
|
|
|
|
public long Experience { get; set; }
|
|
|
|
public byte Level { get; set; }
|
2023-11-15 19:00:08 +00:00
|
|
|
public virtual ICollection<InventoryItem> InventoryItems { get; set; }
|
2023-11-13 20:12:12 +00:00
|
|
|
|
|
|
|
public BaseStats BaseStats { get; set; }
|
|
|
|
|
|
|
|
public JobData JobData { get; set; }
|
|
|
|
public int Health { get; set; }
|
|
|
|
public int Mana { get; set; }
|
2023-11-15 19:00:08 +00:00
|
|
|
public virtual Guild Guild { get; set; }
|
2023-08-14 20:30:35 +00:00
|
|
|
}
|