namespace Monitoring.Core.Domain.FireDepartmentManagement;

/// <summary>
/// Department of Emergency Situations.
/// </summary>
public class FireDepartment
{
	/// <summary>
	/// Identifier.
	/// </summary>
	public FireDepartmentId Id { get; } = null!;

	/// <summary>
	/// Name.
	/// </summary>
	public FireDepartmentName Name { get; } = null!;

	/// <summary>
	/// Full address.
	/// </summary>
	public FireDepartmentAddress Address { get; } = null!;

	/// <summary>
	/// Creates instance of <see cref="FireDepartment"/>.
	/// </summary>
	/// <param name="name">Name.</param>
	/// <param name="address">Address.</param>
	/// <returns>Instance of <see cref="FireDepartment"/>.</returns>
	public static FireDepartment Create(
		FireDepartmentName name,
		FireDepartmentAddress address
	)
	{
		return new(
			new FireDepartmentId(Guid.CreateVersion7()),
			name,
			address);
	}

	private FireDepartment(FireDepartmentId id, FireDepartmentName name, FireDepartmentAddress address)
	{
		this.Id = id;
		this.Name = name;
		this.Address = address;
	}

	/// <summary>
	/// Constructor for EF.
	/// </summary>
	protected FireDepartment() { }
}
