using System; using System.Collections.Generic; namespace Code.Calendar.DataStructures { public struct Plant : IEquatable { public string Name; public string IconPath; public Guid Id; public bool Equals(Plant other) => Id == other.Id; public override bool Equals(object obj) => obj is Plant other && Equals(other); public override int GetHashCode() => Id.GetHashCode(); } public struct Task : IEquatable { public Guid Id; public bool Active; public string Description; public DateTime Date; // Если периодичная, то дата первого мероприятия public bool IsPeriodic; public int PeriodicInterval; public DateTime PeriodicUntil; public Guid PlantId; public List PhotoPaths; public bool Equals(Task other) => Id == other.Id; public override bool Equals(object obj) => obj is Task other && Equals(other); public override int GetHashCode() => Id.GetHashCode(); } }