18 lines
477 B
C#
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();
|
|
}
|
|
}
|
|
|
|
} |