Skip to content

Commit a59736a

Browse files
committed
add MetaTable annotation
1 parent 7ecfcde commit a59736a

File tree

16 files changed

+145
-12
lines changed

16 files changed

+145
-12
lines changed

example/example-application/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.37</version>
8+
<version>3.3.38</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-domain/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.37</version>
8+
<version>3.3.38</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-infra-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.37</version>
8+
<version>3.3.38</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-infra-jpa/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.37</version>
8+
<version>3.3.38</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.37</version>
8+
<version>3.3.38</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</parent>
1818

1919
<artifactId>springboot-example</artifactId>
20-
<version>3.3.37</version>
20+
<version>3.3.38</version>
2121

2222
<name>springboot-example</name>
2323
<description>springboot-example project for Spring Boot</description>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<groupId>com.codingapi.springboot</groupId>
1717
<artifactId>springboot-parent</artifactId>
18-
<version>3.3.37</version>
18+
<version>3.3.38</version>
1919

2020
<url>https://github.com/codingapi/springboot-framewrok</url>
2121
<name>springboot-parent</name>

springboot-starter-data-authorization/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>springboot-parent</artifactId>
9-
<version>3.3.37</version>
9+
<version>3.3.38</version>
1010
</parent>
1111

1212
<artifactId>springboot-starter-data-authorization</artifactId>

springboot-starter-data-fast/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-parent</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.37</version>
8+
<version>3.3.38</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

springboot-starter-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>3.3.37</version>
9+
<version>3.3.38</version>
1010
</parent>
1111

1212
<name>springboot-starter-flow</name>

springboot-starter-security/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>3.3.37</version>
9+
<version>3.3.38</version>
1010
</parent>
1111

1212
<artifactId>springboot-starter-security</artifactId>

springboot-starter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.codingapi.springboot</groupId>
77
<artifactId>springboot-parent</artifactId>
8-
<version>3.3.37</version>
8+
<version>3.3.38</version>
99
</parent>
1010
<artifactId>springboot-starter</artifactId>
1111

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package com.codingapi.springboot.framework.annotation;
2+
3+
/**
4+
* 数据库字段类型
5+
*/
6+
public enum ColumnType {
7+
8+
/**
9+
* 整数
10+
*/
11+
Number,
12+
13+
/**
14+
* 浮点数
15+
*/
16+
Float,
17+
18+
/**
19+
* 字符串
20+
*/
21+
String,
22+
23+
/**
24+
* 日期
25+
*/
26+
Date,
27+
28+
/**
29+
* 文件
30+
*/
31+
File,
32+
33+
/**
34+
* 布尔
35+
*/
36+
Boolean,
37+
38+
/**
39+
* 字节
40+
*/
41+
Bytes,
42+
43+
/**
44+
* JSON
45+
*/
46+
JSON,
47+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.codingapi.springboot.framework.annotation;
2+
3+
import java.lang.annotation.*;
4+
5+
/**
6+
* 查询字段
7+
*/
8+
@Target({ElementType.FIELD})
9+
@Retention(RetentionPolicy.RUNTIME)
10+
@Documented
11+
public @interface MetaColumn {
12+
13+
/**
14+
* 字段说明
15+
*/
16+
String desc();
17+
18+
/**
19+
* 字段名称
20+
*/
21+
String name();
22+
23+
/**
24+
* 是否主键
25+
*/
26+
boolean primaryKey() default false;
27+
28+
/**
29+
* 字段类型
30+
*/
31+
ColumnType type() default ColumnType.String;
32+
33+
/**
34+
* 格式化
35+
*/
36+
String format() default "";
37+
38+
/**
39+
* 依赖表
40+
*/
41+
MetaRelation dependent() default @MetaRelation(tableName = "", columnName = "");
42+
43+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.codingapi.springboot.framework.annotation;
2+
3+
import java.lang.annotation.Documented;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
7+
@Retention(RetentionPolicy.RUNTIME)
8+
@Documented
9+
public @interface MetaRelation {
10+
11+
/**
12+
* 表名称
13+
*/
14+
String tableName();
15+
16+
/**
17+
* 字段名称
18+
*/
19+
String columnName();
20+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.codingapi.springboot.framework.annotation;
2+
3+
import java.lang.annotation.*;
4+
5+
/**
6+
* 查询表
7+
*/
8+
@Target({ElementType.TYPE})
9+
@Retention(RetentionPolicy.RUNTIME)
10+
@Documented
11+
public @interface MetaTable {
12+
13+
/**
14+
* 表说明
15+
*/
16+
String desc();
17+
18+
/**
19+
* 表名称
20+
*/
21+
String name();
22+
23+
}

0 commit comments

Comments
 (0)