update docs/template/typings/api.d.ts.vm.

Signed-off-by: 唐振超 <imtzc@qq.com>
This commit is contained in:
唐振超 2025-07-03 01:05:33 +00:00 committed by Gitee
parent 229e00443f
commit 1b3a5d2600
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -5,40 +5,42 @@
* *
* backend api module: "${ModuleName}" * backend api module: "${ModuleName}"
*/ */
namespace ${ModuleName} { declare namespace Api {
/** ${businessname} */ namespace ${ModuleName} {
type ${BusinessName} = Common.CommonRecord<{ /** ${businessname} */
#foreach($column in $columns)#if(!$BaseEntity.contains($column.javaField)) type ${BusinessName} = Common.CommonRecord<{
/** $column.columnComment */ #foreach($column in $columns)#if(!$BaseEntity.contains($column.javaField))
$column.javaField:#if($column.javaField.indexOf("id") != -1 || $column.javaField.indexOf("Id") != -1) CommonType.IdType; #elseif($column.javaType == 'Long' || $column.javaType == 'Integer' || $column.javaType == 'Double' || $column.javaType == 'Float' || $column.javaType == 'BigDecimal') number; #elseif($column.javaType == 'Boolean') boolean; #else string; #end /** $column.columnComment */
#end#end $column.javaField:#if($column.javaField.indexOf("id") != -1 || $column.javaField.indexOf("Id") != -1) CommonType.IdType; #elseif($column.javaType == 'Long' || $column.javaType == 'Integer' || $column.javaType == 'Double' || $column.javaType == 'Float' || $column.javaType == 'BigDecimal') number; #elseif($column.javaType == 'Boolean') boolean; #else string; #end
}>; #end#end
}>;
/** ${businessname} search params */ /** ${businessname} search params */
type ${BusinessName}SearchParams = CommonType.RecordNullable< type ${BusinessName}SearchParams = CommonType.RecordNullable<
Pick< Pick<
Api.${ModuleName}.${BusinessName}, Api.${ModuleName}.${BusinessName},
#foreach($column in $columns) #foreach($column in $columns)
#if($column.query && $column.queryType != 'BETWEEN') #if($column.query && $column.queryType != 'BETWEEN')
| '${column.javaField}' | '${column.javaField}'
#end
#end #end
#end > &
> & Api.Common.CommonSearchParams
Api.Common.CommonSearchParams >;
>;
/** ${businessname} operate params */ /** ${businessname} operate params */
type ${BusinessName}OperateParams = CommonType.RecordNullable< type ${BusinessName}OperateParams = CommonType.RecordNullable<
Pick< Pick<
Api.${ModuleName}.${BusinessName}, Api.${ModuleName}.${BusinessName},
#foreach($column in $columns) #foreach($column in $columns)
#if($column.insert || $column.edit) #if($column.insert || $column.edit)
| '${column.javaField}' | '${column.javaField}'
#end
#end #end
#end >
> >;
>;
/** ${businessname} list */ /** ${businessname} list */
type ${BusinessName}List = Api.Common.PaginatingQueryRecord<${BusinessName}>; type ${BusinessName}List = Api.Common.PaginatingQueryRecord<${BusinessName}>;
}
} }