feat: 咨询分类接口
This commit is contained in:
1 parent
11b41a1a3e
commit
3283d94ea4
26 files changed
+354
-17
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { Category } from '../entity/category.entity';
|
||||
import { CategoryVo } from '../vo/category.vo';
|
||||
import { DateUtil } from '../../core/util/date.util';
|
||||
import { UserMapper } from '../../core/mapper/user.mapper';
|
||||
|
||||
export class CategoryMapper {
|
||||
static toVo(entity: Category): CategoryVo {
|
||||
return {
|
||||
createBy: UserMapper.toVo(entity.createBy),
|
||||
updateBy: UserMapper.toVo(entity.updateBy),
|
||||
id: entity.id,
|
||||
name: entity.name,
|
||||
code: entity.code,
|
||||
order: entity.order,
|
||||
createdTime: DateUtil.format(entity.createdTime),
|
||||
updatedTime: DateUtil.format(entity.updatedTime),
|
||||
};
|
||||
}
|
||||
static toVos(entities: Category[]): CategoryVo[] {
|
||||
return entities.map((entity) => this.toVo(entity));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user