-
Notifications
You must be signed in to change notification settings - Fork 0
/
Todo.cs
50 lines (43 loc) · 1.19 KB
/
Todo.cs
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
using System;
using System.Text.Json.Serialization;
using Azure;
using Azure.Data.Tables;
namespace TodoApiAzureFunctions;
/// <summary>
/// Represents a Todo item
/// </summary>
public class Todo : ITableEntity
{
[JsonIgnore]
string ITableEntity.PartitionKey { get; set; } = "Http";
[JsonIgnore]
string ITableEntity.RowKey { get; set; }
[JsonIgnore]
ETag ITableEntity.ETag { get; set; }
[JsonIgnore]
DateTimeOffset? ITableEntity.Timestamp { get; set; }
/// <summary>
/// Id of the todo
/// </summary>
public string Id
{
get => ((ITableEntity) this).RowKey;
set => ((ITableEntity)this).RowKey = value;
}
/// <summary>
/// Position of the todo in the list
/// </summary>
public int? Order { get; set; }
/// <summary>
/// Title of the todo. Explains what the task is about.
/// </summary>
public string? Title { get; set; }
/// <summary>
/// Reference to the url that can be used to get the details of the item.
/// </summary>
public string? Url { get; set; }
/// <summary>
/// Indicates whether the task is complete or not.
/// </summary>
public bool Completed { get; set; }
}