forked from PhenX/PhenX.EntityFrameworkCore.BulkInsert
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestEntity.cs
More file actions
30 lines (22 loc) · 812 Bytes
/
TestEntity.cs
File metadata and controls
30 lines (22 loc) · 812 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
26
27
28
29
30
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace PhenX.EntityFrameworkCore.BulkInsert.Tests.DbContext;
[PrimaryKey(nameof(Id))]
[Index(nameof(Name), IsUnique = true)]
[Table("test_entity")]
public class TestEntity : TestEntityBase
{
public int Id { get; set; }
[Column("name")]
[MaxLength(100)]
public string Name { get; set; } = string.Empty;
[Column("some_price")]
public decimal Price { get; set; }
[Column("the_identifier")]
public Guid Identifier { get; set; }
[Column("string_enum_value", TypeName = "text")]
public StringEnum StringEnumValue { get; set; }
[Column("num_enum_value", TypeName = "text")]
public NumericEnum NumericEnumValue { get; set; }
}