-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
71 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
using YuckQi.Domain.ValueObjects.Abstract; | ||
using System; | ||
using YuckQi.Domain.ValueObjects.Abstract; | ||
|
||
namespace YuckQi.Domain.Services.Models | ||
{ | ||
public class TypeSearchCriteria : IPage | ||
{ | ||
public string Name { get; set; } | ||
public int PageNumber { get; set; } | ||
public int PageSize { get; set; } | ||
public String Name { get; set; } | ||
public Int32 PageNumber { get; set; } | ||
public Int32 PageSize { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
src/YuckQi.Domain/Entities/MultiTenant/Abstract/IMultiTenantEntity.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
using YuckQi.Domain.Entities.Abstract; | ||
using System; | ||
using YuckQi.Domain.Entities.Abstract; | ||
|
||
namespace YuckQi.Domain.Entities.MultiTenant.Abstract | ||
{ | ||
public interface IMultiTenantEntity<TKey, TTenantKey> : IEntity<TKey> where TKey : struct where TTenantKey : struct | ||
{ | ||
TTenantKey TenantId { get; set; } | ||
|
||
bool IsValidTenant(TTenantKey? tenantId); | ||
Boolean IsValidTenant(TTenantKey? tenantId); | ||
} | ||
} |
8 changes: 3 additions & 5 deletions
8
src/YuckQi.Domain/Entities/MultiTenant/Abstract/MultiTenantEntityBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
using YuckQi.Domain.Entities.Abstract; | ||
using System; | ||
using YuckQi.Domain.Entities.Abstract; | ||
|
||
namespace YuckQi.Domain.Entities.MultiTenant.Abstract | ||
{ | ||
public abstract class MultiTenantEntityBase<TKey, TTenantKey> : EntityBase<TKey>, IMultiTenantEntity<TKey, TTenantKey> where TKey : struct where TTenantKey : struct | ||
{ | ||
public TTenantKey TenantId { get; set; } | ||
|
||
public bool IsValidTenant(TTenantKey? tenantId) | ||
{ | ||
return TenantId.Equals(tenantId); | ||
} | ||
public Boolean IsValidTenant(TTenantKey? tenantId) => TenantId.Equals(tenantId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
using System.Collections.Generic; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace YuckQi.Domain.ValueObjects.Abstract | ||
{ | ||
public interface IPage | ||
{ | ||
int PageNumber { get; } | ||
int PageSize { get; } | ||
Int32 PageNumber { get; } | ||
Int32 PageSize { get; } | ||
} | ||
|
||
public interface IPage<out T> : IPage | ||
{ | ||
IReadOnlyCollection<T> Items { get; } | ||
int TotalCount { get; } | ||
Int32 TotalCount { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters