7b0b9c7365
Solution + 23 src projects + 26 test projects renamed; folders, csproj, namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated. ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated. SQL roles/logins, LDAP domains, CLI command name, and CLI config dir (~/.scadalink → ~/.scadabridge) also renamed. Build green; 5 Host.Tests fail awaiting SQL login rename in next commit. Pre-existing StaleTagMonitor timing flakes unchanged. Rename script committed at tools/rename-to-scadabridge.sh.
31 lines
994 B
C#
31 lines
994 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
using ZB.MOM.WW.ScadaBridge.Commons.Entities.Scripts;
|
|
|
|
namespace ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Configurations;
|
|
|
|
public class SharedScriptConfiguration : IEntityTypeConfiguration<SharedScript>
|
|
{
|
|
/// <summary>Configures the EF Core mapping for the <see cref="SharedScript"/> entity.</summary>
|
|
/// <param name="builder">Entity type builder used to apply the configuration.</param>
|
|
public void Configure(EntityTypeBuilder<SharedScript> builder)
|
|
{
|
|
builder.HasKey(s => s.Id);
|
|
|
|
builder.Property(s => s.Name)
|
|
.IsRequired()
|
|
.HasMaxLength(200);
|
|
|
|
builder.Property(s => s.Code)
|
|
.IsRequired();
|
|
|
|
builder.Property(s => s.ParameterDefinitions)
|
|
.HasMaxLength(4000);
|
|
|
|
builder.Property(s => s.ReturnDefinition)
|
|
.HasMaxLength(4000);
|
|
|
|
builder.HasIndex(s => s.Name).IsUnique();
|
|
}
|
|
}
|