Skip to content

Commit

Permalink
prefer int to uint t
Browse files Browse the repository at this point in the history
  • Loading branch information
collinbarrett committed Aug 29, 2018
1 parent 9b9c2d0 commit 17525e1
Show file tree
Hide file tree
Showing 31 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion src/FilterLists.Api/V1/Controllers/ListsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public async Task<IActionResult> GetById(int id) =>
Json(await MemoryCache.GetOrCreate("ListsController_GetById_" + id, entry =>
{
entry.AbsoluteExpirationRelativeToNow = FourHoursFromNow;
return filterListService.GetDetailsAsync((uint)id);
return filterListService.GetDetailsAsync(id);
}));

[HttpGet("seed")]
Expand Down
2 changes: 1 addition & 1 deletion src/FilterLists.Data/Entities/BaseEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace FilterLists.Data.Entities
{
public abstract class BaseEntity : IBaseEntity
{
public uint Id { get; set; }
public int Id { get; set; }
public DateTime? CreatedDateUtc { get; set; }
public DateTime? ModifiedDateUtc { get; set; }
}
Expand Down
4 changes: 2 additions & 2 deletions src/FilterLists.Data/Entities/FilterList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class FilterList : BaseEntity
public string HomeUrl { get; set; }
public string IssuesUrl { get; set; }
public ICollection<FilterListLanguage> FilterListLanguages { get; set; }
public uint? LicenseId { get; set; }
public int? LicenseId { get; set; }
public License License { get; set; }
public ICollection<FilterListMaintainer> FilterListMaintainers { get; set; }
public ICollection<Merge> MergeFilterLists { get; set; }
Expand All @@ -30,7 +30,7 @@ public class FilterList : BaseEntity
public DateTime? PublishedDate { get; set; }
public ICollection<Snapshot> Snapshots { get; set; }
public string SubmissionUrl { get; set; }
public uint? SyntaxId { get; set; }
public int? SyntaxId { get; set; }
public Syntax Syntax { get; set; }
public ICollection<FilterListTag> FilterListTags { get; set; }
public string ViewUrl { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/FilterLists.Data/Entities/Junctions/FilterListLanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
public class FilterListLanguage : BaseJunctionEntity
{
public uint FilterListId { get; set; }
public int FilterListId { get; set; }
public FilterList FilterList { get; set; }
public uint LanguageId { get; set; }
public int LanguageId { get; set; }
public Language Language { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
public class FilterListMaintainer : BaseJunctionEntity
{
public uint FilterListId { get; set; }
public int FilterListId { get; set; }
public FilterList FilterList { get; set; }
public uint MaintainerId { get; set; }
public int MaintainerId { get; set; }
public Maintainer Maintainer { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/FilterLists.Data/Entities/Junctions/FilterListTag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
public class FilterListTag : BaseJunctionEntity
{
public uint FilterListId { get; set; }
public int FilterListId { get; set; }
public FilterList FilterList { get; set; }
public uint TagId { get; set; }
public int TagId { get; set; }
public Tag Tag { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/FilterLists.Data/Entities/Junctions/Fork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
public class Fork : BaseJunctionEntity
{
public uint ForkFilterListId { get; set; }
public int ForkFilterListId { get; set; }
public FilterList ForkFilterList { get; set; }
public uint UpstreamFilterListId { get; set; }
public int UpstreamFilterListId { get; set; }
public FilterList UpstreamFilterList { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/FilterLists.Data/Entities/Junctions/Merge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
public class Merge : BaseJunctionEntity
{
public uint MergeFilterListId { get; set; }
public int MergeFilterListId { get; set; }
public FilterList MergeFilterList { get; set; }
public uint UpstreamFilterListId { get; set; }
public int UpstreamFilterListId { get; set; }
public FilterList UpstreamFilterList { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/FilterLists.Data/Entities/Junctions/SnapshotRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
public class SnapshotRule : BaseJunctionEntity
{
public uint SnapshotId { get; set; }
public int SnapshotId { get; set; }
public Snapshot Snapshot { get; set; }
public uint RuleId { get; set; }
public int RuleId { get; set; }
public Rule Rule { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/FilterLists.Data/Entities/Junctions/SoftwareSyntax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
public class SoftwareSyntax : BaseJunctionEntity
{
public uint SoftwareId { get; set; }
public int SoftwareId { get; set; }
public Software Software { get; set; }
public uint SyntaxId { get; set; }
public int SyntaxId { get; set; }
public Syntax Syntax { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/FilterLists.Data/Entities/Snapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace FilterLists.Data.Entities
{
public class Snapshot : BaseEntity
{
public uint FilterListId { get; set; }
public int FilterListId { get; set; }
public FilterList FilterList { get; set; }
public int? HttpStatusCode { get; set; }
public bool WasSuccessful { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public override void Configure(EntityTypeBuilder<FilterList> entityTypeBuilder)
entityTypeBuilder.Property(x => x.IssuesUrl)
.HasColumnType("TEXT");
entityTypeBuilder.Property(x => x.LicenseId)
.HasDefaultValue((uint)5)
.HasDefaultValue(5)
.IsRequired();
entityTypeBuilder.Property(x => x.Name)
.HasColumnType("VARCHAR(126)")
Expand Down
2 changes: 1 addition & 1 deletion src/FilterLists.Services/FilterList/FilterListService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public FilterListService(FilterListsDbContext dbContext, IConfigurationProvider
public async Task<IEnumerable<ListSummaryDto>> GetAllSummariesAsync() =>
await DbContext.FilterLists.OrderBy(l => l.Name.ToLower()).ProjectTo<ListSummaryDto>(MapConfig).ToListAsync();

public async Task<ListDetailsDto> GetDetailsAsync(uint id) =>
public async Task<ListDetailsDto> GetDetailsAsync(int id) =>
await DbContext.FilterLists.ProjectTo<ListDetailsDto>(MapConfig)
.FirstOrDefaultAsync(x => x.Id == id)
.FilterParentListFromMaintainerAdditionalLists();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace FilterLists.Services.FilterList.Models
[UsedImplicitly]
public class ListDetailsDto
{
public uint Id { get; set; }
public int Id { get; set; }
public string ChatUrl { get; set; }
public string Description { get; set; }
public string DescriptionSourceUrl { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace FilterLists.Services.FilterList.Models
[UsedImplicitly]
public class ListMaintainerDto
{
public uint Id { get; set; }
public int Id { get; set; }
public string EmailAddress { get; set; }
public string HomeUrl { get; set; }
public string Name { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace FilterLists.Services.FilterList.Models
[UsedImplicitly]
public class ListSummaryDto
{
public uint Id { get; set; }
public int Id { get; set; }
public IEnumerable<ListLanguagesDto> Languages { get; set; }
public string Name { get; set; }
public IEnumerable<ListTagDto> Tags { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.FilterList.Models
[UsedImplicitly]
public class MaintainerAdditionalListsDto
{
public uint Id { get; set; }
public int Id { get; set; }
public string Name { get; set; }
}
}
6 changes: 3 additions & 3 deletions src/FilterLists.Services/Seed/Models/FilterListSeedDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace FilterLists.Services.Seed.Models
[UsedImplicitly]
public class FilterListSeedDto
{
public uint Id { get; set; }
public int Id { get; set; }
public string ChatUrl { get; set; }
public string Description { get; set; }
public string DescriptionSourceUrl { get; set; }
Expand All @@ -16,12 +16,12 @@ public class FilterListSeedDto
public string ForumUrl { get; set; }
public string HomeUrl { get; set; }
public string IssuesUrl { get; set; }
public uint? LicenseId { get; set; }
public int? LicenseId { get; set; }
public string Name { get; set; }
public string PolicyUrl { get; set; }
public DateTime? PublishedDate { get; set; }
public string SubmissionUrl { get; set; }
public uint? SyntaxId { get; set; }
public int? SyntaxId { get; set; }
public string ViewUrl { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models.Junctions
[UsedImplicitly]
public class FilterListLanguageSeedDto
{
public uint FilterListId { get; set; }
public uint LanguageId { get; set; }
public int FilterListId { get; set; }
public int LanguageId { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models.Junctions
[UsedImplicitly]
public class FilterListMaintainerSeedDto
{
public uint FilterListId { get; set; }
public uint MaintainerId { get; set; }
public int FilterListId { get; set; }
public int MaintainerId { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models.Junctions
[UsedImplicitly]
public class FilterListTagSeedDto
{
public uint FilterListId { get; set; }
public uint TagId { get; set; }
public int FilterListId { get; set; }
public int TagId { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/FilterLists.Services/Seed/Models/Junctions/ForkSeedDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models.Junctions
[UsedImplicitly]
public class ForkSeedDto
{
public uint ForkFilterListId { get; set; }
public uint UpstreamFilterListId { get; set; }
public int ForkFilterListId { get; set; }
public int UpstreamFilterListId { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models.Junctions
[UsedImplicitly]
public class MergeSeedDto
{
public uint MergeFilterListId { get; set; }
public uint UpstreamFilterListId { get; set; }
public int MergeFilterListId { get; set; }
public int UpstreamFilterListId { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models.Junctions
[UsedImplicitly]
public class SoftwareSyntaxSeedDto
{
public uint SoftwareId { get; set; }
public uint SyntaxId { get; set; }
public int SoftwareId { get; set; }
public int SyntaxId { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/FilterLists.Services/Seed/Models/LanguageSeedDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models
[UsedImplicitly]
public class LanguageSeedDto
{
public uint Id { get; set; }
public int Id { get; set; }
public string Iso6391 { get; set; }
public string Iso6392 { get; set; }
public string Iso6392B { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/FilterLists.Services/Seed/Models/LicenseSeedDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models
[UsedImplicitly]
public class LicenseSeedDto
{
public uint Id { get; set; }
public int Id { get; set; }
public string DescriptionUrl { get; set; }
public string Name { get; set; }
public bool PermissiveAdaptation { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/FilterLists.Services/Seed/Models/MaintainerSeedDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models
[UsedImplicitly]
public class MaintainerSeedDto
{
public uint Id { get; set; }
public int Id { get; set; }
public string EmailAddress { get; set; }
public string HomeUrl { get; set; }
public string Name { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/FilterLists.Services/Seed/Models/SoftwareSeedDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models
[UsedImplicitly]
public class SoftwareSeedDto
{
public uint Id { get; set; }
public int Id { get; set; }
public string DownloadUrl { get; set; }
public string HomeUrl { get; set; }
public string Name { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/FilterLists.Services/Seed/Models/SyntaxSeedDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models
[UsedImplicitly]
public class SyntaxSeedDto
{
public uint Id { get; set; }
public int Id { get; set; }
public string DefinitionUrl { get; set; }
public string Name { get; set; }
}
Expand Down
2 changes: 1 addition & 1 deletion src/FilterLists.Services/Seed/Models/TagSeedDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Seed.Models
[UsedImplicitly]
public class TagSeedDto
{
public uint Id { get; set; }
public int Id { get; set; }
public string Description { get; set; }
public string Name { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FilterLists.Services.Snapshot.Models
[UsedImplicitly]
public class FilterListViewUrlDto
{
public uint Id { get; set; }
public int Id { get; set; }
public string ViewUrl { get; set; }
}
}

0 comments on commit 17525e1

Please sign in to comment.