-
Notifications
You must be signed in to change notification settings - Fork 19
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
base: master
Are you sure you want to change the base?
Conversation
@zhou-hao 大佬,有空麻烦帮我看看,这些个字段的定义有问题嘛 |
private List<AnnotationInfo> annotations = new ArrayList<>(); | ||
|
||
@Schema(description = "父类信息") | ||
private SuperClassOrInterfaceInfo superClass; |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注解应当描述完整信息吧。注解的名称,属性等信息,注解的类型(ClassInfo),
@Schema(description = "注解表达式") | ||
private AnnotationExpr annotationExpr; | ||
@Schema(description = "属性信息") | ||
private Map<String, Object> properties; |
There was a problem hiding this comment.
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;
}
实体类等业务相关的生成不放到这里。这里只生成和解析原生java 以及sdk相关的内容。 |
* @param modifiers 字段修饰符 | ||
* @return RdbEntityJavaGenerator | ||
*/ | ||
JavaGenerator addFieldWithAnnotation(String type, String name, List<AnnotationExpr> annotations, Modifier.Keyword... modifiers); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该都基于定义的info来添加吧? 下同
No description provided.