-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathThroughputEndpointConfiguration.cs
More file actions
32 lines (29 loc) · 1.09 KB
/
ThroughputEndpointConfiguration.cs
File metadata and controls
32 lines (29 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
namespace ServiceControl.Persistence.Sql.Core.EntityConfigurations;
using Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
class ThroughputEndpointConfiguration : IEntityTypeConfiguration<ThroughputEndpointEntity>
{
public void Configure(EntityTypeBuilder<ThroughputEndpointEntity> builder)
{
builder.ToTable("ThroughputEndpoint")
.HasIndex(e => new
{
e.EndpointName,
e.ThroughputSource
}, "UC_ThroughputEndpoint_EndpointName_ThroughputSource")
.IsUnique();
builder.HasKey(e => e.Id);
builder.Property(e => e.EndpointName)
.IsRequired()
.HasMaxLength(200);
builder.Property(e => e.ThroughputSource)
.IsRequired()
.HasMaxLength(50);
builder.Property(e => e.SanitizedEndpointName);
builder.Property(e => e.EndpointIndicators);
builder.Property(e => e.UserIndicator);
builder.Property(e => e.Scope);
builder.Property(e => e.LastCollectedData);
}
}