29 lines
756 B
C#
29 lines
756 B
C#
using System.Collections.Generic;
|
|
|
|
namespace Kit.Helpers.Extension.Entities
|
|
{
|
|
public interface IIdTitleParent<TEntity>
|
|
{
|
|
string Title { get; set; }
|
|
TEntity Parent { get; set; }
|
|
int? ParentId { get; set; }
|
|
|
|
int Level { get; set; }
|
|
bool IsFirst { get; set; }
|
|
bool IsLast { get; set; }
|
|
|
|
IEnumerable<TEntity> Childs { get; set; }
|
|
}
|
|
|
|
public class IdTitleParent<TEntity> : IdTitle, IIdTitleParent<TEntity>
|
|
{
|
|
public int? ParentId { get; set; }
|
|
public TEntity Parent { get; set; }
|
|
public int Level { get; set; }
|
|
public bool IsFirst { get; set; }
|
|
public bool IsLast { get; set; }
|
|
|
|
public IEnumerable<TEntity> Childs { get; set; }
|
|
}
|
|
}
|