diff options
author | crupest <crupest@outlook.com> | 2022-12-21 11:51:25 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-12-21 11:51:25 +0800 |
commit | d37936cdea3e257388506dd055194a0b752263a3 (patch) | |
tree | 411350f425f767fe6a8b3d1f753c713ea2b0a0e6 /docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/TestEntity.cs | |
parent | 41ba5e625d22543a4531df749abc3e74da6aaef1 (diff) | |
download | crupest-d37936cdea3e257388506dd055194a0b752263a3.tar.gz crupest-d37936cdea3e257388506dd055194a0b752263a3.tar.bz2 crupest-d37936cdea3e257388506dd055194a0b752263a3.zip |
Develop secret api. v51
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.cs | 10 |
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"; } |