From 30a8de98b7c1a911ef7cd1023cfc8717e0f432a5 Mon Sep 17 00:00:00 2001 From: Suomm <1474983351@qq.com> Date: Mon, 19 Jun 2023 11:15:33 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=9B=B4=E6=96=B0=20Table=20=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mybatisflex/annotation/Table.java | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/mybatis-flex-annotation/src/main/java/com/mybatisflex/annotation/Table.java b/mybatis-flex-annotation/src/main/java/com/mybatisflex/annotation/Table.java index c4a23ec6..3d8fd4b9 100644 --- a/mybatis-flex-annotation/src/main/java/com/mybatisflex/annotation/Table.java +++ b/mybatis-flex-annotation/src/main/java/com/mybatisflex/annotation/Table.java @@ -1,17 +1,17 @@ -/** - * Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com). - *
- * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *
- * http://www.apache.org/licenses/LICENSE-2.0 - *
- * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. +/* + * Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com). + *
+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *
+ * http://www.apache.org/licenses/LICENSE-2.0 + *
+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.mybatisflex.annotation; @@ -20,47 +20,51 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * 数据库表信息注解。 + */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface Table { /** - * 显式指定表名称 + * 显式指定表名称。 */ String value(); /** - * 数据库的 schema(模式) + * 数据库的 schema(模式)。 */ String schema() default ""; /** - * 默认为 驼峰属性 转换为 下划线字段 + * 默认为 驼峰属性 转换为 下划线字段。 */ boolean camelToUnderline() default true; /** - * 默认使用哪个数据源,若系统找不到该指定的数据源时,默认使用第一个数据源 + * 默认使用哪个数据源,若系统找不到该指定的数据源时,默认使用第一个数据源。 */ String dataSource() default ""; /** - * 监听 entity 的 insert 行为 + * 监听 entity 的 insert 行为。 */ Class extends InsertListener>[] onInsert() default {}; /** - * 监听 entity 的 update 行为 + * 监听 entity 的 update 行为。 */ Class extends UpdateListener>[] onUpdate() default {}; /** - * 监听 entity 的查询数据的 set 行为,用户主动 set 不会触发 + * 监听 entity 的查询数据的 set 行为,用户主动 set 不会触发。 */ Class extends SetListener>[] onSet() default {}; /** - * 在某些场景下,我们需要手动编写 Mapper,可以通过这个注解来关闭 APT 的 Mapper 生成 + * 在某些场景下,我们需要手动编写 Mapper,可以通过这个注解来关闭 APT 的 Mapper 生成。 */ boolean mapperGenerateEnable() default true; + } \ No newline at end of file