33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
namespace LocationsApi.Models;
|
|
|
|
public class UnitInstance
|
|
{
|
|
[BsonId]
|
|
[BsonRepresentation(BsonType.ObjectId)]
|
|
public string Id { get; set; } = "";
|
|
|
|
public string Username { get; set; } = "";
|
|
public string UnitType { get; set; } = "Archer";
|
|
public int Q { get; set; }
|
|
public int R { get; set; }
|
|
public string Status { get; set; } = "Idle";
|
|
public int MovementPerTick { get; set; } = 1;
|
|
public int MovementRemaining { get; set; } = 1;
|
|
public DateTime LastMovementRefillAtUtc { get; set; } = DateTime.UtcNow;
|
|
public int? DestinationQ { get; set; }
|
|
public int? DestinationR { get; set; }
|
|
public bool ClaimOnArrival { get; set; }
|
|
public int? WorksiteQ { get; set; }
|
|
public int? WorksiteR { get; set; }
|
|
public string? CarryingResourceType { get; set; }
|
|
public int CarryingResourceAmount { get; set; }
|
|
public DateTime? MovementStartedAtUtc { get; set; }
|
|
public DateTime? MovementCompletesAtUtc { get; set; }
|
|
public string? SourceTrainingId { get; set; }
|
|
public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
|
|
public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow;
|
|
}
|