using Volo.Abp.Application.Dtos;
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities;
using PasteApeart.Helper;
using {{ Namespace }}.Application.Contracts;
namespace {{ Namespace }}.{{ DirName }}
{
///<summary>
///{{ DisplayStr }}
///</summary>
public class {{ Name }}AddDto
{
{%- for classProperty in AddPropertys -%}
///<summary>
///{{classProperty.property_display_str}}
///</summary>
{%- if classProperty.class_attributes != null -%}
{%- for classAttribute in classProperty.class_attributes -%}
{{ classAttribute.name_value }}
{%- endfor -%}
{%- endif -%}
{%- if classProperty.boolOtherModel == true -%}
public int {{ classProperty.Name -}}Id { get; set; }
{%- else -%}
public {{ classProperty.property_type }} {{ classProperty.Name }} { get; set; }
{%- endif -%}
{%- endfor -%}
}
///<summary>
///{{ DisplayStr }}
///</summary>
public class {{ Name }}UpdateDto:EntityDto<{{ EntityType | replace:'"',"" }}>
{
{%- for classProperty in UpdatePropertys -%}
///<summary>
///{{classProperty.property_display_str}}
///</summary>
{%- if classProperty.class_attributes != null -%}
{%- for classAttribute in classProperty.class_attributes -%}
{{ classAttribute.name_value }}
{%- endfor -%}
{%- endif -%}
{%- if classProperty.boolOtherModel == true -%}
public int {{ classProperty.Name -}}Id { get; set; }
{%- else -%}
public {{ classProperty.property_type }} {{ classProperty.Name }} { get; set; }
{%- endif -%}
{%- endfor -%}
}
///<summary>
///{{ DisplayStr }}
///</summary>
public class {{ Name }}Dto:EntityDto<{{ EntityType | replace:'"',"" }}>
{
{%- for classProperty in DetailPropertys -%}
///<summary>
///{{classProperty.property_display_str}}
///</summary>
{%- if classProperty.class_attributes != null -%}
{%- for classAttribute in classProperty.class_attributes -%}
{{ classAttribute.name_value }}
{%- endfor -%}
{%- endif -%}
{%- if classProperty.boolOtherModel == true -%}
public int {{ classProperty.Name -}}Id { get; set; }
{%- else -%}
public {{ classProperty.property_type }} {{ classProperty.Name }} { get; set; }
{%- endif -%}
{%- endfor -%}
}
///<summary>
///{{ DisplayStr }}
///</summary>
public class {{ Name }}ListDto:EntityDto<{{ EntityType | replace:'"',"" }}>
{
{%- for classProperty in ListPropertys -%}
///<summary>
///{{classProperty.property_display_str}}
///</summary>
{%- if classProperty.class_attributes != null -%}
{%- for classAttribute in classProperty.class_attributes -%}
{{ classAttribute.name_value }}
{%- endfor -%}
{%- endif -%}
{%- if classProperty.boolOtherModel == true -%}
public int {{ classProperty.Name -}}Id { get; set; }
{%- else -%}
public {{ classProperty.property_type }} {{ classProperty.Name }} { get; set; }
{%- endif -%}
{%- endfor -%}
}
{%- if ClassAttributes != null -%}
{%- for item in ClassAttributes -%}
{% if item.name =="PasteShortModel" %}
///<summary>
///{{ DisplayStr }}
///</summary>
public class {{ item.args1 }}
{
///<summary>
///
///</summary>
public {{ EntityType | replace:'"',"" }} {{ item.args3 }} { get; set; }
///<summary>
///
///</summary>
public string {{ item.args4 }} { get; set; }
}
{% endif %}
{%- endfor -%}
{%- endif -%}
///<summary>
/// 查询
///</summary>
public class InputQuery{{ Name }}:InputSearchBase{
//这个后面也要支持... .. . 还是直接从query中转换而来???
{%- for classProperty in ListPropertys -%}
{%- if classProperty.class_attributes != null -%}
{%- for classAttribute in classProperty.class_attributes -%}
{%- if classAttribute.name == "PasteQuery" or classAttribute.name == "PasteSearch" -%}
///<summary>
///{{classProperty.property_display_str}}
///</summary>
{%- for ca in classProperty.class_attributes -%}
{{ ca.name_value }}
{%- endfor -%}
{%- if classProperty.boolOtherModel == true -%}
public int {{ classProperty.Name -}}Id { get; set; }
{%- else -%}
public {{ classProperty.property_type }} {{ classProperty.Name }} { get; set; }
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
}
}