refactored for use with EFcore
This commit is contained in:
1 parent
6211006526
commit
ea0bc444d2
1 file changed
+6
-3
@@ -1,12 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace api.Domain;
|
||||
|
||||
public sealed class Person
|
||||
{
|
||||
public string Username { get; }
|
||||
[Key]
|
||||
public string Username { get; private set; }
|
||||
|
||||
public string RealName { get; }
|
||||
public string RealName { get; private set; }
|
||||
|
||||
public DateOnly Birthday { get; }
|
||||
public DateOnly Birthday { get; private set; }
|
||||
|
||||
private Person(string username, string realName, DateOnly birthday)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user