28 lines
868 B
C#
28 lines
868 B
C#
using W542.GandalfReborn.Data.Entities.App;
|
|
using W542.GandalfReborn.Data.Entities.Subject;
|
|
using W542.GandalfReborn.Data.Entities.Version;
|
|
|
|
namespace W542.GandalfReborn.Data.Entities.Tenant;
|
|
|
|
public class TenantEntity : TenantData, IVersionableEntity
|
|
{
|
|
public SubjectEntity? Owner { get; set; }
|
|
public HashSet<SubjectEntity> Subjects { get; set; } = [];
|
|
public HashSet<AppRelationEntity> Apps { get; set; } = [];
|
|
}
|
|
|
|
public interface IVersionableEntity;
|
|
|
|
public class TenantVersionEntity : TenantData, IVersionEntity<TenantEntity>
|
|
{
|
|
public SubjectEntity? Suspect { get; set; }
|
|
public long SuspectId { get; set; }
|
|
public VersionAction Action { get; set; }
|
|
public DateTimeOffset At { get; set; }
|
|
public TenantEntity? Reference { get; set; }
|
|
}
|
|
|
|
public abstract class TenantData : OwnerData
|
|
{
|
|
public required string Name { get; set; }
|
|
} |