Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk): 添加实体类基础描述类;添加数据库实体类生成; #46

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

EddyChao
Copy link
Contributor

@EddyChao EddyChao commented Nov 8, 2024

No description provided.

@EddyChao
Copy link
Contributor Author

EddyChao commented Nov 8, 2024

@zhou-hao 大佬,有空麻烦帮我看看,这些个字段的定义有问题嘛

private List<AnnotationInfo> annotations = new ArrayList<>();

@Schema(description = "父类信息")
private SuperClassOrInterfaceInfo superClass;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以直接使用ClassInfo吧 下同

@Getter
@AllArgsConstructor
@NoArgsConstructor
public class AnnotationInfo {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注解应当描述完整信息吧。注解的名称,属性等信息,注解的类型(ClassInfo),

@zhou-hao
Copy link
Member

zhou-hao commented Nov 8, 2024

#44

@Schema(description = "注解表达式")
private AnnotationExpr annotationExpr;
@Schema(description = "属性信息")
private Map<String, Object> properties;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

属性信息应当包含完整信息 List<AnnotationProperty>

AnnotationProperty{
  String name;
  ClassInfo type;
  Object defaultValue;
}

@zhou-hao
Copy link
Member

实体类等业务相关的生成不放到这里。这里只生成和解析原生java 以及sdk相关的内容。

* @param modifiers 字段修饰符
* @return RdbEntityJavaGenerator
*/
JavaGenerator addFieldWithAnnotation(String type, String name, List<AnnotationExpr> annotations, Modifier.Keyword... modifiers);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该都基于定义的info来添加吧? 下同

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants