refactored for use with EFcore

This commit is contained in:
marco committed 2026-08-30 20:11:41 +02:00
1 parent 6211006526
commit ea0bc444d2
1 file changed
+6 -3
+6 -3
View File
@@ -1,12 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace api.Domain; namespace api.Domain;
public sealed class Person 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) private Person(string username, string realName, DateOnly birthday)
{ {