19 lines
561 B
C#

#nullable enable
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace UserService.Infrastructure.DataModels
{
public abstract class Node : ICloneable
{
public int Id { get; set; }
[Required] public string CommonName { get; set; } = null!;
public string? Description { get; set; }
public override string ToString() => CommonName;
public int? ParentId { get; set; }
/// <inheritdoc />
public virtual object Clone() => MemberwiseClone();
}
}