2020-12-10 11:43:47 +01:00

18 lines
477 B
C#

using HN.Domain;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace HN.Infrastructure.EntityTypes
{
public sealed class VoteEntityType : IEntityTypeConfiguration<Vote>
{
public void Configure(EntityTypeBuilder<Vote> builder)
{
builder.ToTable("link_votes");
builder.HasKey("LinkId");
builder.Property(o => o.Type).IsRequired();
builder.Property(o => o.CreatedAt).IsRequired();
}
}
}