CategoryMap.cs 584 字节
Newer Older
S
simon 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
using System;
using Aurora.Core.Domain.Entities;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System.Collections.Generic;

namespace Aurora.Core.EntityFramework.EntitiesConfig
{
    /// <summary>
    /// 类别 映射配置类
    /// </summary>
    public class CategoryMap : BaseEntityTypeConfiguration<Category>
    {
        public override void Map(EntityTypeBuilder<Category> builder)
        {
            builder.Property(x => x.Name).HasMaxLength(255).IsRequired();
            builder.Property(x => x.Remark).HasMaxLength(255).IsRequired();
        }
    }
}