You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.2 KiB

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Shentun.Peis.EntityFrameworkCore;
using Shentun.Peis.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Shentun.Peis.DbMapping
{
internal class BigtextResultConclusionDbMapping : IEntityTypeConfiguration<BigtextResultConclusion>
{
public void Configure(EntityTypeBuilder<BigtextResultConclusion> entity)
{
entity.HasComment("大文本结果结论");
entity.Property(t => t.Conclusion).HasComment("结论");
entity.Property(e => e.Id).IsFixedLength();
entity.Property(e => e.BigtextResultTemplateId).IsFixedLength().IsRequired();
//entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)");
entity.Property(e => e.DisplayOrder).HasDefaultValueSql("999999");
entity.HasOne(d => d.BigtextResultTemplate)
.WithMany(p => p.BigtextResultConclusions)
.HasForeignKey(d => d.BigtextResultTemplateId)
.HasConstraintName("fk_bigtext");
entity.ConfigureByConvention();
}
}
}