schangxiang@126.com
2024-04-23 f47411fb53aeee0c7bd514cbc841f9030349f448
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
@model Admin.NET.Application.Service.System.LowCode.Dto.Front_CodeGenerate
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Furion.DatabaseAccessor;
using Admin.NET.Core;
using Microsoft.EntityFrameworkCore;
 
namespace @(@Model.NameSpace).Entity
{
    /// <summary>
    /// @(@Model.TableDesc)
    /// </summary>
    [Table("@(@Model.TableName)")]
    [Comment("@(@Model.TableDesc)")]
    public class @(@Model.ClassName) : DEntityBase<long, @(@Model.DatabaseName)>
    {
 
@foreach (var column in Model.Fields){
        @:/// <summary>
        @:/// @(@column.ColumnComment)
        @:/// </summary>
        @:[Comment("@(@column.ColumnComment)")]@(@column.IsRequired == true ? "[Required]" : "")@(!string.IsNullOrEmpty(@column.DbParam) ? "[Column(TypeName = \"" + @column.DbParam + "\")]" : "")
        @:public @(@column.NetType) @(@column.FieldName) { get; set; }
        @:
}
    }
}