using Robust.Shared.Serialization;
using Content.Shared.Cargo.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Cargo;
///
/// A data structure for storing currently available bounties.
///
[DataDefinition, NetSerializable, Serializable]
public readonly partial record struct CargoBountyData(int Id, string Bounty, TimeSpan EndTime)
{
///
/// A numeric id used to identify the bounty
///
[DataField("id"), ViewVariables(VVAccess.ReadWrite)]
public int Id { get; init; } = Id;
///
/// The prototype containing information about the bounty.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("bounty", customTypeSerializer: typeof(PrototypeIdSerializer), required:true)]
public string Bounty { get; init; } = Bounty;
///
/// The time at which the bounty is closed and no longer is available.
///
[DataField("endTime", customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan EndTime { get; init; } = EndTime;
public CargoBountyData() : this(default, string.Empty, default)
{
}
}