using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;

namespace LocationsApi.Models;

public class Location
{
    [BsonId]
    [BsonRepresentation(BsonType.ObjectId)]
    public string? Id { get; set; }

    [BsonElement("name")]
    public string Name { get; set; } = string.Empty;

    [BsonElement("coord")]
    public required Coord Coord { get; set; }

    [BsonElement("biomeKey")]
    public string BiomeKey { get; set; } = "plains";

    [BsonElement("elevation")]
    public int Elevation { get; set; }

    [BsonElement("resources")]
    public List<LocationResource> Resources { get; set; } = [];

    [BsonElement("locationObject")]
    public LocationObject? LocationObject { get; set; }

    [BsonElement("locationObjectResolved")]
    public bool LocationObjectResolved { get; set; }

    [BsonElement("createdUtc")]
    public DateTime CreatedUtc { get; set; } = DateTime.UtcNow;
}
