namespace Journal.Core.Models; public class Fragment { public Guid Id { get; } public string Type { get; set; } public string Description { get; set; } public DateTimeOffset Time { get; set; } public List Tags { get; set; } = []; public Fragment(string type, string description) { if (string.IsNullOrWhiteSpace(type)) throw new ArgumentException("Type is required", nameof(type)); if (string.IsNullOrWhiteSpace(description)) throw new ArgumentException("Description is required", nameof(description)); Id = Guid.NewGuid(); Type = type.Trim(); Description = description.Trim(); Time = DateTimeOffset.Now; } }