aboutsummaryrefslogtreecommitdiff
path: root/docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/TestEntity.cs
diff options
context:
space:
mode:
Diffstat (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/TestEntity.cs')
-rw-r--r--docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/TestEntity.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/TestEntity.cs b/docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/TestEntity.cs
index ca84d5a..7cc19ed 100644
--- a/docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/TestEntity.cs
+++ b/docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/TestEntity.cs
@@ -2,7 +2,7 @@ namespace CrupestApi.Commons.Crud.Tests;
public class TestEntity
{
- [Column(NotNull = true)]
+ [Column(ActAsKey = true, NotNull = true)]
public string Name { get; set; } = default!;
[Column(NotNull = true)]
@@ -11,5 +11,13 @@ public class TestEntity
[Column]
public float? Height { get; set; }
+ [Column(Generated = true, NotNull = true, NoUpdate = true)]
+ public string Secret { get; set; } = default!;
+
+ public static string SecretDefaultValueGenerator()
+ {
+ return "secret";
+ }
+
public string NonColumn { get; set; } = "Not A Column";
}