refactor: Ersetzte 'usrId' durch 'userId'.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public record ProfileControlsTFCreateDto(int Id,
|
public record ProfileControlsTFCreateDto(int Id,
|
||||||
int ProfileId,
|
int ProfileId,
|
||||||
int UsrId,
|
int UserId,
|
||||||
long ObjId,
|
long ObjId,
|
||||||
string ObjType,
|
string ObjType,
|
||||||
string AttrName,
|
string AttrName,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace WorkFlow.Application.DTO.ProfileControlsTF
|
|||||||
{
|
{
|
||||||
public record ProfileControlsTFDto(int Id,
|
public record ProfileControlsTFDto(int Id,
|
||||||
int ProfileId,
|
int ProfileId,
|
||||||
int UsrId,
|
int UserId,
|
||||||
long ObjId,
|
long ObjId,
|
||||||
string ObjType,
|
string ObjType,
|
||||||
string AttrName,
|
string AttrName,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public record ProfileObjStateCreateDto(
|
public record ProfileObjStateCreateDto(
|
||||||
int ProfileId,
|
int ProfileId,
|
||||||
int UsrId,
|
int UserId,
|
||||||
long ObjId,
|
long ObjId,
|
||||||
int StateId,
|
int StateId,
|
||||||
string? State2 = null,
|
string? State2 = null,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace WorkFlow.Application.DTO.ProfileObjState
|
|||||||
{
|
{
|
||||||
public record ProfileObjStateDto(int Id,
|
public record ProfileObjStateDto(int Id,
|
||||||
int ProfileId,
|
int ProfileId,
|
||||||
int UsrId,
|
int UserId,
|
||||||
long ObjId,
|
long ObjId,
|
||||||
int StateId,
|
int StateId,
|
||||||
string AddedWho,
|
string AddedWho,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace WorkFlow.Domain.Entities
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("USR_ID")]
|
[Column("USR_ID")]
|
||||||
public required int UsrId { get; init; }
|
public required int UserId { get; init; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("OBJ_ID")]
|
[Column("OBJ_ID")]
|
||||||
@@ -62,7 +62,7 @@ namespace WorkFlow.Domain.Entities
|
|||||||
[ForeignKey("ProfileId")]
|
[ForeignKey("ProfileId")]
|
||||||
public Profile? Profile { get; init; } = default;
|
public Profile? Profile { get; init; } = default;
|
||||||
|
|
||||||
[ForeignKey("UsrId")]
|
[ForeignKey("UserId")]
|
||||||
public User? User { get; set; } = default;
|
public User? User { get; set; } = default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,7 @@ namespace WorkFlow.Domain.Entities
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("USR_ID")]
|
[Column("USR_ID")]
|
||||||
public required int UsrId { get; init; }
|
public required int UserId { get; init; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("OBJ_ID")]
|
[Column("OBJ_ID")]
|
||||||
@@ -48,7 +48,7 @@ namespace WorkFlow.Domain.Entities
|
|||||||
[ForeignKey("ProfileId")]
|
[ForeignKey("ProfileId")]
|
||||||
public Profile? Profile { get; init; } = null;
|
public Profile? Profile { get; init; } = null;
|
||||||
|
|
||||||
[ForeignKey("UsrId")]
|
[ForeignKey("UserId")]
|
||||||
public User? User { get; init; } = null;
|
public User? User { get; init; } = null;
|
||||||
|
|
||||||
[ForeignKey("StateId")]
|
[ForeignKey("StateId")]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace WorkFlow.Infrastructure.Contracts
|
|||||||
Task<IEnumerable<ProfileControlsTF>> ReadAsync(
|
Task<IEnumerable<ProfileControlsTF>> ReadAsync(
|
||||||
bool isReadonly = true,
|
bool isReadonly = true,
|
||||||
bool withProfile = true, bool withUser = false,
|
bool withProfile = true, bool withUser = false,
|
||||||
int? usrId = null, string? username = null,
|
int? userId = null, string? username = null,
|
||||||
int? profileId = null, int? objId = null, bool? profileActive = null);
|
int? profileId = null, int? objId = null, bool? profileActive = null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ namespace WorkFlow.Infrastructure.Contracts
|
|||||||
Task<IEnumerable<ProfileObjState>> ReadAsync(
|
Task<IEnumerable<ProfileObjState>> ReadAsync(
|
||||||
bool isReadonly = true,
|
bool isReadonly = true,
|
||||||
bool withProfile = true, bool withUser = true, bool withState = true,
|
bool withProfile = true, bool withUser = true, bool withState = true,
|
||||||
int? usrId = null, string? username = null,
|
int? userId = null, string? username = null,
|
||||||
int? profileId = null, int? objId = null, bool? profileActive = null);
|
int? profileId = null, int? objId = null, bool? profileActive = null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@ namespace WorkFlow.Infrastructure.Repositories
|
|||||||
{
|
{
|
||||||
protected override IQueryable<ProfileControlsTF> ReadOnly() => base.ReadOnly().Include(pctf => pctf.Profile).Include(pctf => pctf.User);
|
protected override IQueryable<ProfileControlsTF> ReadOnly() => base.ReadOnly().Include(pctf => pctf.Profile).Include(pctf => pctf.User);
|
||||||
|
|
||||||
protected IQueryable<ProfileControlsTF> Read(bool isReadonly = false, bool withProfile = true, bool withUser = true, int? profileId = null, int? usrId = null, string? username = null, int? objId = null, bool? profileActive = null)
|
protected IQueryable<ProfileControlsTF> Read(bool isReadonly = false, bool withProfile = true, bool withUser = true, int? profileId = null, int? userId = null, string? username = null, int? objId = null, bool? profileActive = null)
|
||||||
{
|
{
|
||||||
var query = isReadonly ? _dbSet.AsNoTracking() : _dbSet.AsQueryable();
|
var query = isReadonly ? _dbSet.AsNoTracking() : _dbSet.AsQueryable();
|
||||||
|
|
||||||
@@ -23,8 +23,8 @@ namespace WorkFlow.Infrastructure.Repositories
|
|||||||
if (profileId is not null)
|
if (profileId is not null)
|
||||||
query = query.Where(pctf => pctf.ProfileId == profileId);
|
query = query.Where(pctf => pctf.ProfileId == profileId);
|
||||||
|
|
||||||
if (usrId is not null)
|
if (userId is not null)
|
||||||
query = query.Where(pctf => pctf.UsrId == usrId);
|
query = query.Where(pctf => pctf.UserId == userId);
|
||||||
|
|
||||||
if (username is null)
|
if (username is null)
|
||||||
query = query.Where(pctf => pctf.User!.Username == username);
|
query = query.Where(pctf => pctf.User!.Username == username);
|
||||||
@@ -41,12 +41,12 @@ namespace WorkFlow.Infrastructure.Repositories
|
|||||||
public async Task<IEnumerable<ProfileControlsTF>> ReadAsync(
|
public async Task<IEnumerable<ProfileControlsTF>> ReadAsync(
|
||||||
bool isReadonly = true,
|
bool isReadonly = true,
|
||||||
bool withProfile = true, bool withUser = true,
|
bool withProfile = true, bool withUser = true,
|
||||||
int? usrId = null, string? username = null,
|
int? userId = null, string? username = null,
|
||||||
int? profileId = null, int? objId = null, bool? profileActive = null)
|
int? profileId = null, int? objId = null, bool? profileActive = null)
|
||||||
=> await Read(
|
=> await Read(
|
||||||
isReadonly: isReadonly,
|
isReadonly: isReadonly,
|
||||||
withProfile: withProfile, withUser: withUser,
|
withProfile: withProfile, withUser: withUser,
|
||||||
usrId: usrId, username: username,
|
userId: userId, username: username,
|
||||||
profileId: profileId, objId: objId, profileActive: profileActive)
|
profileId: profileId, objId: objId, profileActive: profileActive)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace WorkFlow.Infrastructure.Repositories
|
|||||||
{
|
{
|
||||||
protected override IQueryable<ProfileObjState> ReadOnly() => base.ReadOnly().Include(pos => pos.Profile).Include(pos => pos.State);
|
protected override IQueryable<ProfileObjState> ReadOnly() => base.ReadOnly().Include(pos => pos.Profile).Include(pos => pos.State);
|
||||||
|
|
||||||
protected IQueryable<ProfileObjState> Read(bool isReadonly = false, bool withProfile = true, bool withUser = true, bool withState = true, int? profileId = null, int? usrId = null, string? username = null, int? stateId = null, int? objId = null, bool? profileActive = null)
|
protected IQueryable<ProfileObjState> Read(bool isReadonly = false, bool withProfile = true, bool withUser = true, bool withState = true, int? profileId = null, int? userId = null, string? username = null, int? stateId = null, int? objId = null, bool? profileActive = null)
|
||||||
{
|
{
|
||||||
var query = isReadonly ? _dbSet.AsNoTracking() : _dbSet.AsQueryable();
|
var query = isReadonly ? _dbSet.AsNoTracking() : _dbSet.AsQueryable();
|
||||||
|
|
||||||
@@ -26,8 +26,8 @@ namespace WorkFlow.Infrastructure.Repositories
|
|||||||
if (profileId is not null)
|
if (profileId is not null)
|
||||||
query = query.Where(pctf => pctf.ProfileId == profileId);
|
query = query.Where(pctf => pctf.ProfileId == profileId);
|
||||||
|
|
||||||
if (usrId is not null)
|
if (userId is not null)
|
||||||
query = query.Where(pctf => pctf.UsrId == usrId);
|
query = query.Where(pctf => pctf.UserId == userId);
|
||||||
|
|
||||||
if (username is null)
|
if (username is null)
|
||||||
query = query.Where(pctf => pctf.User!.Username == username);
|
query = query.Where(pctf => pctf.User!.Username == username);
|
||||||
@@ -47,12 +47,12 @@ namespace WorkFlow.Infrastructure.Repositories
|
|||||||
public async Task<IEnumerable<ProfileObjState>> ReadAsync(
|
public async Task<IEnumerable<ProfileObjState>> ReadAsync(
|
||||||
bool isReadonly = true,
|
bool isReadonly = true,
|
||||||
bool withProfile = true, bool withUser = true, bool withState = true,
|
bool withProfile = true, bool withUser = true, bool withState = true,
|
||||||
int? usrId = null, string? username = null,
|
int? userId = null, string? username = null,
|
||||||
int? profileId = null, int? objId = null, bool? profileActive = null)
|
int? profileId = null, int? objId = null, bool? profileActive = null)
|
||||||
=> await Read(
|
=> await Read(
|
||||||
isReadonly: isReadonly,
|
isReadonly: isReadonly,
|
||||||
withProfile: withProfile, withUser: withUser, withState: withState,
|
withProfile: withProfile, withUser: withUser, withState: withState,
|
||||||
usrId: usrId, username: username,
|
userId: userId, username: username,
|
||||||
profileId: profileId, objId: objId, profileActive: profileActive)
|
profileId: profileId, objId: objId, profileActive: profileActive)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user