From 1c2946500765850db29fa7d216f5e55e2e4de888 Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Fri, 7 Jul 2023 11:16:54 +0800 Subject: [PATCH] update --- .../src/WTA.Shared/Attributes/OneToOneAttribute.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/demo/src/WTA.Shared/Attributes/OneToOneAttribute.cs diff --git a/docs/demo/src/WTA.Shared/Attributes/OneToOneAttribute.cs b/docs/demo/src/WTA.Shared/Attributes/OneToOneAttribute.cs new file mode 100644 index 00000000..1c9a4bf5 --- /dev/null +++ b/docs/demo/src/WTA.Shared/Attributes/OneToOneAttribute.cs @@ -0,0 +1,14 @@ +namespace WTA.Shared.Attributes; + +[AttributeUsage(AttributeTargets.Property)] +public class OneToOneAttribute : Attribute, ITypeAttribute +{ + public Type Type { get; set; } = null!; + public string? Property { get; } + + public OneToOneAttribute(string? property = null) + { + this.Type = typeof(TEntity); + this.Property = property; + } +}