using System.Text.Json.Serialization;
namespace DeepDrftModels.Enums;
///
/// Completion bucket for a recorded play (Phase 16 §1a / D1). The three buckets are exhaustive and
/// non-overlapping, classified by the high-water playback fraction reached before the session closed:
/// Partial [0, 30%), Sampled [30%, 80%], Complete (80%, 100%]. The headline
/// "Plays" figure is the sum of all three — every started listen that crosses the engagement floor
/// is a play; the buckets are the texture beneath it.
///
/// Serialized as its string name on the wire — the converter on the type makes the
/// client to proxy to API JSON contract string-based regardless of host serializer config.
///
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum PlayBucket
{
/// Reached < 30% of duration — a skip or a brief partial listen (still past the floor).
Partial,
/// Reached 30%–80% of duration — a real listen that was neither a skip nor a finish.
Sampled,
/// Reached > 80% of duration — effectively a finished listen.
Complete
}