Repository navigation
Expand file tree
/
Copy pathCosmosDbReferenceDataModelBase.cs
More file actions
55 lines (48 loc) · 1.87 KB
/
Copy pathCosmosDbReferenceDataModelBase.cs
File metadata and controls
55 lines (48 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
namespace CoreEx.Cosmos;
/// <summary>
/// Provides a convenience base class for reference data models implementing the common <c>IReferenceData</c> properties (extends <see cref="CosmosDbModelBase"/>).
/// </summary>
/// <remarks>Usage is purely optional; there is no other specific requirement for its use.
/// <para>Does not implement <c>IReferenceData</c> by design, as it is not intended to support the base functionality.</para></remarks>
public class CosmosDbReferenceDataModelBase : CosmosDbModelBase
{
/// <summary>
/// Gets or sets the unique code.
/// </summary>
[JsonPropertyOrder(-899)]
public string Code { get; set; } = default!;
/// <summary>
/// Gets or sets the text.
/// </summary>
[JsonPropertyOrder(-898)]
public string? Text { get; set; }
/// <summary>
/// Gets or sets the description.
/// </summary>
[JsonPropertyOrder(-897)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Description { get; set; }
/// <summary>
/// Gets or sets the sort order.
/// </summary>
[JsonPropertyOrder(-896)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int SortOrder { get; set; }
/// <summary>
/// Indicates whether the reference data is active.
/// </summary>
[JsonPropertyOrder(-895)]
public bool IsActive { get; set; }
/// <summary>
/// Gets or sets the validity start <see cref="DateTimeOffset"/>.
/// </summary>
[JsonPropertyOrder(-894)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public DateTimeOffset? StartsOn { get; init; }
/// <summary>
/// Gets or sets the validity end <see cref="DateTimeOffset"/>.
/// </summary>
[JsonPropertyOrder(-893)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public DateTimeOffset? EndsOn { get; init; }
}