29 lines
1.1 KiB
C#
29 lines
1.1 KiB
C#
using W542.GandalfReborn.Data.Entities.Base;
|
|
using W542.GandalfReborn.Data.Entities.Security;
|
|
using W542.GandalfReborn.Data.Entities.Subject;
|
|
using W542.GandalfReborn.Data.Entities.Tenant;
|
|
using W542.GandalfReborn.Data.Entities.Version;
|
|
|
|
namespace W542.GandalfReborn.Data.Entities.App;
|
|
|
|
public class AppSubjectRelationEntity : AppSubjectRelationData<long>, IMappingEntity, IVersionableEntity
|
|
{
|
|
public HashSet<AuthorityEntity> InternalAuthorities { get; set; } = [];
|
|
public AppRelationEntity? App { get; set; }
|
|
public SubjectEntity? Subject { get; set; }
|
|
}
|
|
|
|
public class AppSubjectRelationVersionEntity : AppSubjectRelationData<long>, IVersionEntity<AppSubjectRelationEntity>
|
|
{
|
|
public SubjectEntity? Suspect { get; set; }
|
|
public long SuspectId { get; set; }
|
|
public VersionAction Action { get; set; }
|
|
public DateTimeOffset At { get; set; }
|
|
public AppSubjectRelationEntity? Reference { get; set; }
|
|
}
|
|
|
|
public abstract class AppSubjectRelationData<T> where T : IConvertible
|
|
{
|
|
public required T AppId { get; set; }
|
|
public required T SubjectId { get; set; }
|
|
} |