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.

36 lines
1.6 KiB

3 weeks ago
  1. using Microsoft.EntityFrameworkCore.Metadata.Builders;
  2. using Microsoft.EntityFrameworkCore;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using Shentun.WebPeis.Models;
  9. namespace Shentun.WebPeis.Configures
  10. {
  11. internal class CompanyIntroductionConfigure : IEntityTypeConfiguration<CompanyIntroduction>
  12. {
  13. public void Configure(EntityTypeBuilder<CompanyIntroduction> entity)
  14. {
  15. entity.ToTable("company_introduction", tb => tb.HasComment("企业介绍"));
  16. entity.Property(e => e.CompanyIntroductionId).ValueGeneratedNever().HasColumnName("company_introduction_id");
  17. entity.Property(e => e.ConcurrencyStamp).HasMaxLength(40).HasColumnName("concurrency_stamp");
  18. entity.Property(e => e.Content).HasMaxLength(4000).HasComment("内容").HasColumnName("content");
  19. entity.Property(e => e.ContentType).HasMaxLength(1).HasDefaultValueSql("'0'::bpchar").HasComment("内容类型 0-标题 1-段落内容").HasColumnName("content_type");
  20. entity.Property(e => e.DisplayOrder).HasColumnName("display_order");
  21. entity.Property(e => e.CreationTime)
  22. .HasColumnType("timestamp without time zone")
  23. .HasColumnName("creation_time");
  24. entity.Property(e => e.CreatorId).HasColumnName("creator_id");
  25. entity.Property(e => e.LastModificationTime)
  26. .HasColumnType("timestamp without time zone")
  27. .HasColumnName("last_modification_time");
  28. entity.Property(e => e.LastModifierId).HasColumnName("last_modifier_id");
  29. }
  30. }
  31. }