public static ProductEntity Create(string name, DateTime on, string user, CustomerEntity customer) { var entity = new ProductEntity() { Name = name, Description = name, Avatar = "https://cdn.iconscout.com/icon/free/png-256/avatar-375-456327.png", CreatedBy = user, ModifiedBy = user, CreatedOn = on, ModifiedOn = on, }; var anchorSLI = AnchorEntity.Factory.Create("sample", on, user, entity); entity.Anchors.Add(anchorSLI); entity.Validate(); entity.Customer = customer; customer.Products.Add(entity); return(entity); }
public static JourneyEntity Create(string name, DateTime on, string user, ProductEntity product) { var entity = new JourneyEntity() { Name = name, AvailabilitySlo = 0.99m, AvailabilitySla = 0.99m, ExperienceSlo = 0.99m, LatencySla = 1000m, LatencySlo = 1000m, Avatar = "https://cdn4.iconfinder.com/data/icons/pretty-office-part-7-reflection-style/256/Cup-gold.png", CreatedBy = user, ModifiedBy = user, CreatedOn = on, ModifiedOn = on, Product = product, Group = "Default" }; entity.Validate(); return(entity); }
public static IncidentEntity Create(string key, string title, DateTime on, string user, ProductEntity product) { var entity = new IncidentEntity() { CreatedBy = user, CreatedOn = on, Key = key, Title = title, ModifiedBy = user, ModifiedOn = on, Tags = "", Url = "https://landing.google.com/sre/books/", TTD = 10, TTE = 10, TTF = 10, End = on.AddMinutes(30), Product = product, Affected = 1 }; entity.Validate(); return(entity); }