mirror of https://github.com/Squidex/squidex.git
7 changed files with 105 additions and 28 deletions
@ -0,0 +1,16 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschränkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using Squidex.Infrastructure.EventSourcing; |
|||
|
|||
namespace Squidex.Domain.Apps.Events.Apps |
|||
{ |
|||
[EventType(nameof(AppPlanReset))] |
|||
public sealed class AppPlanReset : AppEvent |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using Squidex.Domain.Apps.Events; |
|||
using Squidex.Domain.Apps.Events.Apps; |
|||
using Squidex.Infrastructure; |
|||
using Squidex.Infrastructure.EventSourcing; |
|||
using Squidex.Infrastructure.Reflection; |
|||
|
|||
namespace Migrate_01.OldEvents |
|||
{ |
|||
[TypeName("AppPlanChanged")] |
|||
public sealed class AppPlanChangedOld : AppEvent, IMigrated<IEvent> |
|||
{ |
|||
public string PlanId { get; set; } |
|||
|
|||
public IEvent Migrate() |
|||
{ |
|||
if (!string.IsNullOrWhiteSpace(PlanId)) |
|||
{ |
|||
return SimpleMapper.Map(this, new AppPlanChanged()); |
|||
} |
|||
else |
|||
{ |
|||
return SimpleMapper.Map(this, new AppPlanReset()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue