mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
minor entity cleanup
This commit is contained in:
parent
5889d90e3a
commit
b3c5744f97
6 changed files with 4 additions and 12 deletions
|
|
@ -4,7 +4,7 @@ namespace FilterLists.Data.Entities
|
|||
{
|
||||
public abstract class BaseEntity
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public int Id { get; set; }
|
||||
public DateTime CreatedDateUtc { get; set; }
|
||||
public DateTime? ModifiedDateUtc { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ namespace FilterLists.Data.Entities
|
|||
{
|
||||
public class FilterList : BaseEntity
|
||||
{
|
||||
public List<Language> Languages { get; set; }
|
||||
public long MaintainerId { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string DescriptionSourceUrl { get; set; }
|
||||
public string DonateUrl { get; set; }
|
||||
|
|
@ -13,6 +11,8 @@ public class FilterList : BaseEntity
|
|||
public string ForumUrl { get; set; }
|
||||
public string HomeUrl { get; set; }
|
||||
public string IssuesUrl { get; set; }
|
||||
public List<Language> Languages { get; set; }
|
||||
public int MaintainerId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string ViewUrl { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ namespace FilterLists.Data.Entities
|
|||
{
|
||||
public class Maintainer : BaseEntity
|
||||
{
|
||||
public List<FilterList> FilterLists { get; set; }
|
||||
public string Email { get; set; }
|
||||
public List<FilterList> FilterLists { get; set; }
|
||||
public string HomeUrl { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string TwitterHandle { get; set; }
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@ public class BaseEntityTypeConfiguration<TBase> : IEntityTypeConfiguration<TBase
|
|||
{
|
||||
public virtual void Configure(EntityTypeBuilder<TBase> entityTypeBuilder)
|
||||
{
|
||||
entityTypeBuilder.Property(b => b.Id)
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
entityTypeBuilder.Property(b => b.CreatedDateUtc)
|
||||
.HasColumnType("TIMESTAMP")
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP")
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ public class LanguageTypeConfiguration : BaseEntityTypeConfiguration<Language>
|
|||
{
|
||||
public override void Configure(EntityTypeBuilder<Language> entityTypeBuilder)
|
||||
{
|
||||
entityTypeBuilder.ToTable("languages");
|
||||
|
||||
entityTypeBuilder.Property(b => b.Iso6391)
|
||||
.HasMaxLength(2);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using FilterLists.Data.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace FilterLists.Data.EntityTypeConfigurations
|
||||
|
|
@ -8,8 +7,6 @@ public class MaintainerTypeConfiguration : BaseEntityTypeConfiguration<Maintaine
|
|||
{
|
||||
public override void Configure(EntityTypeBuilder<Maintainer> entityTypeBuilder)
|
||||
{
|
||||
entityTypeBuilder.ToTable("maintainers");
|
||||
|
||||
entityTypeBuilder.Property(b => b.Email)
|
||||
.HasMaxLength(126);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue