File tree Expand file tree Collapse file tree
src/FleetClaim.Core/Models Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -305,9 +305,16 @@ public class PhotoAttachment
305305 public string ? Caption { get ; set ; }
306306
307307 /// <summary>
308- /// Photo category for organization
308+ /// Photo category for organization (stored as string for flexibility)
309309 /// </summary>
310- public PhotoCategory Category { get ; set ; } = PhotoCategory . General ;
310+ [ System . Text . Json . Serialization . JsonPropertyName ( "category" ) ]
311+ public string ? CategoryString { get ; set ; }
312+
313+ /// <summary>
314+ /// Parsed photo category (defaults to General if unknown)
315+ /// </summary>
316+ [ System . Text . Json . Serialization . JsonIgnore ]
317+ public PhotoCategory Category => Enum . TryParse < PhotoCategory > ( CategoryString , true , out var cat ) ? cat : PhotoCategory . General ;
311318
312319 /// <summary>
313320 /// When the photo was uploaded
You can’t perform that action at this time.
0 commit comments