Move projects to src; add Neutrino secret
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using RecNet.Domain.Profiles;
|
||||
|
||||
namespace RecNet.Infrastructure.Persistence.Configurations;
|
||||
|
||||
public class ProfileConfiguration : IEntityTypeConfiguration<Profile>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Profile> builder)
|
||||
{
|
||||
builder.HasKey(x => x.ProfileId);
|
||||
|
||||
builder.Property(x => x.Name)
|
||||
.HasMaxLength(Profile.MaxNameLength)
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(x => x.Platform)
|
||||
.HasConversion<string>()
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(x => x.PlatformId)
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(x => x.DeviceIds)
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
builder.Property(x => x.CreatedAt)
|
||||
.IsRequired();
|
||||
|
||||
builder.HasIndex(x => new { x.Platform, x.PlatformId })
|
||||
.IsUnique();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user