新增类型转换接口

This commit is contained in:
jiangdingxuan 2024-01-08 10:43:49 +08:00
parent 0c6fbae438
commit 31b4b91bc6
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,11 @@
package net.rzdata.demo.trait;
/**
* 实体转换类
* @param <S> 源类型
* @param <T> 目标类型
*/
public interface IConverter<S, T> {
T convert(S source);
}

View File

@ -0,0 +1,10 @@
package net.rzdata.demo.trait;
/**
* 请求实体类
* @param <T> 核心模型类型
*/
public interface IQuery<T> {
T into();
}