Skip to content

Commit 49e0e6c

Browse files
author
nikolajlauridsen
committed
Implement BeingDirtyBase on HistoryCleanup
1 parent 7e9def9 commit 49e0e6c

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed
Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
11
using System.Runtime.Serialization;
2+
using Umbraco.Cms.Core.Models.Entities;
23

34
namespace Umbraco.Cms.Core.Models.ContentEditing
45
{
56
[DataContract(Name = "historyCleanup", Namespace = "")]
6-
public class HistoryCleanup
7+
public class HistoryCleanup : BeingDirtyBase
78
{
9+
private bool _preventCleanup;
10+
private int? _keepAllVersionsNewerThanDays;
11+
private int? _keepLatestVersionPerDayForDays;
12+
813
[DataMember(Name = "preventCleanup")]
9-
public bool PreventCleanup { get; set; }
14+
public bool PreventCleanup
15+
{
16+
get => _preventCleanup;
17+
set => SetPropertyValueAndDetectChanges(value, ref _preventCleanup, nameof(PreventCleanup));
18+
}
1019

1120
[DataMember(Name = "keepAllVersionsNewerThanDays")]
12-
public int? KeepAllVersionsNewerThanDays { get; set; }
21+
public int? KeepAllVersionsNewerThanDays
22+
{
23+
get => _keepAllVersionsNewerThanDays;
24+
set => SetPropertyValueAndDetectChanges(value, ref _keepAllVersionsNewerThanDays, nameof(KeepAllVersionsNewerThanDays));
25+
}
1326

1427
[DataMember(Name = "keepLatestVersionPerDayForDays")]
15-
public int? KeepLatestVersionPerDayForDays { get; set; }
28+
public int? KeepLatestVersionPerDayForDays
29+
{
30+
get => _keepLatestVersionPerDayForDays;
31+
set => SetPropertyValueAndDetectChanges(value, ref _keepLatestVersionPerDayForDays, nameof(KeepLatestVersionPerDayForDays));
32+
}
1633
}
1734
}

0 commit comments

Comments
 (0)