-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathEntityTableData.cs
More file actions
25 lines (21 loc) · 939 Bytes
/
EntityTableData.cs
File metadata and controls
25 lines (21 loc) · 939 Bytes
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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace CommunityToolkit.Datasync.Server.EntityFrameworkCore;
/// <summary>
/// A version of the <see cref="BaseEntityTableData"/> that is compatible with
/// most of the Entity Framework Core drivers.
/// </summary>
[Index(nameof(UpdatedAt), nameof(Deleted))]
public class EntityTableData : BaseEntityTableData
{
/// <inheritdoc />
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public override DateTimeOffset? UpdatedAt { get; set; } = DateTimeOffset.UnixEpoch;
/// <inheritdoc />
[Timestamp]
public override byte[] Version { get; set; } = Array.Empty<byte>();
}