> getTables() {
+ List result = new ArrayList();
+ result.addAll(getTables0());
+ return result;
+ }
+
+ private final List
> getTables0() {
+ return Arrays.
>asList(
+ WinAuthRoleTable.WinAuthRole,
+ WinUserTable.WinUser,
+ WinUserLoginTable.WinUserLogin);
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/Tables.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/Tables.java
new file mode 100644
index 000000000..7f4891f3f
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/Tables.java
@@ -0,0 +1,43 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen;
+
+
+import javax.annotation.Generated;
+
+import pro.fessional.wings.example.database.autogen.tables.WinAuthRoleTable;
+import pro.fessional.wings.example.database.autogen.tables.WinUserLoginTable;
+import pro.fessional.wings.example.database.autogen.tables.WinUserTable;
+
+
+/**
+ * Convenience access to all tables in
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-17T04:49:52.095Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class Tables {
+
+ /**
+ * The table win_auth_role.
+ */
+ public static final WinAuthRoleTable WinAuthRole = WinAuthRoleTable.WinAuthRole;
+
+ /**
+ * The table win_user.
+ */
+ public static final WinUserTable WinUser = WinUserTable.WinUser;
+
+ /**
+ * The table win_user_login.
+ */
+ public static final WinUserLoginTable WinUserLogin = WinUserLoginTable.WinUserLogin;
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/WinAuthRoleTable.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/WinAuthRoleTable.java
new file mode 100644
index 000000000..10e4b7612
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/WinAuthRoleTable.java
@@ -0,0 +1,193 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables;
+
+
+import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.jooq.Condition;
+import org.jooq.Field;
+import org.jooq.Name;
+import org.jooq.Row9;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.Internal;
+import org.jooq.impl.TableImpl;
+
+import pro.fessional.wings.example.database.autogen.DefaultSchema;
+import pro.fessional.wings.example.database.autogen.tables.records.WinAuthRoleRecord;
+import pro.fessional.wings.faceless.convention.EmptyValue;
+import pro.fessional.wings.faceless.service.lightid.LightIdAware;
+
+
+/**
+ * The table wings_0.win_auth_role.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-17T11:00:12.242Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class WinAuthRoleTable extends TableImpl implements LightIdAware {
+
+ private static final long serialVersionUID = 451215313;
+
+ /**
+ * The reference instance of win_auth_role
+ */
+ public static final WinAuthRoleTable WinAuthRole = new WinAuthRoleTable();
+ public static final WinAuthRoleTable asS1 = WinAuthRole.as("s1");
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return WinAuthRoleRecord.class;
+ }
+
+ /**
+ * The column win_auth_role.id.
+ */
+ public final TableField Id = createField(DSL.name("id"), org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "主键");
+
+ /**
+ * The column win_auth_role.create_dt.
+ */
+ public final TableField CreateDt = createField(DSL.name("create_dt"), org.jooq.impl.SQLDataType.LOCALDATETIME.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP(3)", org.jooq.impl.SQLDataType.LOCALDATETIME)), this, "创建日时(系统)");
+
+ /**
+ * The column win_auth_role.modify_dt.
+ */
+ public final TableField ModifyDt = createField(DSL.name("modify_dt"), org.jooq.impl.SQLDataType.LOCALDATETIME.nullable(false).defaultValue(org.jooq.impl.DSL.inline("1000-01-01 00:00:00.000", org.jooq.impl.SQLDataType.LOCALDATETIME)), this, "修改日时(系统)");
+
+ /**
+ * The column win_auth_role.delete_dt.
+ */
+ public final TableField DeleteDt = createField(DSL.name("delete_dt"), org.jooq.impl.SQLDataType.LOCALDATETIME.nullable(false).defaultValue(org.jooq.impl.DSL.inline("1000-01-01 00:00:00.000", org.jooq.impl.SQLDataType.LOCALDATETIME)), this, "标记删除");
+
+ /**
+ * The column win_auth_role.commit_id.
+ */
+ public final TableField CommitId = createField(DSL.name("commit_id"), org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "提交id");
+
+ /**
+ * The column win_auth_role.role_type.
+ */
+ public final TableField RoleType = createField(DSL.name("role_type"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "类型/40201##:financial|operation");
+
+ /**
+ * The column win_auth_role.role_name.
+ */
+ public final TableField RoleName = createField(DSL.name("role_name"), org.jooq.impl.SQLDataType.VARCHAR(100).nullable(false), this, "名字");
+
+ /**
+ * The column win_auth_role.desc.
+ */
+ public final TableField Desc = createField(DSL.name("desc"), org.jooq.impl.SQLDataType.VARCHAR(200).nullable(false).defaultValue(org.jooq.impl.DSL.inline("", org.jooq.impl.SQLDataType.VARCHAR)), this, "描述");
+
+ /**
+ * The column win_auth_role.auth_set.
+ */
+ public final TableField AuthSet = createField(DSL.name("auth_set"), org.jooq.impl.SQLDataType.VARCHAR(3000).nullable(false), this, "权限集:authority#401####,逗号分割");
+
+ /**
+ * Create a win_auth_role table reference
+ */
+ public WinAuthRoleTable() {
+ this(DSL.name("win_auth_role"), null);
+ }
+
+ /**
+ * Create an aliased win_auth_role table reference
+ */
+ public WinAuthRoleTable(String alias) {
+ this(DSL.name(alias), WinAuthRole);
+ }
+
+ /**
+ * Create an aliased win_auth_role table reference
+ */
+ public WinAuthRoleTable(Name alias) {
+ this(alias, WinAuthRole);
+ }
+
+ private WinAuthRoleTable(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private WinAuthRoleTable(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment("402/权限组(角色)"));
+ }
+
+ @Override
+ public Schema getSchema() {
+ return DefaultSchema.DEFAULT_SCHEMA;
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Internal.createUniqueKey(pro.fessional.wings.example.database.autogen.tables.WinAuthRoleTable.WinAuthRole, "KEY_win_auth_role_PRIMARY", pro.fessional.wings.example.database.autogen.tables.WinAuthRoleTable.WinAuthRole.Id);
+ }
+
+ @Override
+ public List> getKeys() {
+ return Arrays.>asList(
+ Internal.createUniqueKey(pro.fessional.wings.example.database.autogen.tables.WinAuthRoleTable.WinAuthRole, "KEY_win_auth_role_PRIMARY", pro.fessional.wings.example.database.autogen.tables.WinAuthRoleTable.WinAuthRole.Id)
+ );
+ }
+
+ @Override
+ public WinAuthRoleTable as(String alias) {
+ return new WinAuthRoleTable(DSL.name(alias), this);
+ }
+
+ @Override
+ public WinAuthRoleTable as(Name alias) {
+ return new WinAuthRoleTable(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public WinAuthRoleTable rename(String name) {
+ return new WinAuthRoleTable(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public WinAuthRoleTable rename(Name name) {
+ return new WinAuthRoleTable(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row9 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row9 fieldsRow() {
+ return (Row9) super.fieldsRow();
+ }
+
+ /**
+ * The column delete_dt condition
+ */
+ public final Condition onlyDiedData = DeleteDt.gt(EmptyValue.DATE_TIME);
+ public final Condition onlyLiveData = DeleteDt.eq(EmptyValue.DATE_TIME);
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/WinUserLoginTable.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/WinUserLoginTable.java
new file mode 100644
index 000000000..c6c3ba283
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/WinUserLoginTable.java
@@ -0,0 +1,218 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables;
+
+
+import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.jooq.Condition;
+import org.jooq.Field;
+import org.jooq.Name;
+import org.jooq.Row14;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.Internal;
+import org.jooq.impl.TableImpl;
+
+import pro.fessional.wings.example.database.autogen.DefaultSchema;
+import pro.fessional.wings.example.database.autogen.tables.records.WinUserLoginRecord;
+import pro.fessional.wings.faceless.convention.EmptyValue;
+import pro.fessional.wings.faceless.service.lightid.LightIdAware;
+
+
+/**
+ * The table wings_0.win_user_login.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class WinUserLoginTable extends TableImpl implements LightIdAware {
+
+ private static final long serialVersionUID = -1565425007;
+
+ /**
+ * The reference instance of win_user_login
+ */
+ public static final WinUserLoginTable WinUserLogin = new WinUserLoginTable();
+ public static final WinUserLoginTable asA2 = WinUserLogin.as("a2");
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return WinUserLoginRecord.class;
+ }
+
+ /**
+ * The column win_user_login.id.
+ */
+ public final TableField Id = createField(DSL.name("id"), org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "主键");
+
+ /**
+ * The column win_user_login.create_dt.
+ */
+ public final TableField CreateDt = createField(DSL.name("create_dt"), org.jooq.impl.SQLDataType.LOCALDATETIME.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP(3)", org.jooq.impl.SQLDataType.LOCALDATETIME)), this, "创建日时(系统)");
+
+ /**
+ * The column win_user_login.modify_dt.
+ */
+ public final TableField ModifyDt = createField(DSL.name("modify_dt"), org.jooq.impl.SQLDataType.LOCALDATETIME.nullable(false).defaultValue(org.jooq.impl.DSL.inline("1000-01-01 00:00:00.000", org.jooq.impl.SQLDataType.LOCALDATETIME)), this, "修改日时(系统)");
+
+ /**
+ * The column win_user_login.delete_dt.
+ */
+ public final TableField DeleteDt = createField(DSL.name("delete_dt"), org.jooq.impl.SQLDataType.LOCALDATETIME.nullable(false).defaultValue(org.jooq.impl.DSL.inline("1000-01-01 00:00:00.000", org.jooq.impl.SQLDataType.LOCALDATETIME)), this, "标记删除");
+
+ /**
+ * The column win_user_login.commit_id.
+ */
+ public final TableField CommitId = createField(DSL.name("commit_id"), org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "提交id");
+
+ /**
+ * The column win_user_login.user_id.
+ */
+ public final TableField UserId = createField(DSL.name("user_id"), org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "客户id:win_user.id");
+
+ /**
+ * The column win_user_login.login_type.
+ */
+ public final TableField LoginType = createField(DSL.name("login_type"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "登录类别/41201##:邮件|手机|微信|facebook");
+
+ /**
+ * The column win_user_login.login_name.
+ */
+ public final TableField LoginName = createField(DSL.name("login_name"), org.jooq.impl.SQLDataType.VARCHAR(200).nullable(false), this, "登录名称");
+
+ /**
+ * The column win_user_login.login_pass.
+ */
+ public final TableField LoginPass = createField(DSL.name("login_pass"), org.jooq.impl.SQLDataType.VARCHAR(200).nullable(false), this, "登录密码及算法,参考SpringSecurity格式");
+
+ /**
+ * The column win_user_login.login_salt.
+ */
+ public final TableField LoginSalt = createField(DSL.name("login_salt"), org.jooq.impl.SQLDataType.VARCHAR(100).nullable(false).defaultValue(org.jooq.impl.DSL.inline("", org.jooq.impl.SQLDataType.VARCHAR)), this, "密码加盐");
+
+ /**
+ * The column win_user_login.login_para.
+ */
+ public final TableField LoginPara = createField(DSL.name("login_para"), org.jooq.impl.SQLDataType.VARCHAR(2000).nullable(false), this, "登录参数:json格式的第三方参数");
+
+ /**
+ * The column win_user_login.auth_code.
+ */
+ public final TableField AuthCode = createField(DSL.name("auth_code"), org.jooq.impl.SQLDataType.VARCHAR(50).nullable(false).defaultValue(org.jooq.impl.DSL.inline("", org.jooq.impl.SQLDataType.VARCHAR)), this, "长期的识别码");
+
+ /**
+ * The column win_user_login.bad_count.
+ */
+ public final TableField BadCount = createField(DSL.name("bad_count"), org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaultValue(org.jooq.impl.DSL.inline("0", org.jooq.impl.SQLDataType.INTEGER)), this, "错误次数");
+
+ /**
+ * The column win_user_login.status.
+ */
+ public final TableField Status = createField(DSL.name("status"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "鉴权状态/41101##:同用户状态");
+
+ /**
+ * Create a win_user_login table reference
+ */
+ public WinUserLoginTable() {
+ this(DSL.name("win_user_login"), null);
+ }
+
+ /**
+ * Create an aliased win_user_login table reference
+ */
+ public WinUserLoginTable(String alias) {
+ this(DSL.name(alias), WinUserLogin);
+ }
+
+ /**
+ * Create an aliased win_user_login table reference
+ */
+ public WinUserLoginTable(Name alias) {
+ this(alias, WinUserLogin);
+ }
+
+ private WinUserLoginTable(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private WinUserLoginTable(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment("412/用户登录"));
+ }
+
+ @Override
+ public Schema getSchema() {
+ return DefaultSchema.DEFAULT_SCHEMA;
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Internal.createUniqueKey(pro.fessional.wings.example.database.autogen.tables.WinUserLoginTable.WinUserLogin, "KEY_win_user_login_PRIMARY", pro.fessional.wings.example.database.autogen.tables.WinUserLoginTable.WinUserLogin.Id);
+ }
+
+ @Override
+ public List> getKeys() {
+ return Arrays.>asList(
+ Internal.createUniqueKey(pro.fessional.wings.example.database.autogen.tables.WinUserLoginTable.WinUserLogin, "KEY_win_user_login_PRIMARY", pro.fessional.wings.example.database.autogen.tables.WinUserLoginTable.WinUserLogin.Id)
+ );
+ }
+
+ @Override
+ public WinUserLoginTable as(String alias) {
+ return new WinUserLoginTable(DSL.name(alias), this);
+ }
+
+ @Override
+ public WinUserLoginTable as(Name alias) {
+ return new WinUserLoginTable(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public WinUserLoginTable rename(String name) {
+ return new WinUserLoginTable(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public WinUserLoginTable rename(Name name) {
+ return new WinUserLoginTable(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row14 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row14 fieldsRow() {
+ return (Row14) super.fieldsRow();
+ }
+
+ /**
+ * The column delete_dt condition
+ */
+ public final Condition onlyDiedData = DeleteDt.gt(EmptyValue.DATE_TIME);
+ public final Condition onlyLiveData = DeleteDt.eq(EmptyValue.DATE_TIME);
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/WinUserTable.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/WinUserTable.java
new file mode 100644
index 000000000..bbeffe882
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/WinUserTable.java
@@ -0,0 +1,224 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables;
+
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.jooq.Condition;
+import org.jooq.Field;
+import org.jooq.Name;
+import org.jooq.Row15;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.Internal;
+import org.jooq.impl.TableImpl;
+
+import pro.fessional.wings.example.database.autogen.DefaultSchema;
+import pro.fessional.wings.example.database.autogen.tables.records.WinUserRecord;
+import pro.fessional.wings.faceless.convention.EmptyValue;
+import pro.fessional.wings.faceless.service.lightid.LightIdAware;
+
+
+/**
+ * The table wings_0.win_user.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-17T11:00:12.242Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class WinUserTable extends TableImpl implements LightIdAware {
+
+ private static final long serialVersionUID = 1131736677;
+
+ /**
+ * The reference instance of win_user
+ */
+ public static final WinUserTable WinUser = new WinUserTable();
+ public static final WinUserTable asZ7 = WinUser.as("z7");
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return WinUserRecord.class;
+ }
+
+ /**
+ * The column win_user.id.
+ */
+ public final TableField Id = createField(DSL.name("id"), org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "主键");
+
+ /**
+ * The column win_user.create_dt.
+ */
+ public final TableField CreateDt = createField(DSL.name("create_dt"), org.jooq.impl.SQLDataType.LOCALDATETIME.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP(3)", org.jooq.impl.SQLDataType.LOCALDATETIME)), this, "创建日时(系统)");
+
+ /**
+ * The column win_user.modify_dt.
+ */
+ public final TableField ModifyDt = createField(DSL.name("modify_dt"), org.jooq.impl.SQLDataType.LOCALDATETIME.nullable(false).defaultValue(org.jooq.impl.DSL.inline("1000-01-01 00:00:00.000", org.jooq.impl.SQLDataType.LOCALDATETIME)), this, "修改日时(系统)");
+
+ /**
+ * The column win_user.delete_dt.
+ */
+ public final TableField DeleteDt = createField(DSL.name("delete_dt"), org.jooq.impl.SQLDataType.LOCALDATETIME.nullable(false).defaultValue(org.jooq.impl.DSL.inline("1000-01-01 00:00:00.000", org.jooq.impl.SQLDataType.LOCALDATETIME)), this, "标记删除");
+
+ /**
+ * The column win_user.commit_id.
+ */
+ public final TableField CommitId = createField(DSL.name("commit_id"), org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "提交id");
+
+ /**
+ * The column win_user.name.
+ */
+ public final TableField Name = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(50).nullable(false), this, "名字");
+
+ /**
+ * The column win_user.gender.
+ */
+ public final TableField Gender = createField(DSL.name("gender"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "性别/20101##");
+
+ /**
+ * The column win_user.birth.
+ */
+ public final TableField Birth = createField(DSL.name("birth"), org.jooq.impl.SQLDataType.LOCALDATE.nullable(false), this, "生日");
+
+ /**
+ * The column win_user.avatar.
+ */
+ public final TableField Avatar = createField(DSL.name("avatar"), org.jooq.impl.SQLDataType.VARCHAR(200).nullable(false), this, "头像");
+
+ /**
+ * The column win_user.country.
+ */
+ public final TableField Country = createField(DSL.name("country"), org.jooq.impl.SQLDataType.CHAR(2).nullable(false), this, "国家/地区");
+
+ /**
+ * The column win_user.language.
+ */
+ public final TableField Language = createField(DSL.name("language"), org.jooq.impl.SQLDataType.CHAR(5).nullable(false), this, "使用语言");
+
+ /**
+ * The column win_user.timezone.
+ */
+ public final TableField Timezone = createField(DSL.name("timezone"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "所在时区");
+
+ /**
+ * The column win_user.auth_set.
+ */
+ public final TableField AuthSet = createField(DSL.name("auth_set"), org.jooq.impl.SQLDataType.VARCHAR(2000).nullable(false).defaultValue(org.jooq.impl.DSL.inline("", org.jooq.impl.SQLDataType.VARCHAR)), this, "权限集:authority#401####,逗号分割");
+
+ /**
+ * The column win_user.role_set.
+ */
+ public final TableField RoleSet = createField(DSL.name("role_set"), org.jooq.impl.SQLDataType.VARCHAR(1000).nullable(false).defaultValue(org.jooq.impl.DSL.inline("", org.jooq.impl.SQLDataType.VARCHAR)), this, "角色集:win_auth_role.id,逗号分割");
+
+ /**
+ * The column win_user.status.
+ */
+ public final TableField Status = createField(DSL.name("status"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "用户状态/41101##");
+
+ /**
+ * Create a win_user table reference
+ */
+ public WinUserTable() {
+ this(DSL.name("win_user"), null);
+ }
+
+ /**
+ * Create an aliased win_user table reference
+ */
+ public WinUserTable(String alias) {
+ this(DSL.name(alias), WinUser);
+ }
+
+ /**
+ * Create an aliased win_user table reference
+ */
+ public WinUserTable(Name alias) {
+ this(alias, WinUser);
+ }
+
+ private WinUserTable(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private WinUserTable(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment("411/用户"));
+ }
+
+ @Override
+ public Schema getSchema() {
+ return DefaultSchema.DEFAULT_SCHEMA;
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Internal.createUniqueKey(pro.fessional.wings.example.database.autogen.tables.WinUserTable.WinUser, "KEY_win_user_PRIMARY", pro.fessional.wings.example.database.autogen.tables.WinUserTable.WinUser.Id);
+ }
+
+ @Override
+ public List> getKeys() {
+ return Arrays.>asList(
+ Internal.createUniqueKey(pro.fessional.wings.example.database.autogen.tables.WinUserTable.WinUser, "KEY_win_user_PRIMARY", pro.fessional.wings.example.database.autogen.tables.WinUserTable.WinUser.Id)
+ );
+ }
+
+ @Override
+ public WinUserTable as(String alias) {
+ return new WinUserTable(DSL.name(alias), this);
+ }
+
+ @Override
+ public WinUserTable as(Name alias) {
+ return new WinUserTable(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public WinUserTable rename(String name) {
+ return new WinUserTable(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public WinUserTable rename(Name name) {
+ return new WinUserTable(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row15 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row15 fieldsRow() {
+ return (Row15) super.fieldsRow();
+ }
+
+ /**
+ * The column delete_dt condition
+ */
+ public final Condition onlyDiedData = DeleteDt.gt(EmptyValue.DATE_TIME);
+ public final Condition onlyLiveData = DeleteDt.eq(EmptyValue.DATE_TIME);
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/daos/WinAuthRoleDao.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/daos/WinAuthRoleDao.java
new file mode 100644
index 000000000..fa6b4d706
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/daos/WinAuthRoleDao.java
@@ -0,0 +1,125 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.daos;
+
+
+import org.jooq.Configuration;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+import pro.fessional.wings.example.database.autogen.tables.WinAuthRoleTable;
+import pro.fessional.wings.example.database.autogen.tables.pojos.WinAuthRole;
+import pro.fessional.wings.example.database.autogen.tables.records.WinAuthRoleRecord;
+import pro.fessional.wings.faceless.database.common.WingsJooqDaoImpl;
+
+import javax.annotation.Generated;
+import java.time.LocalDateTime;
+import java.util.List;
+
+
+/**
+ * The table wings_0.win_auth_role.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Repository
+public class WinAuthRoleDao extends WingsJooqDaoImpl {
+
+ /**
+ * Create a new WinAuthRoleDao without any configuration
+ */
+ public WinAuthRoleDao() {
+ super(WinAuthRoleTable.WinAuthRole, WinAuthRoleTable.asS1, WinAuthRole.class);
+ }
+
+ /**
+ * Create a new WinAuthRoleDao with an attached configuration
+ */
+ @Autowired
+ public WinAuthRoleDao(Configuration configuration) {
+ super(WinAuthRoleTable.WinAuthRole, WinAuthRoleTable.asS1, WinAuthRole.class, configuration);
+ }
+
+ @Override
+ public Long getId(WinAuthRole object) {
+ return object.getId();
+ }
+
+ /**
+ * Fetch records that have id IN (values)
+ */
+ public List fetchById(Long... values) {
+ return fetch(WinAuthRoleTable.asS1.Id, values);
+ }
+
+ /**
+ * Fetch a unique record that has id = value
+ */
+ public WinAuthRole fetchOneById(Long value) {
+ return fetchOne(WinAuthRoleTable.asS1.Id, value);
+ }
+
+ /**
+ * Fetch records that have create_dt IN (values)
+ */
+ public List fetchByCreateDt(LocalDateTime... values) {
+ return fetch(WinAuthRoleTable.asS1.CreateDt, values);
+ }
+
+ /**
+ * Fetch records that have modify_dt IN (values)
+ */
+ public List fetchByModifyDt(LocalDateTime... values) {
+ return fetch(WinAuthRoleTable.asS1.ModifyDt, values);
+ }
+
+ /**
+ * Fetch records that have delete_dt IN (values)
+ */
+ public List fetchByDeleteDt(LocalDateTime... values) {
+ return fetch(WinAuthRoleTable.asS1.DeleteDt, values);
+ }
+
+ /**
+ * Fetch records that have commit_id IN (values)
+ */
+ public List fetchByCommitId(Long... values) {
+ return fetch(WinAuthRoleTable.asS1.CommitId, values);
+ }
+
+ /**
+ * Fetch records that have role_type IN (values)
+ */
+ public List fetchByRoleType(Integer... values) {
+ return fetch(WinAuthRoleTable.asS1.RoleType, values);
+ }
+
+ /**
+ * Fetch records that have role_name IN (values)
+ */
+ public List fetchByRoleName(String... values) {
+ return fetch(WinAuthRoleTable.asS1.RoleName, values);
+ }
+
+ /**
+ * Fetch records that have desc IN (values)
+ */
+ public List fetchByDesc(String... values) {
+ return fetch(WinAuthRoleTable.asS1.Desc, values);
+ }
+
+ /**
+ * Fetch records that have auth_set IN (values)
+ */
+ public List fetchByAuthSet(String... values) {
+ return fetch(WinAuthRoleTable.asS1.AuthSet, values);
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/daos/WinUserDao.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/daos/WinUserDao.java
new file mode 100644
index 000000000..f7ab69cec
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/daos/WinUserDao.java
@@ -0,0 +1,170 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.daos;
+
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.jooq.Configuration;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import pro.fessional.wings.example.database.autogen.tables.WinUserTable;
+import pro.fessional.wings.example.database.autogen.tables.pojos.WinUser;
+import pro.fessional.wings.example.database.autogen.tables.records.WinUserRecord;
+import pro.fessional.wings.faceless.database.common.WingsJooqDaoImpl;
+
+
+/**
+ * The table wings_0.win_user.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Repository
+public class WinUserDao extends WingsJooqDaoImpl {
+
+ /**
+ * Create a new WinUserDao without any configuration
+ */
+ public WinUserDao() {
+ super(WinUserTable.WinUser, WinUserTable.asZ7, WinUser.class);
+ }
+
+ /**
+ * Create a new WinUserDao with an attached configuration
+ */
+ @Autowired
+ public WinUserDao(Configuration configuration) {
+ super(WinUserTable.WinUser, WinUserTable.asZ7, WinUser.class, configuration);
+ }
+
+ @Override
+ public Long getId(WinUser object) {
+ return object.getId();
+ }
+
+ /**
+ * Fetch records that have id IN (values)
+ */
+ public List fetchById(Long... values) {
+ return fetch(WinUserTable.asZ7.Id, values);
+ }
+
+ /**
+ * Fetch a unique record that has id = value
+ */
+ public WinUser fetchOneById(Long value) {
+ return fetchOne(WinUserTable.asZ7.Id, value);
+ }
+
+ /**
+ * Fetch records that have create_dt IN (values)
+ */
+ public List fetchByCreateDt(LocalDateTime... values) {
+ return fetch(WinUserTable.asZ7.CreateDt, values);
+ }
+
+ /**
+ * Fetch records that have modify_dt IN (values)
+ */
+ public List fetchByModifyDt(LocalDateTime... values) {
+ return fetch(WinUserTable.asZ7.ModifyDt, values);
+ }
+
+ /**
+ * Fetch records that have delete_dt IN (values)
+ */
+ public List fetchByDeleteDt(LocalDateTime... values) {
+ return fetch(WinUserTable.asZ7.DeleteDt, values);
+ }
+
+ /**
+ * Fetch records that have commit_id IN (values)
+ */
+ public List fetchByCommitId(Long... values) {
+ return fetch(WinUserTable.asZ7.CommitId, values);
+ }
+
+ /**
+ * Fetch records that have name IN (values)
+ */
+ public List fetchByName(String... values) {
+ return fetch(WinUserTable.asZ7.Name, values);
+ }
+
+ /**
+ * Fetch records that have gender IN (values)
+ */
+ public List fetchByGender(Integer... values) {
+ return fetch(WinUserTable.asZ7.Gender, values);
+ }
+
+ /**
+ * Fetch records that have birth IN (values)
+ */
+ public List fetchByBirth(LocalDate... values) {
+ return fetch(WinUserTable.asZ7.Birth, values);
+ }
+
+ /**
+ * Fetch records that have avatar IN (values)
+ */
+ public List fetchByAvatar(String... values) {
+ return fetch(WinUserTable.asZ7.Avatar, values);
+ }
+
+ /**
+ * Fetch records that have country IN (values)
+ */
+ public List fetchByCountry(String... values) {
+ return fetch(WinUserTable.asZ7.Country, values);
+ }
+
+ /**
+ * Fetch records that have language IN (values)
+ */
+ public List fetchByLanguage(String... values) {
+ return fetch(WinUserTable.asZ7.Language, values);
+ }
+
+ /**
+ * Fetch records that have timezone IN (values)
+ */
+ public List fetchByTimezone(Integer... values) {
+ return fetch(WinUserTable.asZ7.Timezone, values);
+ }
+
+ /**
+ * Fetch records that have auth_set IN (values)
+ */
+ public List fetchByAuthSet(String... values) {
+ return fetch(WinUserTable.asZ7.AuthSet, values);
+ }
+
+ /**
+ * Fetch records that have role_set IN (values)
+ */
+ public List fetchByRoleSet(String... values) {
+ return fetch(WinUserTable.asZ7.RoleSet, values);
+ }
+
+ /**
+ * Fetch records that have status IN (values)
+ */
+ public List fetchByStatus(Integer... values) {
+ return fetch(WinUserTable.asZ7.Status, values);
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/daos/WinUserLoginDao.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/daos/WinUserLoginDao.java
new file mode 100644
index 000000000..9b1067863
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/daos/WinUserLoginDao.java
@@ -0,0 +1,162 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.daos;
+
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.jooq.Configuration;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import pro.fessional.wings.example.database.autogen.tables.WinUserLoginTable;
+import pro.fessional.wings.example.database.autogen.tables.pojos.WinUserLogin;
+import pro.fessional.wings.example.database.autogen.tables.records.WinUserLoginRecord;
+import pro.fessional.wings.faceless.database.common.WingsJooqDaoImpl;
+
+
+/**
+ * The table wings_0.win_user_login.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Repository
+public class WinUserLoginDao extends WingsJooqDaoImpl {
+
+ /**
+ * Create a new WinUserLoginDao without any configuration
+ */
+ public WinUserLoginDao() {
+ super(WinUserLoginTable.WinUserLogin, WinUserLoginTable.asA2, WinUserLogin.class);
+ }
+
+ /**
+ * Create a new WinUserLoginDao with an attached configuration
+ */
+ @Autowired
+ public WinUserLoginDao(Configuration configuration) {
+ super(WinUserLoginTable.WinUserLogin, WinUserLoginTable.asA2, WinUserLogin.class, configuration);
+ }
+
+ @Override
+ public Long getId(WinUserLogin object) {
+ return object.getId();
+ }
+
+ /**
+ * Fetch records that have id IN (values)
+ */
+ public List fetchById(Long... values) {
+ return fetch(WinUserLoginTable.asA2.Id, values);
+ }
+
+ /**
+ * Fetch a unique record that has id = value
+ */
+ public WinUserLogin fetchOneById(Long value) {
+ return fetchOne(WinUserLoginTable.asA2.Id, value);
+ }
+
+ /**
+ * Fetch records that have create_dt IN (values)
+ */
+ public List fetchByCreateDt(LocalDateTime... values) {
+ return fetch(WinUserLoginTable.asA2.CreateDt, values);
+ }
+
+ /**
+ * Fetch records that have modify_dt IN (values)
+ */
+ public List fetchByModifyDt(LocalDateTime... values) {
+ return fetch(WinUserLoginTable.asA2.ModifyDt, values);
+ }
+
+ /**
+ * Fetch records that have delete_dt IN (values)
+ */
+ public List fetchByDeleteDt(LocalDateTime... values) {
+ return fetch(WinUserLoginTable.asA2.DeleteDt, values);
+ }
+
+ /**
+ * Fetch records that have commit_id IN (values)
+ */
+ public List fetchByCommitId(Long... values) {
+ return fetch(WinUserLoginTable.asA2.CommitId, values);
+ }
+
+ /**
+ * Fetch records that have user_id IN (values)
+ */
+ public List fetchByUserId(Long... values) {
+ return fetch(WinUserLoginTable.asA2.UserId, values);
+ }
+
+ /**
+ * Fetch records that have login_type IN (values)
+ */
+ public List fetchByLoginType(Integer... values) {
+ return fetch(WinUserLoginTable.asA2.LoginType, values);
+ }
+
+ /**
+ * Fetch records that have login_name IN (values)
+ */
+ public List fetchByLoginName(String... values) {
+ return fetch(WinUserLoginTable.asA2.LoginName, values);
+ }
+
+ /**
+ * Fetch records that have login_pass IN (values)
+ */
+ public List fetchByLoginPass(String... values) {
+ return fetch(WinUserLoginTable.asA2.LoginPass, values);
+ }
+
+ /**
+ * Fetch records that have login_salt IN (values)
+ */
+ public List fetchByLoginSalt(String... values) {
+ return fetch(WinUserLoginTable.asA2.LoginSalt, values);
+ }
+
+ /**
+ * Fetch records that have login_para IN (values)
+ */
+ public List fetchByLoginPara(String... values) {
+ return fetch(WinUserLoginTable.asA2.LoginPara, values);
+ }
+
+ /**
+ * Fetch records that have auth_code IN (values)
+ */
+ public List fetchByAuthCode(String... values) {
+ return fetch(WinUserLoginTable.asA2.AuthCode, values);
+ }
+
+ /**
+ * Fetch records that have bad_count IN (values)
+ */
+ public List fetchByBadCount(Integer... values) {
+ return fetch(WinUserLoginTable.asA2.BadCount, values);
+ }
+
+ /**
+ * Fetch records that have status IN (values)
+ */
+ public List fetchByStatus(Integer... values) {
+ return fetch(WinUserLoginTable.asA2.Status, values);
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/interfaces/IWinAuthRole.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/interfaces/IWinAuthRole.java
new file mode 100644
index 000000000..c01c28866
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/interfaces/IWinAuthRole.java
@@ -0,0 +1,162 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.interfaces;
+
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+import javax.annotation.Generated;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import pro.fessional.wings.faceless.service.journal.JournalAware;
+
+
+/**
+ * The table wings_0.win_auth_role.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Entity
+@Table(name = "win_auth_role", uniqueConstraints = {
+ @UniqueConstraint(name = "KEY_win_auth_role_PRIMARY", columnNames = {"id"})
+})
+public interface IWinAuthRole extends JournalAware, Serializable {
+
+ /**
+ * Setter for win_auth_role.id.
+ */
+ public void setId(Long value);
+
+ /**
+ * Getter for win_auth_role.id.
+ */
+ @Id
+ @Column(name = "id", nullable = false, precision = 19)
+ @NotNull
+ public Long getId();
+
+ /**
+ * Setter for win_auth_role.create_dt.
+ */
+ public void setCreateDt(LocalDateTime value);
+
+ /**
+ * Getter for win_auth_role.create_dt.
+ */
+ @Column(name = "create_dt", nullable = false)
+ public LocalDateTime getCreateDt();
+
+ /**
+ * Setter for win_auth_role.modify_dt.
+ */
+ public void setModifyDt(LocalDateTime value);
+
+ /**
+ * Getter for win_auth_role.modify_dt.
+ */
+ @Column(name = "modify_dt", nullable = false)
+ public LocalDateTime getModifyDt();
+
+ /**
+ * Setter for win_auth_role.delete_dt.
+ */
+ public void setDeleteDt(LocalDateTime value);
+
+ /**
+ * Getter for win_auth_role.delete_dt.
+ */
+ @Column(name = "delete_dt", nullable = false)
+ public LocalDateTime getDeleteDt();
+
+ /**
+ * Setter for win_auth_role.commit_id.
+ */
+ public void setCommitId(Long value);
+
+ /**
+ * Getter for win_auth_role.commit_id.
+ */
+ @Column(name = "commit_id", nullable = false, precision = 19)
+ @NotNull
+ public Long getCommitId();
+
+ /**
+ * Setter for win_auth_role.role_type.
+ */
+ public void setRoleType(Integer value);
+
+ /**
+ * Getter for win_auth_role.role_type.
+ */
+ @Column(name = "role_type", nullable = false, precision = 10)
+ @NotNull
+ public Integer getRoleType();
+
+ /**
+ * Setter for win_auth_role.role_name.
+ */
+ public void setRoleName(String value);
+
+ /**
+ * Getter for win_auth_role.role_name.
+ */
+ @Column(name = "role_name", nullable = false, length = 100)
+ @NotNull
+ @Size(max = 100)
+ public String getRoleName();
+
+ /**
+ * Setter for win_auth_role.desc.
+ */
+ public void setDesc(String value);
+
+ /**
+ * Getter for win_auth_role.desc.
+ */
+ @Column(name = "desc", nullable = false, length = 200)
+ @Size(max = 200)
+ public String getDesc();
+
+ /**
+ * Setter for win_auth_role.auth_set.
+ */
+ public void setAuthSet(String value);
+
+ /**
+ * Getter for win_auth_role.auth_set.
+ */
+ @Column(name = "auth_set", nullable = false, length = 3000)
+ @NotNull
+ @Size(max = 3000)
+ public String getAuthSet();
+
+ // -------------------------------------------------------------------------
+ // FROM and INTO
+ // -------------------------------------------------------------------------
+
+ /**
+ * Load data from another generated Record/POJO implementing the common interface IWinAuthRole
+ */
+ public void from(pro.fessional.wings.example.database.autogen.tables.interfaces.IWinAuthRole from);
+
+ /**
+ * Copy data into another generated Record/POJO implementing the common interface IWinAuthRole
+ */
+ public E into(E into);
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/interfaces/IWinUser.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/interfaces/IWinUser.java
new file mode 100644
index 000000000..79b87668f
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/interfaces/IWinUser.java
@@ -0,0 +1,236 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.interfaces;
+
+
+import pro.fessional.wings.faceless.service.journal.JournalAware;
+
+import javax.annotation.Generated;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+
+/**
+ * The table wings_0.win_user.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Entity
+@Table(name = "win_user", uniqueConstraints = {
+ @UniqueConstraint(name = "KEY_win_user_PRIMARY", columnNames = {"id"})
+})
+public interface IWinUser extends JournalAware, Serializable {
+
+ /**
+ * Setter for win_user.id.
+ */
+ public void setId(Long value);
+
+ /**
+ * Getter for win_user.id.
+ */
+ @Id
+ @Column(name = "id", nullable = false, precision = 19)
+ @NotNull
+ public Long getId();
+
+ /**
+ * Setter for win_user.create_dt.
+ */
+ public void setCreateDt(LocalDateTime value);
+
+ /**
+ * Getter for win_user.create_dt.
+ */
+ @Column(name = "create_dt", nullable = false)
+ public LocalDateTime getCreateDt();
+
+ /**
+ * Setter for win_user.modify_dt.
+ */
+ public void setModifyDt(LocalDateTime value);
+
+ /**
+ * Getter for win_user.modify_dt.
+ */
+ @Column(name = "modify_dt", nullable = false)
+ public LocalDateTime getModifyDt();
+
+ /**
+ * Setter for win_user.delete_dt.
+ */
+ public void setDeleteDt(LocalDateTime value);
+
+ /**
+ * Getter for win_user.delete_dt.
+ */
+ @Column(name = "delete_dt", nullable = false)
+ public LocalDateTime getDeleteDt();
+
+ /**
+ * Setter for win_user.commit_id.
+ */
+ public void setCommitId(Long value);
+
+ /**
+ * Getter for win_user.commit_id.
+ */
+ @Column(name = "commit_id", nullable = false, precision = 19)
+ @NotNull
+ public Long getCommitId();
+
+ /**
+ * Setter for win_user.name.
+ */
+ public void setName(String value);
+
+ /**
+ * Getter for win_user.name.
+ */
+ @Column(name = "name", nullable = false, length = 50)
+ @NotNull
+ @Size(max = 50)
+ public String getName();
+
+ /**
+ * Setter for win_user.gender.
+ */
+ public void setGender(Integer value);
+
+ /**
+ * Getter for win_user.gender.
+ */
+ @Column(name = "gender", nullable = false, precision = 10)
+ @NotNull
+ public Integer getGender();
+
+ /**
+ * Setter for win_user.birth.
+ */
+ public void setBirth(LocalDate value);
+
+ /**
+ * Getter for win_user.birth.
+ */
+ @Column(name = "birth", nullable = false)
+ @NotNull
+ public LocalDate getBirth();
+
+ /**
+ * Setter for win_user.avatar.
+ */
+ public void setAvatar(String value);
+
+ /**
+ * Getter for win_user.avatar.
+ */
+ @Column(name = "avatar", nullable = false, length = 200)
+ @NotNull
+ @Size(max = 200)
+ public String getAvatar();
+
+ /**
+ * Setter for win_user.country.
+ */
+ public void setCountry(String value);
+
+ /**
+ * Getter for win_user.country.
+ */
+ @Column(name = "country", nullable = false, length = 2)
+ @NotNull
+ @Size(max = 2)
+ public String getCountry();
+
+ /**
+ * Setter for win_user.language.
+ */
+ public void setLanguage(String value);
+
+ /**
+ * Getter for win_user.language.
+ */
+ @Column(name = "language", nullable = false, length = 5)
+ @NotNull
+ @Size(max = 5)
+ public String getLanguage();
+
+ /**
+ * Setter for win_user.timezone.
+ */
+ public void setTimezone(Integer value);
+
+ /**
+ * Getter for win_user.timezone.
+ */
+ @Column(name = "timezone", nullable = false, precision = 10)
+ @NotNull
+ public Integer getTimezone();
+
+ /**
+ * Setter for win_user.auth_set.
+ */
+ public void setAuthSet(String value);
+
+ /**
+ * Getter for win_user.auth_set.
+ */
+ @Column(name = "auth_set", nullable = false, length = 2000)
+ @Size(max = 2000)
+ public String getAuthSet();
+
+ /**
+ * Setter for win_user.role_set.
+ */
+ public void setRoleSet(String value);
+
+ /**
+ * Getter for win_user.role_set.
+ */
+ @Column(name = "role_set", nullable = false, length = 1000)
+ @Size(max = 1000)
+ public String getRoleSet();
+
+ /**
+ * Setter for win_user.status.
+ */
+ public void setStatus(Integer value);
+
+ /**
+ * Getter for win_user.status.
+ */
+ @Column(name = "status", nullable = false, precision = 10)
+ @NotNull
+ public Integer getStatus();
+
+ // -------------------------------------------------------------------------
+ // FROM and INTO
+ // -------------------------------------------------------------------------
+
+ /**
+ * Load data from another generated Record/POJO implementing the common interface IWinUser
+ */
+ public void from(pro.fessional.wings.example.database.autogen.tables.interfaces.IWinUser from);
+
+ /**
+ * Copy data into another generated Record/POJO implementing the common interface IWinUser
+ */
+ public E into(E into);
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/interfaces/IWinUserLogin.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/interfaces/IWinUserLogin.java
new file mode 100644
index 000000000..7ae3592ca
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/interfaces/IWinUserLogin.java
@@ -0,0 +1,222 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.interfaces;
+
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+import javax.annotation.Generated;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import pro.fessional.wings.faceless.service.journal.JournalAware;
+
+
+/**
+ * The table wings_0.win_user_login.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Entity
+@Table(name = "win_user_login", uniqueConstraints = {
+ @UniqueConstraint(name = "KEY_win_user_login_PRIMARY", columnNames = {"id"})
+})
+public interface IWinUserLogin extends JournalAware, Serializable {
+
+ /**
+ * Setter for win_user_login.id.
+ */
+ public void setId(Long value);
+
+ /**
+ * Getter for win_user_login.id.
+ */
+ @Id
+ @Column(name = "id", nullable = false, precision = 19)
+ @NotNull
+ public Long getId();
+
+ /**
+ * Setter for win_user_login.create_dt.
+ */
+ public void setCreateDt(LocalDateTime value);
+
+ /**
+ * Getter for win_user_login.create_dt.
+ */
+ @Column(name = "create_dt", nullable = false)
+ public LocalDateTime getCreateDt();
+
+ /**
+ * Setter for win_user_login.modify_dt.
+ */
+ public void setModifyDt(LocalDateTime value);
+
+ /**
+ * Getter for win_user_login.modify_dt.
+ */
+ @Column(name = "modify_dt", nullable = false)
+ public LocalDateTime getModifyDt();
+
+ /**
+ * Setter for win_user_login.delete_dt.
+ */
+ public void setDeleteDt(LocalDateTime value);
+
+ /**
+ * Getter for win_user_login.delete_dt.
+ */
+ @Column(name = "delete_dt", nullable = false)
+ public LocalDateTime getDeleteDt();
+
+ /**
+ * Setter for win_user_login.commit_id.
+ */
+ public void setCommitId(Long value);
+
+ /**
+ * Getter for win_user_login.commit_id.
+ */
+ @Column(name = "commit_id", nullable = false, precision = 19)
+ @NotNull
+ public Long getCommitId();
+
+ /**
+ * Setter for win_user_login.user_id.
+ */
+ public void setUserId(Long value);
+
+ /**
+ * Getter for win_user_login.user_id.
+ */
+ @Column(name = "user_id", nullable = false, precision = 19)
+ @NotNull
+ public Long getUserId();
+
+ /**
+ * Setter for win_user_login.login_type.
+ */
+ public void setLoginType(Integer value);
+
+ /**
+ * Getter for win_user_login.login_type.
+ */
+ @Column(name = "login_type", nullable = false, precision = 10)
+ @NotNull
+ public Integer getLoginType();
+
+ /**
+ * Setter for win_user_login.login_name.
+ */
+ public void setLoginName(String value);
+
+ /**
+ * Getter for win_user_login.login_name.
+ */
+ @Column(name = "login_name", nullable = false, length = 200)
+ @NotNull
+ @Size(max = 200)
+ public String getLoginName();
+
+ /**
+ * Setter for win_user_login.login_pass.
+ */
+ public void setLoginPass(String value);
+
+ /**
+ * Getter for win_user_login.login_pass.
+ */
+ @Column(name = "login_pass", nullable = false, length = 200)
+ @NotNull
+ @Size(max = 200)
+ public String getLoginPass();
+
+ /**
+ * Setter for win_user_login.login_salt.
+ */
+ public void setLoginSalt(String value);
+
+ /**
+ * Getter for win_user_login.login_salt.
+ */
+ @Column(name = "login_salt", nullable = false, length = 100)
+ @Size(max = 100)
+ public String getLoginSalt();
+
+ /**
+ * Setter for win_user_login.login_para.
+ */
+ public void setLoginPara(String value);
+
+ /**
+ * Getter for win_user_login.login_para.
+ */
+ @Column(name = "login_para", nullable = false, length = 2000)
+ @NotNull
+ @Size(max = 2000)
+ public String getLoginPara();
+
+ /**
+ * Setter for win_user_login.auth_code.
+ */
+ public void setAuthCode(String value);
+
+ /**
+ * Getter for win_user_login.auth_code.
+ */
+ @Column(name = "auth_code", nullable = false, length = 50)
+ @Size(max = 50)
+ public String getAuthCode();
+
+ /**
+ * Setter for win_user_login.bad_count.
+ */
+ public void setBadCount(Integer value);
+
+ /**
+ * Getter for win_user_login.bad_count.
+ */
+ @Column(name = "bad_count", nullable = false, precision = 10)
+ public Integer getBadCount();
+
+ /**
+ * Setter for win_user_login.status.
+ */
+ public void setStatus(Integer value);
+
+ /**
+ * Getter for win_user_login.status.
+ */
+ @Column(name = "status", nullable = false, precision = 10)
+ @NotNull
+ public Integer getStatus();
+
+ // -------------------------------------------------------------------------
+ // FROM and INTO
+ // -------------------------------------------------------------------------
+
+ /**
+ * Load data from another generated Record/POJO implementing the common interface IWinUserLogin
+ */
+ public void from(pro.fessional.wings.example.database.autogen.tables.interfaces.IWinUserLogin from);
+
+ /**
+ * Copy data into another generated Record/POJO implementing the common interface IWinUserLogin
+ */
+ public E into(E into);
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/pojos/WinAuthRole.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/pojos/WinAuthRole.java
new file mode 100644
index 000000000..11cc17111
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/pojos/WinAuthRole.java
@@ -0,0 +1,318 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.pojos;
+
+
+import java.time.LocalDateTime;
+
+import javax.annotation.Generated;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import pro.fessional.wings.example.database.autogen.tables.interfaces.IWinAuthRole;
+
+
+/**
+ * The table wings_0.win_auth_role.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Entity
+@Table(name = "win_auth_role", uniqueConstraints = {
+ @UniqueConstraint(name = "KEY_win_auth_role_PRIMARY", columnNames = {"id"})
+})
+public class WinAuthRole implements IWinAuthRole {
+
+ private static final long serialVersionUID = 957602074;
+
+ private Long id;
+ private LocalDateTime createDt;
+ private LocalDateTime modifyDt;
+ private LocalDateTime deleteDt;
+ private Long commitId;
+ private Integer roleType;
+ private String roleName;
+ private String desc;
+ private String authSet;
+
+ public WinAuthRole() {}
+
+ public WinAuthRole(IWinAuthRole value) {
+ this.id = value.getId();
+ this.createDt = value.getCreateDt();
+ this.modifyDt = value.getModifyDt();
+ this.deleteDt = value.getDeleteDt();
+ this.commitId = value.getCommitId();
+ this.roleType = value.getRoleType();
+ this.roleName = value.getRoleName();
+ this.desc = value.getDesc();
+ this.authSet = value.getAuthSet();
+ }
+
+ public WinAuthRole(
+ Long id,
+ LocalDateTime createDt,
+ LocalDateTime modifyDt,
+ LocalDateTime deleteDt,
+ Long commitId,
+ Integer roleType,
+ String roleName,
+ String desc,
+ String authSet
+ ) {
+ this.id = id;
+ this.createDt = createDt;
+ this.modifyDt = modifyDt;
+ this.deleteDt = deleteDt;
+ this.commitId = commitId;
+ this.roleType = roleType;
+ this.roleName = roleName;
+ this.desc = desc;
+ this.authSet = authSet;
+ }
+
+ @Id
+ @Column(name = "id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getId() {
+ return this.id;
+ }
+
+ @Override
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ @Column(name = "create_dt", nullable = false)
+ @Override
+ public LocalDateTime getCreateDt() {
+ return this.createDt;
+ }
+
+ @Override
+ public void setCreateDt(LocalDateTime createDt) {
+ this.createDt = createDt;
+ }
+
+ @Column(name = "modify_dt", nullable = false)
+ @Override
+ public LocalDateTime getModifyDt() {
+ return this.modifyDt;
+ }
+
+ @Override
+ public void setModifyDt(LocalDateTime modifyDt) {
+ this.modifyDt = modifyDt;
+ }
+
+ @Column(name = "delete_dt", nullable = false)
+ @Override
+ public LocalDateTime getDeleteDt() {
+ return this.deleteDt;
+ }
+
+ @Override
+ public void setDeleteDt(LocalDateTime deleteDt) {
+ this.deleteDt = deleteDt;
+ }
+
+ @Column(name = "commit_id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getCommitId() {
+ return this.commitId;
+ }
+
+ @Override
+ public void setCommitId(Long commitId) {
+ this.commitId = commitId;
+ }
+
+ @Column(name = "role_type", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getRoleType() {
+ return this.roleType;
+ }
+
+ @Override
+ public void setRoleType(Integer roleType) {
+ this.roleType = roleType;
+ }
+
+ @Column(name = "role_name", nullable = false, length = 100)
+ @NotNull
+ @Size(max = 100)
+ @Override
+ public String getRoleName() {
+ return this.roleName;
+ }
+
+ @Override
+ public void setRoleName(String roleName) {
+ this.roleName = roleName;
+ }
+
+ @Column(name = "desc", nullable = false, length = 200)
+ @Size(max = 200)
+ @Override
+ public String getDesc() {
+ return this.desc;
+ }
+
+ @Override
+ public void setDesc(String desc) {
+ this.desc = desc;
+ }
+
+ @Column(name = "auth_set", nullable = false, length = 3000)
+ @NotNull
+ @Size(max = 3000)
+ @Override
+ public String getAuthSet() {
+ return this.authSet;
+ }
+
+ @Override
+ public void setAuthSet(String authSet) {
+ this.authSet = authSet;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final WinAuthRole other = (WinAuthRole) obj;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ }
+ else if (!id.equals(other.id))
+ return false;
+ if (createDt == null) {
+ if (other.createDt != null)
+ return false;
+ }
+ else if (!createDt.equals(other.createDt))
+ return false;
+ if (modifyDt == null) {
+ if (other.modifyDt != null)
+ return false;
+ }
+ else if (!modifyDt.equals(other.modifyDt))
+ return false;
+ if (deleteDt == null) {
+ if (other.deleteDt != null)
+ return false;
+ }
+ else if (!deleteDt.equals(other.deleteDt))
+ return false;
+ if (commitId == null) {
+ if (other.commitId != null)
+ return false;
+ }
+ else if (!commitId.equals(other.commitId))
+ return false;
+ if (roleType == null) {
+ if (other.roleType != null)
+ return false;
+ }
+ else if (!roleType.equals(other.roleType))
+ return false;
+ if (roleName == null) {
+ if (other.roleName != null)
+ return false;
+ }
+ else if (!roleName.equals(other.roleName))
+ return false;
+ if (desc == null) {
+ if (other.desc != null)
+ return false;
+ }
+ else if (!desc.equals(other.desc))
+ return false;
+ if (authSet == null) {
+ if (other.authSet != null)
+ return false;
+ }
+ else if (!authSet.equals(other.authSet))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.id == null) ? 0 : this.id.hashCode());
+ result = prime * result + ((this.createDt == null) ? 0 : this.createDt.hashCode());
+ result = prime * result + ((this.modifyDt == null) ? 0 : this.modifyDt.hashCode());
+ result = prime * result + ((this.deleteDt == null) ? 0 : this.deleteDt.hashCode());
+ result = prime * result + ((this.commitId == null) ? 0 : this.commitId.hashCode());
+ result = prime * result + ((this.roleType == null) ? 0 : this.roleType.hashCode());
+ result = prime * result + ((this.roleName == null) ? 0 : this.roleName.hashCode());
+ result = prime * result + ((this.desc == null) ? 0 : this.desc.hashCode());
+ result = prime * result + ((this.authSet == null) ? 0 : this.authSet.hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("WinAuthRole (");
+
+ sb.append(id);
+ sb.append(", ").append(createDt);
+ sb.append(", ").append(modifyDt);
+ sb.append(", ").append(deleteDt);
+ sb.append(", ").append(commitId);
+ sb.append(", ").append(roleType);
+ sb.append(", ").append(roleName);
+ sb.append(", ").append(desc);
+ sb.append(", ").append(authSet);
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ // -------------------------------------------------------------------------
+ // FROM and INTO
+ // -------------------------------------------------------------------------
+
+ @Override
+ public void from(IWinAuthRole from) {
+ setId(from.getId());
+ setCreateDt(from.getCreateDt());
+ setModifyDt(from.getModifyDt());
+ setDeleteDt(from.getDeleteDt());
+ setCommitId(from.getCommitId());
+ setRoleType(from.getRoleType());
+ setRoleName(from.getRoleName());
+ setDesc(from.getDesc());
+ setAuthSet(from.getAuthSet());
+ }
+
+ @Override
+ public E into(E into) {
+ into.from(this);
+ return into;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/pojos/WinUser.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/pojos/WinUser.java
new file mode 100644
index 000000000..ae56d220b
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/pojos/WinUser.java
@@ -0,0 +1,471 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.pojos;
+
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+import javax.annotation.Generated;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import pro.fessional.wings.example.database.autogen.tables.interfaces.IWinUser;
+
+
+/**
+ * The table wings_0.win_user.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Entity
+@Table(name = "win_user", uniqueConstraints = {
+ @UniqueConstraint(name = "KEY_win_user_PRIMARY", columnNames = {"id"})
+})
+public class WinUser implements IWinUser {
+
+ private static final long serialVersionUID = 278994491;
+
+ private Long id;
+ private LocalDateTime createDt;
+ private LocalDateTime modifyDt;
+ private LocalDateTime deleteDt;
+ private Long commitId;
+ private String name;
+ private Integer gender;
+ private LocalDate birth;
+ private String avatar;
+ private String country;
+ private String language;
+ private Integer timezone;
+ private String authSet;
+ private String roleSet;
+ private Integer status;
+
+ public WinUser() {}
+
+ public WinUser(IWinUser value) {
+ this.id = value.getId();
+ this.createDt = value.getCreateDt();
+ this.modifyDt = value.getModifyDt();
+ this.deleteDt = value.getDeleteDt();
+ this.commitId = value.getCommitId();
+ this.name = value.getName();
+ this.gender = value.getGender();
+ this.birth = value.getBirth();
+ this.avatar = value.getAvatar();
+ this.country = value.getCountry();
+ this.language = value.getLanguage();
+ this.timezone = value.getTimezone();
+ this.authSet = value.getAuthSet();
+ this.roleSet = value.getRoleSet();
+ this.status = value.getStatus();
+ }
+
+ public WinUser(
+ Long id,
+ LocalDateTime createDt,
+ LocalDateTime modifyDt,
+ LocalDateTime deleteDt,
+ Long commitId,
+ String name,
+ Integer gender,
+ LocalDate birth,
+ String avatar,
+ String country,
+ String language,
+ Integer timezone,
+ String authSet,
+ String roleSet,
+ Integer status
+ ) {
+ this.id = id;
+ this.createDt = createDt;
+ this.modifyDt = modifyDt;
+ this.deleteDt = deleteDt;
+ this.commitId = commitId;
+ this.name = name;
+ this.gender = gender;
+ this.birth = birth;
+ this.avatar = avatar;
+ this.country = country;
+ this.language = language;
+ this.timezone = timezone;
+ this.authSet = authSet;
+ this.roleSet = roleSet;
+ this.status = status;
+ }
+
+ @Id
+ @Column(name = "id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getId() {
+ return this.id;
+ }
+
+ @Override
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ @Column(name = "create_dt", nullable = false)
+ @Override
+ public LocalDateTime getCreateDt() {
+ return this.createDt;
+ }
+
+ @Override
+ public void setCreateDt(LocalDateTime createDt) {
+ this.createDt = createDt;
+ }
+
+ @Column(name = "modify_dt", nullable = false)
+ @Override
+ public LocalDateTime getModifyDt() {
+ return this.modifyDt;
+ }
+
+ @Override
+ public void setModifyDt(LocalDateTime modifyDt) {
+ this.modifyDt = modifyDt;
+ }
+
+ @Column(name = "delete_dt", nullable = false)
+ @Override
+ public LocalDateTime getDeleteDt() {
+ return this.deleteDt;
+ }
+
+ @Override
+ public void setDeleteDt(LocalDateTime deleteDt) {
+ this.deleteDt = deleteDt;
+ }
+
+ @Column(name = "commit_id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getCommitId() {
+ return this.commitId;
+ }
+
+ @Override
+ public void setCommitId(Long commitId) {
+ this.commitId = commitId;
+ }
+
+ @Column(name = "name", nullable = false, length = 50)
+ @NotNull
+ @Size(max = 50)
+ @Override
+ public String getName() {
+ return this.name;
+ }
+
+ @Override
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Column(name = "gender", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getGender() {
+ return this.gender;
+ }
+
+ @Override
+ public void setGender(Integer gender) {
+ this.gender = gender;
+ }
+
+ @Column(name = "birth", nullable = false)
+ @NotNull
+ @Override
+ public LocalDate getBirth() {
+ return this.birth;
+ }
+
+ @Override
+ public void setBirth(LocalDate birth) {
+ this.birth = birth;
+ }
+
+ @Column(name = "avatar", nullable = false, length = 200)
+ @NotNull
+ @Size(max = 200)
+ @Override
+ public String getAvatar() {
+ return this.avatar;
+ }
+
+ @Override
+ public void setAvatar(String avatar) {
+ this.avatar = avatar;
+ }
+
+ @Column(name = "country", nullable = false, length = 2)
+ @NotNull
+ @Size(max = 2)
+ @Override
+ public String getCountry() {
+ return this.country;
+ }
+
+ @Override
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+ @Column(name = "language", nullable = false, length = 5)
+ @NotNull
+ @Size(max = 5)
+ @Override
+ public String getLanguage() {
+ return this.language;
+ }
+
+ @Override
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+
+ @Column(name = "timezone", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getTimezone() {
+ return this.timezone;
+ }
+
+ @Override
+ public void setTimezone(Integer timezone) {
+ this.timezone = timezone;
+ }
+
+ @Column(name = "auth_set", nullable = false, length = 2000)
+ @Size(max = 2000)
+ @Override
+ public String getAuthSet() {
+ return this.authSet;
+ }
+
+ @Override
+ public void setAuthSet(String authSet) {
+ this.authSet = authSet;
+ }
+
+ @Column(name = "role_set", nullable = false, length = 1000)
+ @Size(max = 1000)
+ @Override
+ public String getRoleSet() {
+ return this.roleSet;
+ }
+
+ @Override
+ public void setRoleSet(String roleSet) {
+ this.roleSet = roleSet;
+ }
+
+ @Column(name = "status", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getStatus() {
+ return this.status;
+ }
+
+ @Override
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final WinUser other = (WinUser) obj;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ }
+ else if (!id.equals(other.id))
+ return false;
+ if (createDt == null) {
+ if (other.createDt != null)
+ return false;
+ }
+ else if (!createDt.equals(other.createDt))
+ return false;
+ if (modifyDt == null) {
+ if (other.modifyDt != null)
+ return false;
+ }
+ else if (!modifyDt.equals(other.modifyDt))
+ return false;
+ if (deleteDt == null) {
+ if (other.deleteDt != null)
+ return false;
+ }
+ else if (!deleteDt.equals(other.deleteDt))
+ return false;
+ if (commitId == null) {
+ if (other.commitId != null)
+ return false;
+ }
+ else if (!commitId.equals(other.commitId))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ }
+ else if (!name.equals(other.name))
+ return false;
+ if (gender == null) {
+ if (other.gender != null)
+ return false;
+ }
+ else if (!gender.equals(other.gender))
+ return false;
+ if (birth == null) {
+ if (other.birth != null)
+ return false;
+ }
+ else if (!birth.equals(other.birth))
+ return false;
+ if (avatar == null) {
+ if (other.avatar != null)
+ return false;
+ }
+ else if (!avatar.equals(other.avatar))
+ return false;
+ if (country == null) {
+ if (other.country != null)
+ return false;
+ }
+ else if (!country.equals(other.country))
+ return false;
+ if (language == null) {
+ if (other.language != null)
+ return false;
+ }
+ else if (!language.equals(other.language))
+ return false;
+ if (timezone == null) {
+ if (other.timezone != null)
+ return false;
+ }
+ else if (!timezone.equals(other.timezone))
+ return false;
+ if (authSet == null) {
+ if (other.authSet != null)
+ return false;
+ }
+ else if (!authSet.equals(other.authSet))
+ return false;
+ if (roleSet == null) {
+ if (other.roleSet != null)
+ return false;
+ }
+ else if (!roleSet.equals(other.roleSet))
+ return false;
+ if (status == null) {
+ if (other.status != null)
+ return false;
+ }
+ else if (!status.equals(other.status))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.id == null) ? 0 : this.id.hashCode());
+ result = prime * result + ((this.createDt == null) ? 0 : this.createDt.hashCode());
+ result = prime * result + ((this.modifyDt == null) ? 0 : this.modifyDt.hashCode());
+ result = prime * result + ((this.deleteDt == null) ? 0 : this.deleteDt.hashCode());
+ result = prime * result + ((this.commitId == null) ? 0 : this.commitId.hashCode());
+ result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
+ result = prime * result + ((this.gender == null) ? 0 : this.gender.hashCode());
+ result = prime * result + ((this.birth == null) ? 0 : this.birth.hashCode());
+ result = prime * result + ((this.avatar == null) ? 0 : this.avatar.hashCode());
+ result = prime * result + ((this.country == null) ? 0 : this.country.hashCode());
+ result = prime * result + ((this.language == null) ? 0 : this.language.hashCode());
+ result = prime * result + ((this.timezone == null) ? 0 : this.timezone.hashCode());
+ result = prime * result + ((this.authSet == null) ? 0 : this.authSet.hashCode());
+ result = prime * result + ((this.roleSet == null) ? 0 : this.roleSet.hashCode());
+ result = prime * result + ((this.status == null) ? 0 : this.status.hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("WinUser (");
+
+ sb.append(id);
+ sb.append(", ").append(createDt);
+ sb.append(", ").append(modifyDt);
+ sb.append(", ").append(deleteDt);
+ sb.append(", ").append(commitId);
+ sb.append(", ").append(name);
+ sb.append(", ").append(gender);
+ sb.append(", ").append(birth);
+ sb.append(", ").append(avatar);
+ sb.append(", ").append(country);
+ sb.append(", ").append(language);
+ sb.append(", ").append(timezone);
+ sb.append(", ").append(authSet);
+ sb.append(", ").append(roleSet);
+ sb.append(", ").append(status);
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ // -------------------------------------------------------------------------
+ // FROM and INTO
+ // -------------------------------------------------------------------------
+
+ @Override
+ public void from(IWinUser from) {
+ setId(from.getId());
+ setCreateDt(from.getCreateDt());
+ setModifyDt(from.getModifyDt());
+ setDeleteDt(from.getDeleteDt());
+ setCommitId(from.getCommitId());
+ setName(from.getName());
+ setGender(from.getGender());
+ setBirth(from.getBirth());
+ setAvatar(from.getAvatar());
+ setCountry(from.getCountry());
+ setLanguage(from.getLanguage());
+ setTimezone(from.getTimezone());
+ setAuthSet(from.getAuthSet());
+ setRoleSet(from.getRoleSet());
+ setStatus(from.getStatus());
+ }
+
+ @Override
+ public E into(E into) {
+ into.from(this);
+ return into;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/pojos/WinUserLogin.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/pojos/WinUserLogin.java
new file mode 100644
index 000000000..7e7916e08
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/pojos/WinUserLogin.java
@@ -0,0 +1,442 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.pojos;
+
+
+import pro.fessional.wings.example.database.autogen.tables.interfaces.IWinUserLogin;
+
+import javax.annotation.Generated;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import java.time.LocalDateTime;
+
+
+/**
+ * The table wings_0.win_user_login.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Entity
+@Table(name = "win_user_login", uniqueConstraints = {
+ @UniqueConstraint(name = "KEY_win_user_login_PRIMARY", columnNames = {"id"})
+})
+public class WinUserLogin implements IWinUserLogin {
+
+ private static final long serialVersionUID = 1712656304;
+
+ private Long id;
+ private LocalDateTime createDt;
+ private LocalDateTime modifyDt;
+ private LocalDateTime deleteDt;
+ private Long commitId;
+ private Long userId;
+ private Integer loginType;
+ private String loginName;
+ private String loginPass;
+ private String loginSalt;
+ private String loginPara;
+ private String authCode;
+ private Integer badCount;
+ private Integer status;
+
+ public WinUserLogin() {}
+
+ public WinUserLogin(IWinUserLogin value) {
+ this.id = value.getId();
+ this.createDt = value.getCreateDt();
+ this.modifyDt = value.getModifyDt();
+ this.deleteDt = value.getDeleteDt();
+ this.commitId = value.getCommitId();
+ this.userId = value.getUserId();
+ this.loginType = value.getLoginType();
+ this.loginName = value.getLoginName();
+ this.loginPass = value.getLoginPass();
+ this.loginSalt = value.getLoginSalt();
+ this.loginPara = value.getLoginPara();
+ this.authCode = value.getAuthCode();
+ this.badCount = value.getBadCount();
+ this.status = value.getStatus();
+ }
+
+ public WinUserLogin(
+ Long id,
+ LocalDateTime createDt,
+ LocalDateTime modifyDt,
+ LocalDateTime deleteDt,
+ Long commitId,
+ Long userId,
+ Integer loginType,
+ String loginName,
+ String loginPass,
+ String loginSalt,
+ String loginPara,
+ String authCode,
+ Integer badCount,
+ Integer status
+ ) {
+ this.id = id;
+ this.createDt = createDt;
+ this.modifyDt = modifyDt;
+ this.deleteDt = deleteDt;
+ this.commitId = commitId;
+ this.userId = userId;
+ this.loginType = loginType;
+ this.loginName = loginName;
+ this.loginPass = loginPass;
+ this.loginSalt = loginSalt;
+ this.loginPara = loginPara;
+ this.authCode = authCode;
+ this.badCount = badCount;
+ this.status = status;
+ }
+
+ @Id
+ @Column(name = "id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getId() {
+ return this.id;
+ }
+
+ @Override
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ @Column(name = "create_dt", nullable = false)
+ @Override
+ public LocalDateTime getCreateDt() {
+ return this.createDt;
+ }
+
+ @Override
+ public void setCreateDt(LocalDateTime createDt) {
+ this.createDt = createDt;
+ }
+
+ @Column(name = "modify_dt", nullable = false)
+ @Override
+ public LocalDateTime getModifyDt() {
+ return this.modifyDt;
+ }
+
+ @Override
+ public void setModifyDt(LocalDateTime modifyDt) {
+ this.modifyDt = modifyDt;
+ }
+
+ @Column(name = "delete_dt", nullable = false)
+ @Override
+ public LocalDateTime getDeleteDt() {
+ return this.deleteDt;
+ }
+
+ @Override
+ public void setDeleteDt(LocalDateTime deleteDt) {
+ this.deleteDt = deleteDt;
+ }
+
+ @Column(name = "commit_id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getCommitId() {
+ return this.commitId;
+ }
+
+ @Override
+ public void setCommitId(Long commitId) {
+ this.commitId = commitId;
+ }
+
+ @Column(name = "user_id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getUserId() {
+ return this.userId;
+ }
+
+ @Override
+ public void setUserId(Long userId) {
+ this.userId = userId;
+ }
+
+ @Column(name = "login_type", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getLoginType() {
+ return this.loginType;
+ }
+
+ @Override
+ public void setLoginType(Integer loginType) {
+ this.loginType = loginType;
+ }
+
+ @Column(name = "login_name", nullable = false, length = 200)
+ @NotNull
+ @Size(max = 200)
+ @Override
+ public String getLoginName() {
+ return this.loginName;
+ }
+
+ @Override
+ public void setLoginName(String loginName) {
+ this.loginName = loginName;
+ }
+
+ @Column(name = "login_pass", nullable = false, length = 200)
+ @NotNull
+ @Size(max = 200)
+ @Override
+ public String getLoginPass() {
+ return this.loginPass;
+ }
+
+ @Override
+ public void setLoginPass(String loginPass) {
+ this.loginPass = loginPass;
+ }
+
+ @Column(name = "login_salt", nullable = false, length = 100)
+ @Size(max = 100)
+ @Override
+ public String getLoginSalt() {
+ return this.loginSalt;
+ }
+
+ @Override
+ public void setLoginSalt(String loginSalt) {
+ this.loginSalt = loginSalt;
+ }
+
+ @Column(name = "login_para", nullable = false, length = 2000)
+ @NotNull
+ @Size(max = 2000)
+ @Override
+ public String getLoginPara() {
+ return this.loginPara;
+ }
+
+ @Override
+ public void setLoginPara(String loginPara) {
+ this.loginPara = loginPara;
+ }
+
+ @Column(name = "auth_code", nullable = false, length = 50)
+ @Size(max = 50)
+ @Override
+ public String getAuthCode() {
+ return this.authCode;
+ }
+
+ @Override
+ public void setAuthCode(String authCode) {
+ this.authCode = authCode;
+ }
+
+ @Column(name = "bad_count", nullable = false, precision = 10)
+ @Override
+ public Integer getBadCount() {
+ return this.badCount;
+ }
+
+ @Override
+ public void setBadCount(Integer badCount) {
+ this.badCount = badCount;
+ }
+
+ @Column(name = "status", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getStatus() {
+ return this.status;
+ }
+
+ @Override
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final WinUserLogin other = (WinUserLogin) obj;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ }
+ else if (!id.equals(other.id))
+ return false;
+ if (createDt == null) {
+ if (other.createDt != null)
+ return false;
+ }
+ else if (!createDt.equals(other.createDt))
+ return false;
+ if (modifyDt == null) {
+ if (other.modifyDt != null)
+ return false;
+ }
+ else if (!modifyDt.equals(other.modifyDt))
+ return false;
+ if (deleteDt == null) {
+ if (other.deleteDt != null)
+ return false;
+ }
+ else if (!deleteDt.equals(other.deleteDt))
+ return false;
+ if (commitId == null) {
+ if (other.commitId != null)
+ return false;
+ }
+ else if (!commitId.equals(other.commitId))
+ return false;
+ if (userId == null) {
+ if (other.userId != null)
+ return false;
+ }
+ else if (!userId.equals(other.userId))
+ return false;
+ if (loginType == null) {
+ if (other.loginType != null)
+ return false;
+ }
+ else if (!loginType.equals(other.loginType))
+ return false;
+ if (loginName == null) {
+ if (other.loginName != null)
+ return false;
+ }
+ else if (!loginName.equals(other.loginName))
+ return false;
+ if (loginPass == null) {
+ if (other.loginPass != null)
+ return false;
+ }
+ else if (!loginPass.equals(other.loginPass))
+ return false;
+ if (loginSalt == null) {
+ if (other.loginSalt != null)
+ return false;
+ }
+ else if (!loginSalt.equals(other.loginSalt))
+ return false;
+ if (loginPara == null) {
+ if (other.loginPara != null)
+ return false;
+ }
+ else if (!loginPara.equals(other.loginPara))
+ return false;
+ if (authCode == null) {
+ if (other.authCode != null)
+ return false;
+ }
+ else if (!authCode.equals(other.authCode))
+ return false;
+ if (badCount == null) {
+ if (other.badCount != null)
+ return false;
+ }
+ else if (!badCount.equals(other.badCount))
+ return false;
+ if (status == null) {
+ if (other.status != null)
+ return false;
+ }
+ else if (!status.equals(other.status))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.id == null) ? 0 : this.id.hashCode());
+ result = prime * result + ((this.createDt == null) ? 0 : this.createDt.hashCode());
+ result = prime * result + ((this.modifyDt == null) ? 0 : this.modifyDt.hashCode());
+ result = prime * result + ((this.deleteDt == null) ? 0 : this.deleteDt.hashCode());
+ result = prime * result + ((this.commitId == null) ? 0 : this.commitId.hashCode());
+ result = prime * result + ((this.userId == null) ? 0 : this.userId.hashCode());
+ result = prime * result + ((this.loginType == null) ? 0 : this.loginType.hashCode());
+ result = prime * result + ((this.loginName == null) ? 0 : this.loginName.hashCode());
+ result = prime * result + ((this.loginPass == null) ? 0 : this.loginPass.hashCode());
+ result = prime * result + ((this.loginSalt == null) ? 0 : this.loginSalt.hashCode());
+ result = prime * result + ((this.loginPara == null) ? 0 : this.loginPara.hashCode());
+ result = prime * result + ((this.authCode == null) ? 0 : this.authCode.hashCode());
+ result = prime * result + ((this.badCount == null) ? 0 : this.badCount.hashCode());
+ result = prime * result + ((this.status == null) ? 0 : this.status.hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("WinUserLogin (");
+
+ sb.append(id);
+ sb.append(", ").append(createDt);
+ sb.append(", ").append(modifyDt);
+ sb.append(", ").append(deleteDt);
+ sb.append(", ").append(commitId);
+ sb.append(", ").append(userId);
+ sb.append(", ").append(loginType);
+ sb.append(", ").append(loginName);
+ sb.append(", ").append(loginPass);
+ sb.append(", ").append(loginSalt);
+ sb.append(", ").append(loginPara);
+ sb.append(", ").append(authCode);
+ sb.append(", ").append(badCount);
+ sb.append(", ").append(status);
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ // -------------------------------------------------------------------------
+ // FROM and INTO
+ // -------------------------------------------------------------------------
+
+ @Override
+ public void from(IWinUserLogin from) {
+ setId(from.getId());
+ setCreateDt(from.getCreateDt());
+ setModifyDt(from.getModifyDt());
+ setDeleteDt(from.getDeleteDt());
+ setCommitId(from.getCommitId());
+ setUserId(from.getUserId());
+ setLoginType(from.getLoginType());
+ setLoginName(from.getLoginName());
+ setLoginPass(from.getLoginPass());
+ setLoginSalt(from.getLoginSalt());
+ setLoginPara(from.getLoginPara());
+ setAuthCode(from.getAuthCode());
+ setBadCount(from.getBadCount());
+ setStatus(from.getStatus());
+ }
+
+ @Override
+ public E into(E into) {
+ into.from(this);
+ return into;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/records/WinAuthRoleRecord.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/records/WinAuthRoleRecord.java
new file mode 100644
index 000000000..a8d3f8abb
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/records/WinAuthRoleRecord.java
@@ -0,0 +1,487 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.records;
+
+
+import java.time.LocalDateTime;
+
+import javax.annotation.Generated;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.jooq.Field;
+import org.jooq.Record1;
+import org.jooq.Record9;
+import org.jooq.Row9;
+import org.jooq.impl.UpdatableRecordImpl;
+
+import pro.fessional.wings.example.database.autogen.tables.WinAuthRoleTable;
+import pro.fessional.wings.example.database.autogen.tables.interfaces.IWinAuthRole;
+
+
+/**
+ * The table wings_0.win_auth_role.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Entity
+@Table(name = "win_auth_role", uniqueConstraints = {
+ @UniqueConstraint(name = "KEY_win_auth_role_PRIMARY", columnNames = {"id"})
+})
+public class WinAuthRoleRecord extends UpdatableRecordImpl implements Record9, IWinAuthRole {
+
+ private static final long serialVersionUID = -2111176306;
+
+ /**
+ * Setter for win_auth_role.id.
+ */
+ @Override
+ public void setId(Long value) {
+ set(0, value);
+ }
+
+ /**
+ * Getter for win_auth_role.id.
+ */
+ @Id
+ @Column(name = "id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getId() {
+ return (Long) get(0);
+ }
+
+ /**
+ * Setter for win_auth_role.create_dt.
+ */
+ @Override
+ public void setCreateDt(LocalDateTime value) {
+ set(1, value);
+ }
+
+ /**
+ * Getter for win_auth_role.create_dt.
+ */
+ @Column(name = "create_dt", nullable = false)
+ @Override
+ public LocalDateTime getCreateDt() {
+ return (LocalDateTime) get(1);
+ }
+
+ /**
+ * Setter for win_auth_role.modify_dt.
+ */
+ @Override
+ public void setModifyDt(LocalDateTime value) {
+ set(2, value);
+ }
+
+ /**
+ * Getter for win_auth_role.modify_dt.
+ */
+ @Column(name = "modify_dt", nullable = false)
+ @Override
+ public LocalDateTime getModifyDt() {
+ return (LocalDateTime) get(2);
+ }
+
+ /**
+ * Setter for win_auth_role.delete_dt.
+ */
+ @Override
+ public void setDeleteDt(LocalDateTime value) {
+ set(3, value);
+ }
+
+ /**
+ * Getter for win_auth_role.delete_dt.
+ */
+ @Column(name = "delete_dt", nullable = false)
+ @Override
+ public LocalDateTime getDeleteDt() {
+ return (LocalDateTime) get(3);
+ }
+
+ /**
+ * Setter for win_auth_role.commit_id.
+ */
+ @Override
+ public void setCommitId(Long value) {
+ set(4, value);
+ }
+
+ /**
+ * Getter for win_auth_role.commit_id.
+ */
+ @Column(name = "commit_id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getCommitId() {
+ return (Long) get(4);
+ }
+
+ /**
+ * Setter for win_auth_role.role_type.
+ */
+ @Override
+ public void setRoleType(Integer value) {
+ set(5, value);
+ }
+
+ /**
+ * Getter for win_auth_role.role_type.
+ */
+ @Column(name = "role_type", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getRoleType() {
+ return (Integer) get(5);
+ }
+
+ /**
+ * Setter for win_auth_role.role_name.
+ */
+ @Override
+ public void setRoleName(String value) {
+ set(6, value);
+ }
+
+ /**
+ * Getter for win_auth_role.role_name.
+ */
+ @Column(name = "role_name", nullable = false, length = 100)
+ @NotNull
+ @Size(max = 100)
+ @Override
+ public String getRoleName() {
+ return (String) get(6);
+ }
+
+ /**
+ * Setter for win_auth_role.desc.
+ */
+ @Override
+ public void setDesc(String value) {
+ set(7, value);
+ }
+
+ /**
+ * Getter for win_auth_role.desc.
+ */
+ @Column(name = "desc", nullable = false, length = 200)
+ @Size(max = 200)
+ @Override
+ public String getDesc() {
+ return (String) get(7);
+ }
+
+ /**
+ * Setter for win_auth_role.auth_set.
+ */
+ @Override
+ public void setAuthSet(String value) {
+ set(8, value);
+ }
+
+ /**
+ * Getter for win_auth_role.auth_set.
+ */
+ @Column(name = "auth_set", nullable = false, length = 3000)
+ @NotNull
+ @Size(max = 3000)
+ @Override
+ public String getAuthSet() {
+ return (String) get(8);
+ }
+
+ // -------------------------------------------------------------------------
+ // Primary key information
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Record1 key() {
+ return (Record1) super.key();
+ }
+
+ // -------------------------------------------------------------------------
+ // Record9 type implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row9 fieldsRow() {
+ return (Row9) super.fieldsRow();
+ }
+
+ @Override
+ public Row9 valuesRow() {
+ return (Row9) super.valuesRow();
+ }
+
+ @Override
+ public Field field1() {
+ return WinAuthRoleTable.WinAuthRole.Id;
+ }
+
+ @Override
+ public Field field2() {
+ return WinAuthRoleTable.WinAuthRole.CreateDt;
+ }
+
+ @Override
+ public Field field3() {
+ return WinAuthRoleTable.WinAuthRole.ModifyDt;
+ }
+
+ @Override
+ public Field field4() {
+ return WinAuthRoleTable.WinAuthRole.DeleteDt;
+ }
+
+ @Override
+ public Field field5() {
+ return WinAuthRoleTable.WinAuthRole.CommitId;
+ }
+
+ @Override
+ public Field field6() {
+ return WinAuthRoleTable.WinAuthRole.RoleType;
+ }
+
+ @Override
+ public Field field7() {
+ return WinAuthRoleTable.WinAuthRole.RoleName;
+ }
+
+ @Override
+ public Field field8() {
+ return WinAuthRoleTable.WinAuthRole.Desc;
+ }
+
+ @Override
+ public Field field9() {
+ return WinAuthRoleTable.WinAuthRole.AuthSet;
+ }
+
+ @Override
+ public Long component1() {
+ return getId();
+ }
+
+ @Override
+ public LocalDateTime component2() {
+ return getCreateDt();
+ }
+
+ @Override
+ public LocalDateTime component3() {
+ return getModifyDt();
+ }
+
+ @Override
+ public LocalDateTime component4() {
+ return getDeleteDt();
+ }
+
+ @Override
+ public Long component5() {
+ return getCommitId();
+ }
+
+ @Override
+ public Integer component6() {
+ return getRoleType();
+ }
+
+ @Override
+ public String component7() {
+ return getRoleName();
+ }
+
+ @Override
+ public String component8() {
+ return getDesc();
+ }
+
+ @Override
+ public String component9() {
+ return getAuthSet();
+ }
+
+ @Override
+ public Long value1() {
+ return getId();
+ }
+
+ @Override
+ public LocalDateTime value2() {
+ return getCreateDt();
+ }
+
+ @Override
+ public LocalDateTime value3() {
+ return getModifyDt();
+ }
+
+ @Override
+ public LocalDateTime value4() {
+ return getDeleteDt();
+ }
+
+ @Override
+ public Long value5() {
+ return getCommitId();
+ }
+
+ @Override
+ public Integer value6() {
+ return getRoleType();
+ }
+
+ @Override
+ public String value7() {
+ return getRoleName();
+ }
+
+ @Override
+ public String value8() {
+ return getDesc();
+ }
+
+ @Override
+ public String value9() {
+ return getAuthSet();
+ }
+
+ @Override
+ public WinAuthRoleRecord value1(Long value) {
+ setId(value);
+ return this;
+ }
+
+ @Override
+ public WinAuthRoleRecord value2(LocalDateTime value) {
+ setCreateDt(value);
+ return this;
+ }
+
+ @Override
+ public WinAuthRoleRecord value3(LocalDateTime value) {
+ setModifyDt(value);
+ return this;
+ }
+
+ @Override
+ public WinAuthRoleRecord value4(LocalDateTime value) {
+ setDeleteDt(value);
+ return this;
+ }
+
+ @Override
+ public WinAuthRoleRecord value5(Long value) {
+ setCommitId(value);
+ return this;
+ }
+
+ @Override
+ public WinAuthRoleRecord value6(Integer value) {
+ setRoleType(value);
+ return this;
+ }
+
+ @Override
+ public WinAuthRoleRecord value7(String value) {
+ setRoleName(value);
+ return this;
+ }
+
+ @Override
+ public WinAuthRoleRecord value8(String value) {
+ setDesc(value);
+ return this;
+ }
+
+ @Override
+ public WinAuthRoleRecord value9(String value) {
+ setAuthSet(value);
+ return this;
+ }
+
+ @Override
+ public WinAuthRoleRecord values(Long value1, LocalDateTime value2, LocalDateTime value3, LocalDateTime value4, Long value5, Integer value6, String value7, String value8, String value9) {
+ value1(value1);
+ value2(value2);
+ value3(value3);
+ value4(value4);
+ value5(value5);
+ value6(value6);
+ value7(value7);
+ value8(value8);
+ value9(value9);
+ return this;
+ }
+
+ // -------------------------------------------------------------------------
+ // FROM and INTO
+ // -------------------------------------------------------------------------
+
+ @Override
+ public void from(IWinAuthRole from) {
+ setId(from.getId());
+ setCreateDt(from.getCreateDt());
+ setModifyDt(from.getModifyDt());
+ setDeleteDt(from.getDeleteDt());
+ setCommitId(from.getCommitId());
+ setRoleType(from.getRoleType());
+ setRoleName(from.getRoleName());
+ setDesc(from.getDesc());
+ setAuthSet(from.getAuthSet());
+ }
+
+ @Override
+ public E into(E into) {
+ into.from(this);
+ return into;
+ }
+
+ // -------------------------------------------------------------------------
+ // Constructors
+ // -------------------------------------------------------------------------
+
+ /**
+ * Create a detached WinAuthRoleRecord
+ */
+ public WinAuthRoleRecord() {
+ super(WinAuthRoleTable.WinAuthRole);
+ }
+
+ /**
+ * Create a detached, initialised WinAuthRoleRecord
+ */
+ public WinAuthRoleRecord(Long id, LocalDateTime createDt, LocalDateTime modifyDt, LocalDateTime deleteDt, Long commitId, Integer roleType, String roleName, String desc, String authSet) {
+ super(WinAuthRoleTable.WinAuthRole);
+
+ set(0, id);
+ set(1, createDt);
+ set(2, modifyDt);
+ set(3, deleteDt);
+ set(4, commitId);
+ set(5, roleType);
+ set(6, roleName);
+ set(7, desc);
+ set(8, authSet);
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/records/WinUserLoginRecord.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/records/WinUserLoginRecord.java
new file mode 100644
index 000000000..94a1e9088
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/records/WinUserLoginRecord.java
@@ -0,0 +1,697 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.records;
+
+
+import java.time.LocalDateTime;
+
+import javax.annotation.Generated;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.jooq.Field;
+import org.jooq.Record1;
+import org.jooq.Record14;
+import org.jooq.Row14;
+import org.jooq.impl.UpdatableRecordImpl;
+
+import pro.fessional.wings.example.database.autogen.tables.WinUserLoginTable;
+import pro.fessional.wings.example.database.autogen.tables.interfaces.IWinUserLogin;
+
+
+/**
+ * The table wings_0.win_user_login.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Entity
+@Table(name = "win_user_login", uniqueConstraints = {
+ @UniqueConstraint(name = "KEY_win_user_login_PRIMARY", columnNames = {"id"})
+})
+public class WinUserLoginRecord extends UpdatableRecordImpl implements Record14, IWinUserLogin {
+
+ private static final long serialVersionUID = -1547839635;
+
+ /**
+ * Setter for win_user_login.id.
+ */
+ @Override
+ public void setId(Long value) {
+ set(0, value);
+ }
+
+ /**
+ * Getter for win_user_login.id.
+ */
+ @Id
+ @Column(name = "id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getId() {
+ return (Long) get(0);
+ }
+
+ /**
+ * Setter for win_user_login.create_dt.
+ */
+ @Override
+ public void setCreateDt(LocalDateTime value) {
+ set(1, value);
+ }
+
+ /**
+ * Getter for win_user_login.create_dt.
+ */
+ @Column(name = "create_dt", nullable = false)
+ @Override
+ public LocalDateTime getCreateDt() {
+ return (LocalDateTime) get(1);
+ }
+
+ /**
+ * Setter for win_user_login.modify_dt.
+ */
+ @Override
+ public void setModifyDt(LocalDateTime value) {
+ set(2, value);
+ }
+
+ /**
+ * Getter for win_user_login.modify_dt.
+ */
+ @Column(name = "modify_dt", nullable = false)
+ @Override
+ public LocalDateTime getModifyDt() {
+ return (LocalDateTime) get(2);
+ }
+
+ /**
+ * Setter for win_user_login.delete_dt.
+ */
+ @Override
+ public void setDeleteDt(LocalDateTime value) {
+ set(3, value);
+ }
+
+ /**
+ * Getter for win_user_login.delete_dt.
+ */
+ @Column(name = "delete_dt", nullable = false)
+ @Override
+ public LocalDateTime getDeleteDt() {
+ return (LocalDateTime) get(3);
+ }
+
+ /**
+ * Setter for win_user_login.commit_id.
+ */
+ @Override
+ public void setCommitId(Long value) {
+ set(4, value);
+ }
+
+ /**
+ * Getter for win_user_login.commit_id.
+ */
+ @Column(name = "commit_id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getCommitId() {
+ return (Long) get(4);
+ }
+
+ /**
+ * Setter for win_user_login.user_id.
+ */
+ @Override
+ public void setUserId(Long value) {
+ set(5, value);
+ }
+
+ /**
+ * Getter for win_user_login.user_id.
+ */
+ @Column(name = "user_id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getUserId() {
+ return (Long) get(5);
+ }
+
+ /**
+ * Setter for win_user_login.login_type.
+ */
+ @Override
+ public void setLoginType(Integer value) {
+ set(6, value);
+ }
+
+ /**
+ * Getter for win_user_login.login_type.
+ */
+ @Column(name = "login_type", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getLoginType() {
+ return (Integer) get(6);
+ }
+
+ /**
+ * Setter for win_user_login.login_name.
+ */
+ @Override
+ public void setLoginName(String value) {
+ set(7, value);
+ }
+
+ /**
+ * Getter for win_user_login.login_name.
+ */
+ @Column(name = "login_name", nullable = false, length = 200)
+ @NotNull
+ @Size(max = 200)
+ @Override
+ public String getLoginName() {
+ return (String) get(7);
+ }
+
+ /**
+ * Setter for win_user_login.login_pass.
+ */
+ @Override
+ public void setLoginPass(String value) {
+ set(8, value);
+ }
+
+ /**
+ * Getter for win_user_login.login_pass.
+ */
+ @Column(name = "login_pass", nullable = false, length = 200)
+ @NotNull
+ @Size(max = 200)
+ @Override
+ public String getLoginPass() {
+ return (String) get(8);
+ }
+
+ /**
+ * Setter for win_user_login.login_salt.
+ */
+ @Override
+ public void setLoginSalt(String value) {
+ set(9, value);
+ }
+
+ /**
+ * Getter for win_user_login.login_salt.
+ */
+ @Column(name = "login_salt", nullable = false, length = 100)
+ @Size(max = 100)
+ @Override
+ public String getLoginSalt() {
+ return (String) get(9);
+ }
+
+ /**
+ * Setter for win_user_login.login_para.
+ */
+ @Override
+ public void setLoginPara(String value) {
+ set(10, value);
+ }
+
+ /**
+ * Getter for win_user_login.login_para.
+ */
+ @Column(name = "login_para", nullable = false, length = 2000)
+ @NotNull
+ @Size(max = 2000)
+ @Override
+ public String getLoginPara() {
+ return (String) get(10);
+ }
+
+ /**
+ * Setter for win_user_login.auth_code.
+ */
+ @Override
+ public void setAuthCode(String value) {
+ set(11, value);
+ }
+
+ /**
+ * Getter for win_user_login.auth_code.
+ */
+ @Column(name = "auth_code", nullable = false, length = 50)
+ @Size(max = 50)
+ @Override
+ public String getAuthCode() {
+ return (String) get(11);
+ }
+
+ /**
+ * Setter for win_user_login.bad_count.
+ */
+ @Override
+ public void setBadCount(Integer value) {
+ set(12, value);
+ }
+
+ /**
+ * Getter for win_user_login.bad_count.
+ */
+ @Column(name = "bad_count", nullable = false, precision = 10)
+ @Override
+ public Integer getBadCount() {
+ return (Integer) get(12);
+ }
+
+ /**
+ * Setter for win_user_login.status.
+ */
+ @Override
+ public void setStatus(Integer value) {
+ set(13, value);
+ }
+
+ /**
+ * Getter for win_user_login.status.
+ */
+ @Column(name = "status", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getStatus() {
+ return (Integer) get(13);
+ }
+
+ // -------------------------------------------------------------------------
+ // Primary key information
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Record1 key() {
+ return (Record1) super.key();
+ }
+
+ // -------------------------------------------------------------------------
+ // Record14 type implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row14 fieldsRow() {
+ return (Row14) super.fieldsRow();
+ }
+
+ @Override
+ public Row14 valuesRow() {
+ return (Row14) super.valuesRow();
+ }
+
+ @Override
+ public Field field1() {
+ return WinUserLoginTable.WinUserLogin.Id;
+ }
+
+ @Override
+ public Field field2() {
+ return WinUserLoginTable.WinUserLogin.CreateDt;
+ }
+
+ @Override
+ public Field field3() {
+ return WinUserLoginTable.WinUserLogin.ModifyDt;
+ }
+
+ @Override
+ public Field field4() {
+ return WinUserLoginTable.WinUserLogin.DeleteDt;
+ }
+
+ @Override
+ public Field field5() {
+ return WinUserLoginTable.WinUserLogin.CommitId;
+ }
+
+ @Override
+ public Field field6() {
+ return WinUserLoginTable.WinUserLogin.UserId;
+ }
+
+ @Override
+ public Field field7() {
+ return WinUserLoginTable.WinUserLogin.LoginType;
+ }
+
+ @Override
+ public Field field8() {
+ return WinUserLoginTable.WinUserLogin.LoginName;
+ }
+
+ @Override
+ public Field field9() {
+ return WinUserLoginTable.WinUserLogin.LoginPass;
+ }
+
+ @Override
+ public Field field10() {
+ return WinUserLoginTable.WinUserLogin.LoginSalt;
+ }
+
+ @Override
+ public Field field11() {
+ return WinUserLoginTable.WinUserLogin.LoginPara;
+ }
+
+ @Override
+ public Field field12() {
+ return WinUserLoginTable.WinUserLogin.AuthCode;
+ }
+
+ @Override
+ public Field field13() {
+ return WinUserLoginTable.WinUserLogin.BadCount;
+ }
+
+ @Override
+ public Field field14() {
+ return WinUserLoginTable.WinUserLogin.Status;
+ }
+
+ @Override
+ public Long component1() {
+ return getId();
+ }
+
+ @Override
+ public LocalDateTime component2() {
+ return getCreateDt();
+ }
+
+ @Override
+ public LocalDateTime component3() {
+ return getModifyDt();
+ }
+
+ @Override
+ public LocalDateTime component4() {
+ return getDeleteDt();
+ }
+
+ @Override
+ public Long component5() {
+ return getCommitId();
+ }
+
+ @Override
+ public Long component6() {
+ return getUserId();
+ }
+
+ @Override
+ public Integer component7() {
+ return getLoginType();
+ }
+
+ @Override
+ public String component8() {
+ return getLoginName();
+ }
+
+ @Override
+ public String component9() {
+ return getLoginPass();
+ }
+
+ @Override
+ public String component10() {
+ return getLoginSalt();
+ }
+
+ @Override
+ public String component11() {
+ return getLoginPara();
+ }
+
+ @Override
+ public String component12() {
+ return getAuthCode();
+ }
+
+ @Override
+ public Integer component13() {
+ return getBadCount();
+ }
+
+ @Override
+ public Integer component14() {
+ return getStatus();
+ }
+
+ @Override
+ public Long value1() {
+ return getId();
+ }
+
+ @Override
+ public LocalDateTime value2() {
+ return getCreateDt();
+ }
+
+ @Override
+ public LocalDateTime value3() {
+ return getModifyDt();
+ }
+
+ @Override
+ public LocalDateTime value4() {
+ return getDeleteDt();
+ }
+
+ @Override
+ public Long value5() {
+ return getCommitId();
+ }
+
+ @Override
+ public Long value6() {
+ return getUserId();
+ }
+
+ @Override
+ public Integer value7() {
+ return getLoginType();
+ }
+
+ @Override
+ public String value8() {
+ return getLoginName();
+ }
+
+ @Override
+ public String value9() {
+ return getLoginPass();
+ }
+
+ @Override
+ public String value10() {
+ return getLoginSalt();
+ }
+
+ @Override
+ public String value11() {
+ return getLoginPara();
+ }
+
+ @Override
+ public String value12() {
+ return getAuthCode();
+ }
+
+ @Override
+ public Integer value13() {
+ return getBadCount();
+ }
+
+ @Override
+ public Integer value14() {
+ return getStatus();
+ }
+
+ @Override
+ public WinUserLoginRecord value1(Long value) {
+ setId(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value2(LocalDateTime value) {
+ setCreateDt(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value3(LocalDateTime value) {
+ setModifyDt(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value4(LocalDateTime value) {
+ setDeleteDt(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value5(Long value) {
+ setCommitId(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value6(Long value) {
+ setUserId(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value7(Integer value) {
+ setLoginType(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value8(String value) {
+ setLoginName(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value9(String value) {
+ setLoginPass(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value10(String value) {
+ setLoginSalt(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value11(String value) {
+ setLoginPara(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value12(String value) {
+ setAuthCode(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value13(Integer value) {
+ setBadCount(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord value14(Integer value) {
+ setStatus(value);
+ return this;
+ }
+
+ @Override
+ public WinUserLoginRecord values(Long value1, LocalDateTime value2, LocalDateTime value3, LocalDateTime value4, Long value5, Long value6, Integer value7, String value8, String value9, String value10, String value11, String value12, Integer value13, Integer value14) {
+ value1(value1);
+ value2(value2);
+ value3(value3);
+ value4(value4);
+ value5(value5);
+ value6(value6);
+ value7(value7);
+ value8(value8);
+ value9(value9);
+ value10(value10);
+ value11(value11);
+ value12(value12);
+ value13(value13);
+ value14(value14);
+ return this;
+ }
+
+ // -------------------------------------------------------------------------
+ // FROM and INTO
+ // -------------------------------------------------------------------------
+
+ @Override
+ public void from(IWinUserLogin from) {
+ setId(from.getId());
+ setCreateDt(from.getCreateDt());
+ setModifyDt(from.getModifyDt());
+ setDeleteDt(from.getDeleteDt());
+ setCommitId(from.getCommitId());
+ setUserId(from.getUserId());
+ setLoginType(from.getLoginType());
+ setLoginName(from.getLoginName());
+ setLoginPass(from.getLoginPass());
+ setLoginSalt(from.getLoginSalt());
+ setLoginPara(from.getLoginPara());
+ setAuthCode(from.getAuthCode());
+ setBadCount(from.getBadCount());
+ setStatus(from.getStatus());
+ }
+
+ @Override
+ public E into(E into) {
+ into.from(this);
+ return into;
+ }
+
+ // -------------------------------------------------------------------------
+ // Constructors
+ // -------------------------------------------------------------------------
+
+ /**
+ * Create a detached WinUserLoginRecord
+ */
+ public WinUserLoginRecord() {
+ super(WinUserLoginTable.WinUserLogin);
+ }
+
+ /**
+ * Create a detached, initialised WinUserLoginRecord
+ */
+ public WinUserLoginRecord(Long id, LocalDateTime createDt, LocalDateTime modifyDt, LocalDateTime deleteDt, Long commitId, Long userId, Integer loginType, String loginName, String loginPass, String loginSalt, String loginPara, String authCode, Integer badCount, Integer status) {
+ super(WinUserLoginTable.WinUserLogin);
+
+ set(0, id);
+ set(1, createDt);
+ set(2, modifyDt);
+ set(3, deleteDt);
+ set(4, commitId);
+ set(5, userId);
+ set(6, loginType);
+ set(7, loginName);
+ set(8, loginPass);
+ set(9, loginSalt);
+ set(10, loginPara);
+ set(11, authCode);
+ set(12, badCount);
+ set(13, status);
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/records/WinUserRecord.java b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/records/WinUserRecord.java
new file mode 100644
index 000000000..964f920f5
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/database/autogen/tables/records/WinUserRecord.java
@@ -0,0 +1,742 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package pro.fessional.wings.example.database.autogen.tables.records;
+
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+import javax.annotation.Generated;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.jooq.Field;
+import org.jooq.Record1;
+import org.jooq.Record15;
+import org.jooq.Row15;
+import org.jooq.impl.UpdatableRecordImpl;
+
+import pro.fessional.wings.example.database.autogen.tables.WinUserTable;
+import pro.fessional.wings.example.database.autogen.tables.interfaces.IWinUser;
+
+
+/**
+ * The table wings_0.win_user.
+ */
+@Generated(
+ value = {
+ "http://www.jooq.org",
+ "jOOQ version:3.12.4",
+ "schema version:2019070403"
+ },
+ date = "2020-06-16T08:45:49.702Z",
+ comments = "This class is generated by jOOQ"
+)
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+@Entity
+@Table(name = "win_user", uniqueConstraints = {
+ @UniqueConstraint(name = "KEY_win_user_PRIMARY", columnNames = {"id"})
+})
+public class WinUserRecord extends UpdatableRecordImpl implements Record15, IWinUser {
+
+ private static final long serialVersionUID = -501197732;
+
+ /**
+ * Setter for win_user.id.
+ */
+ @Override
+ public void setId(Long value) {
+ set(0, value);
+ }
+
+ /**
+ * Getter for win_user.id.
+ */
+ @Id
+ @Column(name = "id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getId() {
+ return (Long) get(0);
+ }
+
+ /**
+ * Setter for win_user.create_dt.
+ */
+ @Override
+ public void setCreateDt(LocalDateTime value) {
+ set(1, value);
+ }
+
+ /**
+ * Getter for win_user.create_dt.
+ */
+ @Column(name = "create_dt", nullable = false)
+ @Override
+ public LocalDateTime getCreateDt() {
+ return (LocalDateTime) get(1);
+ }
+
+ /**
+ * Setter for win_user.modify_dt.
+ */
+ @Override
+ public void setModifyDt(LocalDateTime value) {
+ set(2, value);
+ }
+
+ /**
+ * Getter for win_user.modify_dt.
+ */
+ @Column(name = "modify_dt", nullable = false)
+ @Override
+ public LocalDateTime getModifyDt() {
+ return (LocalDateTime) get(2);
+ }
+
+ /**
+ * Setter for win_user.delete_dt.
+ */
+ @Override
+ public void setDeleteDt(LocalDateTime value) {
+ set(3, value);
+ }
+
+ /**
+ * Getter for win_user.delete_dt.
+ */
+ @Column(name = "delete_dt", nullable = false)
+ @Override
+ public LocalDateTime getDeleteDt() {
+ return (LocalDateTime) get(3);
+ }
+
+ /**
+ * Setter for win_user.commit_id.
+ */
+ @Override
+ public void setCommitId(Long value) {
+ set(4, value);
+ }
+
+ /**
+ * Getter for win_user.commit_id.
+ */
+ @Column(name = "commit_id", nullable = false, precision = 19)
+ @NotNull
+ @Override
+ public Long getCommitId() {
+ return (Long) get(4);
+ }
+
+ /**
+ * Setter for win_user.name.
+ */
+ @Override
+ public void setName(String value) {
+ set(5, value);
+ }
+
+ /**
+ * Getter for win_user.name.
+ */
+ @Column(name = "name", nullable = false, length = 50)
+ @NotNull
+ @Size(max = 50)
+ @Override
+ public String getName() {
+ return (String) get(5);
+ }
+
+ /**
+ * Setter for win_user.gender.
+ */
+ @Override
+ public void setGender(Integer value) {
+ set(6, value);
+ }
+
+ /**
+ * Getter for win_user.gender.
+ */
+ @Column(name = "gender", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getGender() {
+ return (Integer) get(6);
+ }
+
+ /**
+ * Setter for win_user.birth.
+ */
+ @Override
+ public void setBirth(LocalDate value) {
+ set(7, value);
+ }
+
+ /**
+ * Getter for win_user.birth.
+ */
+ @Column(name = "birth", nullable = false)
+ @NotNull
+ @Override
+ public LocalDate getBirth() {
+ return (LocalDate) get(7);
+ }
+
+ /**
+ * Setter for win_user.avatar.
+ */
+ @Override
+ public void setAvatar(String value) {
+ set(8, value);
+ }
+
+ /**
+ * Getter for win_user.avatar.
+ */
+ @Column(name = "avatar", nullable = false, length = 200)
+ @NotNull
+ @Size(max = 200)
+ @Override
+ public String getAvatar() {
+ return (String) get(8);
+ }
+
+ /**
+ * Setter for win_user.country.
+ */
+ @Override
+ public void setCountry(String value) {
+ set(9, value);
+ }
+
+ /**
+ * Getter for win_user.country.
+ */
+ @Column(name = "country", nullable = false, length = 2)
+ @NotNull
+ @Size(max = 2)
+ @Override
+ public String getCountry() {
+ return (String) get(9);
+ }
+
+ /**
+ * Setter for win_user.language.
+ */
+ @Override
+ public void setLanguage(String value) {
+ set(10, value);
+ }
+
+ /**
+ * Getter for win_user.language.
+ */
+ @Column(name = "language", nullable = false, length = 5)
+ @NotNull
+ @Size(max = 5)
+ @Override
+ public String getLanguage() {
+ return (String) get(10);
+ }
+
+ /**
+ * Setter for win_user.timezone.
+ */
+ @Override
+ public void setTimezone(Integer value) {
+ set(11, value);
+ }
+
+ /**
+ * Getter for win_user.timezone.
+ */
+ @Column(name = "timezone", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getTimezone() {
+ return (Integer) get(11);
+ }
+
+ /**
+ * Setter for win_user.auth_set.
+ */
+ @Override
+ public void setAuthSet(String value) {
+ set(12, value);
+ }
+
+ /**
+ * Getter for win_user.auth_set.
+ */
+ @Column(name = "auth_set", nullable = false, length = 2000)
+ @Size(max = 2000)
+ @Override
+ public String getAuthSet() {
+ return (String) get(12);
+ }
+
+ /**
+ * Setter for win_user.role_set.
+ */
+ @Override
+ public void setRoleSet(String value) {
+ set(13, value);
+ }
+
+ /**
+ * Getter for win_user.role_set.
+ */
+ @Column(name = "role_set", nullable = false, length = 1000)
+ @Size(max = 1000)
+ @Override
+ public String getRoleSet() {
+ return (String) get(13);
+ }
+
+ /**
+ * Setter for win_user.status.
+ */
+ @Override
+ public void setStatus(Integer value) {
+ set(14, value);
+ }
+
+ /**
+ * Getter for win_user.status.
+ */
+ @Column(name = "status", nullable = false, precision = 10)
+ @NotNull
+ @Override
+ public Integer getStatus() {
+ return (Integer) get(14);
+ }
+
+ // -------------------------------------------------------------------------
+ // Primary key information
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Record1 key() {
+ return (Record1) super.key();
+ }
+
+ // -------------------------------------------------------------------------
+ // Record15 type implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row15 fieldsRow() {
+ return (Row15) super.fieldsRow();
+ }
+
+ @Override
+ public Row15 valuesRow() {
+ return (Row15) super.valuesRow();
+ }
+
+ @Override
+ public Field field1() {
+ return WinUserTable.WinUser.Id;
+ }
+
+ @Override
+ public Field field2() {
+ return WinUserTable.WinUser.CreateDt;
+ }
+
+ @Override
+ public Field field3() {
+ return WinUserTable.WinUser.ModifyDt;
+ }
+
+ @Override
+ public Field field4() {
+ return WinUserTable.WinUser.DeleteDt;
+ }
+
+ @Override
+ public Field field5() {
+ return WinUserTable.WinUser.CommitId;
+ }
+
+ @Override
+ public Field field6() {
+ return WinUserTable.WinUser.Name;
+ }
+
+ @Override
+ public Field field7() {
+ return WinUserTable.WinUser.Gender;
+ }
+
+ @Override
+ public Field field8() {
+ return WinUserTable.WinUser.Birth;
+ }
+
+ @Override
+ public Field field9() {
+ return WinUserTable.WinUser.Avatar;
+ }
+
+ @Override
+ public Field field10() {
+ return WinUserTable.WinUser.Country;
+ }
+
+ @Override
+ public Field field11() {
+ return WinUserTable.WinUser.Language;
+ }
+
+ @Override
+ public Field field12() {
+ return WinUserTable.WinUser.Timezone;
+ }
+
+ @Override
+ public Field field13() {
+ return WinUserTable.WinUser.AuthSet;
+ }
+
+ @Override
+ public Field field14() {
+ return WinUserTable.WinUser.RoleSet;
+ }
+
+ @Override
+ public Field field15() {
+ return WinUserTable.WinUser.Status;
+ }
+
+ @Override
+ public Long component1() {
+ return getId();
+ }
+
+ @Override
+ public LocalDateTime component2() {
+ return getCreateDt();
+ }
+
+ @Override
+ public LocalDateTime component3() {
+ return getModifyDt();
+ }
+
+ @Override
+ public LocalDateTime component4() {
+ return getDeleteDt();
+ }
+
+ @Override
+ public Long component5() {
+ return getCommitId();
+ }
+
+ @Override
+ public String component6() {
+ return getName();
+ }
+
+ @Override
+ public Integer component7() {
+ return getGender();
+ }
+
+ @Override
+ public LocalDate component8() {
+ return getBirth();
+ }
+
+ @Override
+ public String component9() {
+ return getAvatar();
+ }
+
+ @Override
+ public String component10() {
+ return getCountry();
+ }
+
+ @Override
+ public String component11() {
+ return getLanguage();
+ }
+
+ @Override
+ public Integer component12() {
+ return getTimezone();
+ }
+
+ @Override
+ public String component13() {
+ return getAuthSet();
+ }
+
+ @Override
+ public String component14() {
+ return getRoleSet();
+ }
+
+ @Override
+ public Integer component15() {
+ return getStatus();
+ }
+
+ @Override
+ public Long value1() {
+ return getId();
+ }
+
+ @Override
+ public LocalDateTime value2() {
+ return getCreateDt();
+ }
+
+ @Override
+ public LocalDateTime value3() {
+ return getModifyDt();
+ }
+
+ @Override
+ public LocalDateTime value4() {
+ return getDeleteDt();
+ }
+
+ @Override
+ public Long value5() {
+ return getCommitId();
+ }
+
+ @Override
+ public String value6() {
+ return getName();
+ }
+
+ @Override
+ public Integer value7() {
+ return getGender();
+ }
+
+ @Override
+ public LocalDate value8() {
+ return getBirth();
+ }
+
+ @Override
+ public String value9() {
+ return getAvatar();
+ }
+
+ @Override
+ public String value10() {
+ return getCountry();
+ }
+
+ @Override
+ public String value11() {
+ return getLanguage();
+ }
+
+ @Override
+ public Integer value12() {
+ return getTimezone();
+ }
+
+ @Override
+ public String value13() {
+ return getAuthSet();
+ }
+
+ @Override
+ public String value14() {
+ return getRoleSet();
+ }
+
+ @Override
+ public Integer value15() {
+ return getStatus();
+ }
+
+ @Override
+ public WinUserRecord value1(Long value) {
+ setId(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value2(LocalDateTime value) {
+ setCreateDt(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value3(LocalDateTime value) {
+ setModifyDt(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value4(LocalDateTime value) {
+ setDeleteDt(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value5(Long value) {
+ setCommitId(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value6(String value) {
+ setName(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value7(Integer value) {
+ setGender(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value8(LocalDate value) {
+ setBirth(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value9(String value) {
+ setAvatar(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value10(String value) {
+ setCountry(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value11(String value) {
+ setLanguage(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value12(Integer value) {
+ setTimezone(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value13(String value) {
+ setAuthSet(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value14(String value) {
+ setRoleSet(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord value15(Integer value) {
+ setStatus(value);
+ return this;
+ }
+
+ @Override
+ public WinUserRecord values(Long value1, LocalDateTime value2, LocalDateTime value3, LocalDateTime value4, Long value5, String value6, Integer value7, LocalDate value8, String value9, String value10, String value11, Integer value12, String value13, String value14, Integer value15) {
+ value1(value1);
+ value2(value2);
+ value3(value3);
+ value4(value4);
+ value5(value5);
+ value6(value6);
+ value7(value7);
+ value8(value8);
+ value9(value9);
+ value10(value10);
+ value11(value11);
+ value12(value12);
+ value13(value13);
+ value14(value14);
+ value15(value15);
+ return this;
+ }
+
+ // -------------------------------------------------------------------------
+ // FROM and INTO
+ // -------------------------------------------------------------------------
+
+ @Override
+ public void from(IWinUser from) {
+ setId(from.getId());
+ setCreateDt(from.getCreateDt());
+ setModifyDt(from.getModifyDt());
+ setDeleteDt(from.getDeleteDt());
+ setCommitId(from.getCommitId());
+ setName(from.getName());
+ setGender(from.getGender());
+ setBirth(from.getBirth());
+ setAvatar(from.getAvatar());
+ setCountry(from.getCountry());
+ setLanguage(from.getLanguage());
+ setTimezone(from.getTimezone());
+ setAuthSet(from.getAuthSet());
+ setRoleSet(from.getRoleSet());
+ setStatus(from.getStatus());
+ }
+
+ @Override
+ public E into(E into) {
+ into.from(this);
+ return into;
+ }
+
+ // -------------------------------------------------------------------------
+ // Constructors
+ // -------------------------------------------------------------------------
+
+ /**
+ * Create a detached WinUserRecord
+ */
+ public WinUserRecord() {
+ super(WinUserTable.WinUser);
+ }
+
+ /**
+ * Create a detached, initialised WinUserRecord
+ */
+ public WinUserRecord(Long id, LocalDateTime createDt, LocalDateTime modifyDt, LocalDateTime deleteDt, Long commitId, String name, Integer gender, LocalDate birth, String avatar, String country, String language, Integer timezone, String authSet, String roleSet, Integer status) {
+ super(WinUserTable.WinUser);
+
+ set(0, id);
+ set(1, createDt);
+ set(2, modifyDt);
+ set(3, deleteDt);
+ set(4, commitId);
+ set(5, name);
+ set(6, gender);
+ set(7, birth);
+ set(8, avatar);
+ set(9, country);
+ set(10, language);
+ set(11, timezone);
+ set(12, authSet);
+ set(13, roleSet);
+ set(14, status);
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/Authority.java b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/Authority.java
new file mode 100644
index 000000000..3f4451dd2
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/Authority.java
@@ -0,0 +1,95 @@
+package pro.fessional.wings.example.enums.auto;
+
+
+import org.jetbrains.annotations.NotNull;
+import pro.fessional.wings.faceless.enums.ConstantEnum;
+import pro.fessional.wings.faceless.enums.StandardI18nEnum;
+
+/**
+ * @author trydofor
+ * @since 2020-06-21
+ */
+public enum Authority implements ConstantEnum, StandardI18nEnum {
+ SUPER(4010100, "authority", "权限定义", "classpath:/wings-tmpl/ConstantEnumTemplate.java"),
+ CREATE_USER(4010101, "CREATE_USER", "创建用户", "用户:"),
+ DELETE_USER(4010102, "DELETE_USER", "删除用户", "用户:"),
+ CREATE_ROLE(4010203, "CREATE_ROLE", "删除角色", "角色:"),
+ DELETE_ROLE(4010204, "DELETE_ROLE", "删除角色", "角色:"),
+ ;
+ public static final String $SUPER = "authority";
+ public static final String $CREATE_USER = "CREATE_USER";
+ public static final String $DELETE_USER = "DELETE_USER";
+ public static final String $CREATE_ROLE = "CREATE_ROLE";
+ public static final String $DELETE_ROLE = "DELETE_ROLE";
+
+
+ public static final boolean useIdAsKey = false;
+ private final int id;
+ private final String code;
+ private final String desc;
+ private final String info;
+
+ private final String ukey;
+ private final String rkey;
+
+ Authority(int id, String code, String desc, String info) {
+ this.id = id;
+ this.code = code;
+ this.desc = desc;
+ this.info = info;
+ this.ukey = useIdAsKey ? "id" + id : code;
+ this.rkey = "sys_constant_enum.desc." + ukey;
+ }
+
+ @Override
+ public int getId() {
+ return id;
+ }
+
+ @Override
+ public @NotNull String getType() {
+ return "constant_enum_template";
+ }
+
+ @Override
+ public @NotNull String getInfo() {
+ return info;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+ //
+ @Override
+ public @NotNull String getBase() {
+ return "authority";
+ }
+
+ @Override
+ public @NotNull String getKind() {
+ return "desc";
+ }
+
+ @Override
+ public @NotNull String getUkey() {
+ return ukey;
+ }
+
+
+ //
+ @Override
+ public @NotNull String getCode() {
+ return code;
+ }
+
+ @Override
+ public @NotNull String getHint() {
+ return desc;
+ }
+
+ @Override
+ public @NotNull String getI18nCode() {
+ return rkey;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/CommonGender.java b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/CommonGender.java
new file mode 100644
index 000000000..8243c7328
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/CommonGender.java
@@ -0,0 +1,93 @@
+package pro.fessional.wings.example.enums.auto;
+
+
+import org.jetbrains.annotations.NotNull;
+import pro.fessional.wings.faceless.enums.ConstantEnum;
+import pro.fessional.wings.faceless.enums.StandardI18nEnum;
+
+/**
+ * @author trydofor
+ * @since 2020-06-21
+ */
+public enum CommonGender implements ConstantEnum, StandardI18nEnum {
+ SUPER(2010100, "common_gender", "性别", "classpath:/wings-tmpl/ConstantEnumTemplate.java"),
+ MALE(2010101, "male", "男", "通常"),
+ FEMALE(2010102, "female", "女", "通常"),
+ UNKNOWN(2010103, "unknown", "未知", "通常"),
+ ;
+ public static final String $SUPER = "common_gender";
+ public static final String $MALE = "male";
+ public static final String $FEMALE = "female";
+ public static final String $UNKNOWN = "unknown";
+
+
+ public static final boolean useIdAsKey = false;
+ private final int id;
+ private final String code;
+ private final String desc;
+ private final String info;
+
+ private final String ukey;
+ private final String rkey;
+
+ CommonGender(int id, String code, String desc, String info) {
+ this.id = id;
+ this.code = code;
+ this.desc = desc;
+ this.info = info;
+ this.ukey = useIdAsKey ? "id" + id : code;
+ this.rkey = "sys_constant_enum.desc." + ukey;
+ }
+
+ @Override
+ public int getId() {
+ return id;
+ }
+
+ @Override
+ public @NotNull String getType() {
+ return "constant_enum_template";
+ }
+
+ @Override
+ public @NotNull String getInfo() {
+ return info;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+ //
+ @Override
+ public @NotNull String getBase() {
+ return "common_gender";
+ }
+
+ @Override
+ public @NotNull String getKind() {
+ return "desc";
+ }
+
+ @Override
+ public @NotNull String getUkey() {
+ return ukey;
+ }
+
+
+ //
+ @Override
+ public @NotNull String getCode() {
+ return code;
+ }
+
+ @Override
+ public @NotNull String getHint() {
+ return desc;
+ }
+
+ @Override
+ public @NotNull String getI18nCode() {
+ return rkey;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/LoginType.java b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/LoginType.java
new file mode 100644
index 000000000..97baa1314
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/LoginType.java
@@ -0,0 +1,95 @@
+package pro.fessional.wings.example.enums.auto;
+
+
+import org.jetbrains.annotations.NotNull;
+import pro.fessional.wings.faceless.enums.ConstantEnum;
+import pro.fessional.wings.faceless.enums.StandardI18nEnum;
+
+/**
+ * @author trydofor
+ * @since 2020-06-21
+ */
+public enum LoginType implements ConstantEnum, StandardI18nEnum {
+ SUPER(4120100, "login_type", "用户登录类型", "classpath:/wings-tmpl/ConstantEnumTemplate.java"),
+ EMAIL_PASS(4120101, "email_pass", "邮件", "邮件登录"),
+ NAME_PASS(4120102, "name_pass", "用户名", "用户名密码"),
+ MOBILE_SMS(4120103, "mobile_sms", "手机号", "手机号"),
+ WEIXIN_OAUTH(4120104, "weixin_oauth", "微信登录", "微信登录"),
+ ;
+ public static final String $SUPER = "login_type";
+ public static final String $EMAIL_PASS = "email_pass";
+ public static final String $NAME_PASS = "name_pass";
+ public static final String $MOBILE_SMS = "mobile_sms";
+ public static final String $WEIXIN_OAUTH = "weixin_oauth";
+
+
+ public static final boolean useIdAsKey = false;
+ private final int id;
+ private final String code;
+ private final String desc;
+ private final String info;
+
+ private final String ukey;
+ private final String rkey;
+
+ LoginType(int id, String code, String desc, String info) {
+ this.id = id;
+ this.code = code;
+ this.desc = desc;
+ this.info = info;
+ this.ukey = useIdAsKey ? "id" + id : code;
+ this.rkey = "sys_constant_enum.desc." + ukey;
+ }
+
+ @Override
+ public int getId() {
+ return id;
+ }
+
+ @Override
+ public @NotNull String getType() {
+ return "constant_enum_template";
+ }
+
+ @Override
+ public @NotNull String getInfo() {
+ return info;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+ //
+ @Override
+ public @NotNull String getBase() {
+ return "login_type";
+ }
+
+ @Override
+ public @NotNull String getKind() {
+ return "desc";
+ }
+
+ @Override
+ public @NotNull String getUkey() {
+ return ukey;
+ }
+
+
+ //
+ @Override
+ public @NotNull String getCode() {
+ return code;
+ }
+
+ @Override
+ public @NotNull String getHint() {
+ return desc;
+ }
+
+ @Override
+ public @NotNull String getI18nCode() {
+ return rkey;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/RoleType.java b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/RoleType.java
new file mode 100644
index 000000000..01923d30c
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/RoleType.java
@@ -0,0 +1,91 @@
+package pro.fessional.wings.example.enums.auto;
+
+
+import org.jetbrains.annotations.NotNull;
+import pro.fessional.wings.faceless.enums.ConstantEnum;
+import pro.fessional.wings.faceless.enums.StandardI18nEnum;
+
+/**
+ * @author trydofor
+ * @since 2020-06-21
+ */
+public enum RoleType implements ConstantEnum, StandardI18nEnum {
+ SUPER(4020100, "role_type", "角色类别", "classpath:/wings-tmpl/ConstantEnumTemplate.java"),
+ FINANCIAL(4020101, "financial", "财务", "财务总部"),
+ OPERATION(4020102, "operation", "运营", "财务总部"),
+ ;
+ public static final String $SUPER = "role_type";
+ public static final String $FINANCIAL = "financial";
+ public static final String $OPERATION = "operation";
+
+
+ public static final boolean useIdAsKey = false;
+ private final int id;
+ private final String code;
+ private final String desc;
+ private final String info;
+
+ private final String ukey;
+ private final String rkey;
+
+ RoleType(int id, String code, String desc, String info) {
+ this.id = id;
+ this.code = code;
+ this.desc = desc;
+ this.info = info;
+ this.ukey = useIdAsKey ? "id" + id : code;
+ this.rkey = "sys_constant_enum.desc." + ukey;
+ }
+
+ @Override
+ public int getId() {
+ return id;
+ }
+
+ @Override
+ public @NotNull String getType() {
+ return "constant_enum_template";
+ }
+
+ @Override
+ public @NotNull String getInfo() {
+ return info;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+ //
+ @Override
+ public @NotNull String getBase() {
+ return "role_type";
+ }
+
+ @Override
+ public @NotNull String getKind() {
+ return "desc";
+ }
+
+ @Override
+ public @NotNull String getUkey() {
+ return ukey;
+ }
+
+
+ //
+ @Override
+ public @NotNull String getCode() {
+ return code;
+ }
+
+ @Override
+ public @NotNull String getHint() {
+ return desc;
+ }
+
+ @Override
+ public @NotNull String getI18nCode() {
+ return rkey;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/TerminalType.java b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/TerminalType.java
new file mode 100644
index 000000000..ff1eb9430
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/TerminalType.java
@@ -0,0 +1,93 @@
+package pro.fessional.wings.example.enums.auto;
+
+
+import org.jetbrains.annotations.NotNull;
+import pro.fessional.wings.faceless.enums.ConstantEnum;
+import pro.fessional.wings.faceless.enums.StandardI18nEnum;
+
+/**
+ * @author trydofor
+ * @since 2020-06-21
+ */
+public enum TerminalType implements ConstantEnum, StandardI18nEnum {
+ SUPER(2030100, "terminal_type", "用户类别", "classpath:/wings-tmpl/ConstantEnumTemplate.java"),
+ WEB_ADMIN(2030101, "web_admin", "WEB管理端", ""),
+ APP_ANDROID(2030102, "app_android", "安卓app", ""),
+ EXE_PC(2030103, "exe_pc", "pc端exe", ""),
+ ;
+ public static final String $SUPER = "terminal_type";
+ public static final String $WEB_ADMIN = "web_admin";
+ public static final String $APP_ANDROID = "app_android";
+ public static final String $EXE_PC = "exe_pc";
+
+
+ public static final boolean useIdAsKey = false;
+ private final int id;
+ private final String code;
+ private final String desc;
+ private final String info;
+
+ private final String ukey;
+ private final String rkey;
+
+ TerminalType(int id, String code, String desc, String info) {
+ this.id = id;
+ this.code = code;
+ this.desc = desc;
+ this.info = info;
+ this.ukey = useIdAsKey ? "id" + id : code;
+ this.rkey = "sys_constant_enum.desc." + ukey;
+ }
+
+ @Override
+ public int getId() {
+ return id;
+ }
+
+ @Override
+ public @NotNull String getType() {
+ return "constant_enum_template";
+ }
+
+ @Override
+ public @NotNull String getInfo() {
+ return info;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+ //
+ @Override
+ public @NotNull String getBase() {
+ return "terminal_type";
+ }
+
+ @Override
+ public @NotNull String getKind() {
+ return "desc";
+ }
+
+ @Override
+ public @NotNull String getUkey() {
+ return ukey;
+ }
+
+
+ //
+ @Override
+ public @NotNull String getCode() {
+ return code;
+ }
+
+ @Override
+ public @NotNull String getHint() {
+ return desc;
+ }
+
+ @Override
+ public @NotNull String getI18nCode() {
+ return rkey;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/UserStatus.java b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/UserStatus.java
new file mode 100644
index 000000000..e4dcc187a
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/UserStatus.java
@@ -0,0 +1,97 @@
+package pro.fessional.wings.example.enums.auto;
+
+
+import org.jetbrains.annotations.NotNull;
+import pro.fessional.wings.faceless.enums.ConstantEnum;
+import pro.fessional.wings.faceless.enums.StandardI18nEnum;
+
+/**
+ * @author trydofor
+ * @since 2020-06-21
+ */
+public enum UserStatus implements ConstantEnum, StandardI18nEnum {
+ SUPER(4110100, "user_status", "用户状态", "classpath:/wings-tmpl/ConstantEnumTemplate.java"),
+ UNINIT(4110101, "uninit", "新建", "建立未登陆"),
+ ACTIVE(4110102, "active", "正常", "正常活动"),
+ UNSAFE(4110103, "unsafe", "异动", "异动账户"),
+ DANGER(4110104, "danger", "危险", "危险账户"),
+ FROZEN(4110105, "frozen", "冻结", "冻结账户"),
+ ;
+ public static final String $SUPER = "user_status";
+ public static final String $UNINIT = "uninit";
+ public static final String $ACTIVE = "active";
+ public static final String $UNSAFE = "unsafe";
+ public static final String $DANGER = "danger";
+ public static final String $FROZEN = "frozen";
+
+
+ public static final boolean useIdAsKey = false;
+ private final int id;
+ private final String code;
+ private final String desc;
+ private final String info;
+
+ private final String ukey;
+ private final String rkey;
+
+ UserStatus(int id, String code, String desc, String info) {
+ this.id = id;
+ this.code = code;
+ this.desc = desc;
+ this.info = info;
+ this.ukey = useIdAsKey ? "id" + id : code;
+ this.rkey = "sys_constant_enum.desc." + ukey;
+ }
+
+ @Override
+ public int getId() {
+ return id;
+ }
+
+ @Override
+ public @NotNull String getType() {
+ return "constant_enum_template";
+ }
+
+ @Override
+ public @NotNull String getInfo() {
+ return info;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+ //
+ @Override
+ public @NotNull String getBase() {
+ return "user_status";
+ }
+
+ @Override
+ public @NotNull String getKind() {
+ return "desc";
+ }
+
+ @Override
+ public @NotNull String getUkey() {
+ return ukey;
+ }
+
+
+ //
+ @Override
+ public @NotNull String getCode() {
+ return code;
+ }
+
+ @Override
+ public @NotNull String getHint() {
+ return desc;
+ }
+
+ @Override
+ public @NotNull String getI18nCode() {
+ return rkey;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/UserType.java b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/UserType.java
new file mode 100644
index 000000000..9b29cd6e1
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/enums/auto/UserType.java
@@ -0,0 +1,93 @@
+package pro.fessional.wings.example.enums.auto;
+
+
+import org.jetbrains.annotations.NotNull;
+import pro.fessional.wings.faceless.enums.ConstantEnum;
+import pro.fessional.wings.faceless.enums.StandardI18nEnum;
+
+/**
+ * @author trydofor
+ * @since 2020-06-21
+ */
+public enum UserType implements ConstantEnum, StandardI18nEnum {
+ SUPER(2020100, "user_type", "用户类别", "classpath:/wings-tmpl/ConstantEnumTemplate.java"),
+ ADMIN(2020101, "admin", "管理", ""),
+ STAFF(2020102, "staff", "员工", ""),
+ GUEST(2020103, "guest", "客户", ""),
+ ;
+ public static final String $SUPER = "user_type";
+ public static final String $ADMIN = "admin";
+ public static final String $STAFF = "staff";
+ public static final String $GUEST = "guest";
+
+
+ public static final boolean useIdAsKey = false;
+ private final int id;
+ private final String code;
+ private final String desc;
+ private final String info;
+
+ private final String ukey;
+ private final String rkey;
+
+ UserType(int id, String code, String desc, String info) {
+ this.id = id;
+ this.code = code;
+ this.desc = desc;
+ this.info = info;
+ this.ukey = useIdAsKey ? "id" + id : code;
+ this.rkey = "sys_constant_enum.desc." + ukey;
+ }
+
+ @Override
+ public int getId() {
+ return id;
+ }
+
+ @Override
+ public @NotNull String getType() {
+ return "constant_enum_template";
+ }
+
+ @Override
+ public @NotNull String getInfo() {
+ return info;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+ //
+ @Override
+ public @NotNull String getBase() {
+ return "user_type";
+ }
+
+ @Override
+ public @NotNull String getKind() {
+ return "desc";
+ }
+
+ @Override
+ public @NotNull String getUkey() {
+ return ukey;
+ }
+
+
+ //
+ @Override
+ public @NotNull String getCode() {
+ return code;
+ }
+
+ @Override
+ public @NotNull String getHint() {
+ return desc;
+ }
+
+ @Override
+ public @NotNull String getI18nCode() {
+ return rkey;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/service/TestI18nUserDetail.java b/wings-example/src/main/java/pro/fessional/wings/example/service/TestI18nUserDetail.java
deleted file mode 100644
index 9685b72f3..000000000
--- a/wings-example/src/main/java/pro/fessional/wings/example/service/TestI18nUserDetail.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package pro.fessional.wings.example.service;
-
-import org.springframework.security.core.GrantedAuthority;
-import org.springframework.security.core.authority.SimpleGrantedAuthority;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-import java.util.Locale;
-import java.util.TimeZone;
-
-/**
- * @author trydofor
- * @since 2019-11-20
- */
-public class TestI18nUserDetail implements UserDetails {
-
- private final List auths = Arrays.asList(
- new SimpleGrantedAuthority("ROLE_USER"),
- new SimpleGrantedAuthority("ROLE_ADMIN"),
- new SimpleGrantedAuthority("ROLE_CLURK"),
- new SimpleGrantedAuthority("MENU_READ")
- );
-
- private final String pass = "{bcrypt}" + new BCryptPasswordEncoder().encode("wings-slardar-pass");
-
- private TimeZone timezone = TimeZone.getDefault();
- private Locale locale = Locale.CHINA;
-
- public TimeZone getTimezone() {
- return timezone;
- }
-
- public void setTimezone(TimeZone timezone) {
- this.timezone = timezone;
- }
-
- public Locale getLocale() {
- return locale;
- }
-
- public void setLocale(Locale locale) {
- this.locale = locale;
- }
-
- @Override
- public Collection extends GrantedAuthority> getAuthorities() {
- return auths;
- }
-
- @Override
- public String getPassword() {
- return pass;
- }
-
- @Override
- public String getUsername() {
- return "wings-slardar-user";
- }
-
- @Override
- public boolean isAccountNonExpired() {
- return true;
- }
-
- @Override
- public boolean isAccountNonLocked() {
- return true;
- }
-
- @Override
- public boolean isCredentialsNonExpired() {
- return true;
- }
-
- @Override
- public boolean isEnabled() {
- return true;
- }
-}
\ No newline at end of file
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/service/TestUserDetailsService.java b/wings-example/src/main/java/pro/fessional/wings/example/service/TestUserDetailsService.java
deleted file mode 100644
index e2e42e6b1..000000000
--- a/wings-example/src/main/java/pro/fessional/wings/example/service/TestUserDetailsService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package pro.fessional.wings.example.service;
-
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.core.userdetails.UserDetailsService;
-import org.springframework.stereotype.Service;
-import pro.fessional.wings.slardar.security.WingsOAuth2xContext;
-
-/**
- * @author trydofor
- * @since 2019-11-14
- */
-@Service
-public class TestUserDetailsService implements UserDetailsService {
-
- @Override
- public UserDetails loadUserByUsername(String username) {
- System.out.println(username);
- WingsOAuth2xContext.Context woc = WingsOAuth2xContext.get();
- Authentication aut = SecurityContextHolder.getContext().getAuthentication();
- return new TestI18nUserDetail();
- }
-}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/service/authrole/AuthEnumUtil.java b/wings-example/src/main/java/pro/fessional/wings/example/service/authrole/AuthEnumUtil.java
new file mode 100644
index 000000000..22d451b6b
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/service/authrole/AuthEnumUtil.java
@@ -0,0 +1,54 @@
+package pro.fessional.wings.example.service.authrole;
+
+import pro.fessional.mirana.math.AnyIntegerUtil;
+import pro.fessional.wings.example.enums.auto.Authority;
+import pro.fessional.wings.faceless.enums.ConstantEnumUtil;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author trydofor
+ * @since 2020-06-21
+ */
+public class AuthEnumUtil {
+
+ /**
+ * 变成 id和code的map,支持负数标记删除
+ *
+ * @param map map
+ * @param ids auth id
+ */
+ public static void fillAuth(Map map, String... ids) {
+ if (ids == null || ids.length == 0) return;
+ for (String id : ids) {
+ int i = AnyIntegerUtil.val32(id);
+ Authority a;
+ if (i < 0) {
+ a = ConstantEnumUtil.idOrNull(-i, Authority.values());
+ } else {
+ a = ConstantEnumUtil.idOrNull(i, Authority.values());
+ }
+ if (a != null) {
+ map.put(i, a.getCode());
+ }
+ }
+ }
+
+ /**
+ * 按负数删除,整理 map
+ *
+ * @param map map
+ */
+ public static void trimAuth(Map map) {
+ if (map == null || map.isEmpty()) return;
+
+ Set remove = new HashSet<>();
+ for (Integer i : map.keySet()) {
+ if(i < 0) remove.add(-i);
+ }
+
+ map.entrySet().removeIf(e -> e.getKey() < 0 || remove.contains(e.getKey()));
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/service/authrole/AuthRoleCache.java b/wings-example/src/main/java/pro/fessional/wings/example/service/authrole/AuthRoleCache.java
new file mode 100644
index 000000000..f17cc7edf
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/service/authrole/AuthRoleCache.java
@@ -0,0 +1,71 @@
+package pro.fessional.wings.example.service.authrole;
+
+import lombok.Setter;
+import org.apache.commons.lang3.StringUtils;
+import org.jetbrains.annotations.NotNull;
+import org.jooq.Record1;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+import pro.fessional.wings.example.database.autogen.tables.WinAuthRoleTable;
+import pro.fessional.wings.example.database.autogen.tables.daos.WinAuthRoleDao;
+import pro.fessional.wings.example.database.autogen.tables.pojos.WinAuthRole;
+import pro.fessional.wings.faceless.service.journal.JournalService;
+import pro.fessional.wings.faceless.service.lightid.LightIdService;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import static pro.fessional.wings.slardar.spring.bean.WingsCacheConfiguration.LEVEL_GENERAL;
+import static pro.fessional.wings.slardar.spring.bean.WingsCacheConfiguration.MANAGER_CAFFEINE;
+
+@Service
+@Setter(onMethod = @__({@Autowired}))
+public class AuthRoleCache {
+
+ private LightIdService lightIdService;
+ private WinAuthRoleDao winAuthRoleDao;
+
+ @Cacheable(key = "#roleId",
+ value = LEVEL_GENERAL + "AuthorityName",
+ cacheManager = MANAGER_CAFFEINE)
+ @NotNull
+ public Map loadAuth(long roleId) {
+ WinAuthRoleTable t = winAuthRoleDao.getAliasForReader();
+ Record1 r1 = winAuthRoleDao
+ .dslContext()
+ .select(t.AuthSet)
+ .from(t)
+ .where(t.Id.eq(roleId))
+ .fetchOne();
+
+ if (r1 == null) {
+ return Collections.emptyMap();
+ } else {
+ String[] aids = StringUtils.split(r1.value1(), ",");
+ Map result = new HashMap<>();
+ AuthEnumUtil.fillAuth(result, aids);
+ return result;
+ }
+ }
+
+ @CacheEvict(key = "#result",
+ value = LEVEL_GENERAL + "AuthorityName",
+ cacheManager = MANAGER_CAFFEINE)
+ public long save(WinAuthRole authRole, JournalService.Journal journal) {
+ long id;
+ if (authRole.getId() == null) {
+ id = lightIdService.getId(WinAuthRoleTable.class);
+ authRole.setId(id);
+ journal.commit(authRole);
+ winAuthRoleDao.insert(authRole);
+ } else {
+ id = authRole.getId();
+ journal.commit(authRole);
+ winAuthRoleDao.update(authRole, true);
+ }
+ return id;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/service/authrole/AuthRoleService.java b/wings-example/src/main/java/pro/fessional/wings/example/service/authrole/AuthRoleService.java
new file mode 100644
index 000000000..3759859b8
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/service/authrole/AuthRoleService.java
@@ -0,0 +1,46 @@
+package pro.fessional.wings.example.service.authrole;
+
+import lombok.Setter;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.stereotype.Service;
+import pro.fessional.mirana.math.AnyIntegerUtil;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * @author trydofor
+ * @since 2019-12-01
+ */
+@Service
+@Setter(onMethod = @__({@Autowired}))
+public class AuthRoleService {
+
+ private AuthRoleCache authRoleCache;
+
+ public Set loadRoleAuth(String roleSet, String authSet) {
+ Map auths = new HashMap<>();
+ fillByRole(auths, StringUtils.split(roleSet, ","));
+ String[] aid = StringUtils.split(authSet, ",");
+ AuthEnumUtil.fillAuth(auths, aid);
+ AuthEnumUtil.trimAuth(auths);
+ return auths.values()
+ .stream()
+ .map(SimpleGrantedAuthority::new)
+ .collect(Collectors.toSet());
+ }
+
+
+ public void fillByRole(Map map, String... ids) {
+ if (ids == null || ids.length == 0) return;
+ for (String id : ids) {
+ Map authCode = authRoleCache.loadAuth(AnyIntegerUtil.val64(id));
+ map.putAll(authCode);
+ }
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/service/journal/JournalServiceSpringSecurity.java b/wings-example/src/main/java/pro/fessional/wings/example/service/journal/JournalServiceSpringSecurity.java
deleted file mode 100644
index f4503ac30..000000000
--- a/wings-example/src/main/java/pro/fessional/wings/example/service/journal/JournalServiceSpringSecurity.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package pro.fessional.wings.example.service.journal;
-
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import pro.fessional.wings.faceless.service.journal.JournalService;
-
-/**
- * @author trydofor
- * @since 2019-08-15
- */
-public class JournalServiceSpringSecurity implements JournalService {
-
- @NotNull
- @Override
- public Journal commit(@NotNull String eventName, @Nullable String loginInfo, @Nullable String targetKey, @Nullable String otherInfo) {
- return null;
- }
-
- @NotNull
- @Override
- public Journal commit(@NotNull Class> eventClass, @Nullable String loginInfo, @Nullable Object targetKey, @Nullable Object otherInfo) {
- return null;
- }
-
- @NotNull
- @Override
- public Journal commit(@NotNull Class> eventClass, @Nullable Object targetKey, @Nullable Object otherInfo) {
- return null;
- }
-
- @NotNull
- @Override
- public Journal commit(@NotNull Class> eventClass, @Nullable Object targetKey) {
- return null;
- }
-
- @NotNull
- @Override
- public Journal commit(@NotNull Class> eventClass) {
- return null;
- }
-}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/service/security/SecurityJournalService.java b/wings-example/src/main/java/pro/fessional/wings/example/service/security/SecurityJournalService.java
new file mode 100644
index 000000000..345f24976
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/service/security/SecurityJournalService.java
@@ -0,0 +1,38 @@
+package pro.fessional.wings.example.service.security;
+
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+import pro.fessional.wings.faceless.database.manual.single.modify.commitjournal.CommitJournalModify;
+import pro.fessional.wings.faceless.service.journal.impl.DefaultJournalService;
+import pro.fessional.wings.faceless.service.lightid.BlockIdProvider;
+import pro.fessional.wings.faceless.service.lightid.LightIdService;
+
+/**
+ * @author trydofor
+ * @since 2019-08-15
+ */
+@Service
+public class SecurityJournalService extends DefaultJournalService {
+
+ public SecurityJournalService(LightIdService lightIdService,
+ BlockIdProvider blockIdProvider,
+ CommitJournalModify journalModify) {
+ super(lightIdService, blockIdProvider, journalModify);
+ }
+
+ @NotNull
+ @Transactional(propagation = Propagation.REQUIRES_NEW)
+ public Journal commit(@NotNull String eventName,
+ @Nullable String targetKey,
+ @Nullable String otherInfo) {
+
+// SecurityContextUtil.getDetails()
+
+ String loginInfo = "";
+ return super.commit(eventName, loginInfo, targetKey, otherInfo);
+ }
+
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/service/security/WingsUserDetail.java b/wings-example/src/main/java/pro/fessional/wings/example/service/security/WingsUserDetail.java
new file mode 100644
index 000000000..1921d18e7
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/service/security/WingsUserDetail.java
@@ -0,0 +1,122 @@
+package pro.fessional.wings.example.service.security;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.springframework.security.core.GrantedAuthority;
+import pro.fessional.wings.slardar.security.TypeIdI18nUserDetail;
+
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Locale;
+
+/**
+ * @author trydofor
+ * @since 2019-11-30
+ */
+@Setter
+@Getter
+public class WingsUserDetail implements TypeIdI18nUserDetail {
+
+ private String username;
+ private String password;
+ private Collection authorities = Collections.emptyList();
+
+ private long userId;
+ private int userType;
+ private int loginType; // LoginTypeEnum
+
+ private String name;
+ private int gender;
+ private LocalDate birth;
+ private String avatar;
+ private String country;
+
+ private Locale locale;
+ private ZoneId zoneId;
+
+ private boolean accountNonExpired;
+ private boolean accountNonLocked;
+ private boolean credentialsNonExpired;
+ private boolean enabled;
+
+ @Override
+ public long getUserId() {
+ return userId;
+ }
+
+ @Override
+ public int getUserType() {
+ return userType;
+ }
+
+ @Override
+ public Locale getLocale() {
+ return locale;
+ }
+
+ @Override
+ public ZoneId getZoneId() {
+ return zoneId;
+ }
+
+ @Override
+ public Collection extends GrantedAuthority> getAuthorities() {
+ return authorities;
+ }
+
+ @Override
+ public String getPassword() {
+ return password;
+ }
+
+ @Override
+ public String getUsername() {
+ return username;
+ }
+
+ @Override
+ public boolean isAccountNonExpired() {
+ return accountNonExpired;
+ }
+
+ @Override
+ public boolean isAccountNonLocked() {
+ return accountNonLocked;
+ }
+
+ @Override
+ public boolean isCredentialsNonExpired() {
+ return credentialsNonExpired;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+
+ if (o == null || getClass() != o.getClass()) return false;
+
+ WingsUserDetail that = (WingsUserDetail) o;
+
+ return new EqualsBuilder()
+ .append(userId, that.userId)
+ .append(userType, that.userType)
+ .isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder(17, 37)
+ .append(userId)
+ .append(userType)
+ .toHashCode();
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/service/security/WingsUserDetailService.java b/wings-example/src/main/java/pro/fessional/wings/example/service/security/WingsUserDetailService.java
new file mode 100644
index 000000000..f839d8296
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/service/security/WingsUserDetailService.java
@@ -0,0 +1,106 @@
+package pro.fessional.wings.example.service.security;
+
+import lombok.Setter;
+import org.jooq.Condition;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.stereotype.Service;
+import org.springframework.util.Assert;
+import pro.fessional.mirana.i18n.LocaleResolver;
+import pro.fessional.wings.example.database.autogen.tables.WinUserLoginTable;
+import pro.fessional.wings.example.database.autogen.tables.daos.WinUserDao;
+import pro.fessional.wings.example.database.autogen.tables.daos.WinUserLoginDao;
+import pro.fessional.wings.example.database.autogen.tables.pojos.WinUser;
+import pro.fessional.wings.example.database.autogen.tables.pojos.WinUserLogin;
+import pro.fessional.wings.example.enums.auto.LoginType;
+import pro.fessional.wings.example.enums.auto.UserStatus;
+import pro.fessional.wings.example.enums.auto.UserType;
+import pro.fessional.wings.example.service.authrole.AuthRoleService;
+import pro.fessional.wings.faceless.enums.ConstantEnumUtil;
+import pro.fessional.wings.faceless.enums.TimezoneEnumUtil;
+import pro.fessional.wings.faceless.enums.auto.StandardTimezone;
+import pro.fessional.wings.slardar.security.SecurityContextUtil;
+import pro.fessional.wings.slardar.security.WingsOAuth2xContext;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author trydofor
+ * @since 2019-11-30
+ */
+@Service
+@Setter(onMethod = @__({@Autowired}))
+public class WingsUserDetailService implements UserDetailsService {
+
+ private WinUserLoginDao winUserLoginDao;
+ private WinUserDao winUserDao;
+ private AuthRoleService authRoleService;
+
+ // 支持的登录类型
+ private static final LoginType[] loginTypes = {
+ LoginType.EMAIL_PASS,
+ LoginType.NAME_PASS
+ };
+
+ private static final UserStatus[] enables = {
+ UserStatus.UNINIT,
+ UserStatus.ACTIVE
+ };
+
+
+ @Override
+ public WingsUserDetail loadUserByUsername(String username) {
+ WingsOAuth2xContext.Context ctx = SecurityContextUtil.getOauth2xContext();
+ Assert.notNull(ctx, "oauth2x context is null");
+ // 使用alias来判断类型
+ String alias = ctx.getOauthPasswordAlias();
+ LoginType loginType = ConstantEnumUtil.codeOrNull(alias, loginTypes);
+ if (loginType == null) {
+ throw new UsernameNotFoundException("bad login type, username=" + username);
+ }
+// String password = passwordEncoder.encode("moilioncircle");
+
+ WinUserLoginTable t = winUserLoginDao.getAliasForReader();
+ Condition cond = t.LoginName.eq(username)
+ .and(t.LoginType.eq(loginType.getId()));
+ List logins = winUserLoginDao.fetch(cond);
+
+ if (logins.size() != 1) {
+ throw new UsernameNotFoundException("find " + logins.size() + " users. username=" + username);
+ }
+
+ WinUserLogin login = logins.get(0);
+ WinUser user = winUserDao.fetchOneById(login.getUserId());
+ if (user == null) {
+ throw new UsernameNotFoundException("can not find users. id=" + login.getUserId());
+ }
+
+ Set auths = authRoleService.loadRoleAuth(user.getRoleSet(), user.getAuthSet());
+
+ WingsUserDetail detail = new WingsUserDetail();
+ detail.setUsername(username);
+ detail.setPassword(login.getLoginPass());
+ detail.setAuthorities(null);
+ detail.setUserId(user.getId());
+ detail.setUserType(UserType.GUEST.getId());
+ detail.setLoginType(loginType.getId());
+ detail.setName(user.getName());
+ detail.setGender(user.getGender());
+ detail.setBirth(user.getBirth());
+ detail.setAvatar(user.getAvatar());
+ detail.setCountry(user.getCountry());
+ detail.setLocale(LocaleResolver.locale(user.getLanguage()));
+ detail.setZoneId(TimezoneEnumUtil.idOrThrow(user.getTimezone(), StandardTimezone.values()).toZoneId());
+
+ detail.setAccountNonExpired(true);
+ detail.setAccountNonLocked(true);
+ detail.setCredentialsNonExpired(true);
+ detail.setEnabled(ConstantEnumUtil.idIn(user.getStatus(), enables));
+ detail.setAuthorities(auths);
+
+ return detail;
+ }
+}
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/AuthorizationServerConfiguration.java b/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/AuthorizationServerConfiguration.java
new file mode 100644
index 000000000..71c22402d
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/AuthorizationServerConfiguration.java
@@ -0,0 +1,39 @@
+package pro.fessional.wings.example.spring.bean;
+
+import lombok.Setter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
+import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
+import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
+import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
+import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;
+import pro.fessional.wings.slardar.spring.bean.WingsOAuth2xConfiguration;
+
+/**
+ * @author trydofor
+ * @since 2019-12-01
+ */
+@Configuration
+@EnableAuthorizationServer
+public class AuthorizationServerConfiguration extends AuthorizationServerConfigurerAdapter {
+
+ @Setter(onMethod = @__({@Autowired}))
+ private WingsOAuth2xConfiguration.Helper helper;
+
+ @Override
+ public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
+ helper.configure(clients);
+ }
+
+ @Override
+ public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
+ helper.configure(endpoints);
+
+ }
+
+ @Override
+ public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
+ helper.configure(security);
+ }
+}
\ No newline at end of file
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/ResourceServerConfigurer.java b/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/ResourceServerConfiguration.java
similarity index 51%
rename from wings-example/src/main/java/pro/fessional/wings/example/spring/bean/ResourceServerConfigurer.java
rename to wings-example/src/main/java/pro/fessional/wings/example/spring/bean/ResourceServerConfiguration.java
index 3d9c2c767..1f581c07a 100644
--- a/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/ResourceServerConfigurer.java
+++ b/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/ResourceServerConfiguration.java
@@ -2,13 +2,12 @@
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer;
-import org.springframework.security.oauth2.provider.token.RemoteTokenServices;
+import pro.fessional.wings.example.enums.auto.Authority;
import pro.fessional.wings.slardar.spring.bean.WingsOAuth2xConfiguration;
/**
@@ -17,7 +16,7 @@
*/
@Configuration
@EnableResourceServer
-public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
+public class ResourceServerConfiguration extends ResourceServerConfigurerAdapter {
@Setter(onMethod = @__({@Autowired}))
private WingsOAuth2xConfiguration.Helper helper;
@@ -30,25 +29,12 @@ public void configure(ResourceServerSecurityConfigurer resources) throws Excepti
@Override
public void configure(HttpSecurity http) throws Exception {
helper.permitAll(http)
- .antMatchers("/test/").permitAll()
- .antMatchers("/flywave-*.json").permitAll()
- .antMatchers("/index.html","/").permitAll()
- .antMatchers("/string.json", "/journal.json").permitAll()
- .antMatchers("/test.json").permitAll()
- .antMatchers("/sleep.html").permitAll()
- .antMatchers("/speed.html").permitAll()
- .antMatchers("/oauth2-login.html").permitAll()
- .antMatchers("/oauth2.html").hasAuthority("ROLE_ADMIN")
+ .antMatchers("/login.json", "/logout.json").permitAll()
+ .antMatchers("/index.html", "/").permitAll()
+ .antMatchers("/test/**/*").permitAll()
+ .antMatchers("/user/create.json")
+ .hasAnyAuthority(Authority.$CREATE_ROLE, Authority.$CREATE_USER)
.anyRequest().authenticated()
;
}
-
- @Bean
- public RemoteTokenServices tokenService() {
- RemoteTokenServices tokenService = new RemoteTokenServices();
- tokenService.setCheckTokenEndpointUrl("http://localhost:8081/oauth/check_token");
- tokenService.setClientId("wings-slardar-id");
- tokenService.setClientSecret("wings-slardar-secret");
- return tokenService;
- }
}
\ No newline at end of file
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/WebSecurityConfiguration.java b/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/WebSecurityConfiguration.java
new file mode 100644
index 000000000..09f4378ff
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/WebSecurityConfiguration.java
@@ -0,0 +1,51 @@
+package pro.fessional.wings.example.spring.bean;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.config.BeanIds;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+
+/**
+ * @author trydofor
+ * @since 2019-12-01
+ */
+@Configuration
+@EnableWebSecurity
+public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
+
+ /**
+ * The URL paths provided by the framework are
+ * /oauth/authorize (the authorization endpoint),
+ * /oauth/token (the token endpoint),
+ * /oauth/confirm_access (user posts approval for grants here),
+ * /oauth/error (used to render errors in the authorization server),
+ * /oauth/check_token (used by Resource Servers to decode access tokens), and
+ * /oauth/token_key (exposes public key for token verification if using JWT tokens).
+ *
+ * Note: if your Authorization Server is also a Resource Server then
+ * there is another security filter chain with lower priority controlling the API resources.
+ * Fo those requests to be protected by access tokens you need their paths
+ * not to be matched by the ones in the main user-facing filter chain,
+ * so be sure to include a request matcher that picks out
+ * only non-API resources in the WebSecurityConfigurer above.
+ */
+ @Override
+ public void configure(HttpSecurity http) throws Exception {
+ http.httpBasic()
+ .and()
+ .csrf()
+ .disable()
+ ;
+ }
+
+ // need AuthenticationManager Bean
+ // password grants are switched on by injecting an AuthenticationManager
+ @Bean(BeanIds.AUTHENTICATION_MANAGER)
+ @Override
+ public AuthenticationManager authenticationManagerBean() throws Exception {
+ return super.authenticationManagerBean();
+ }
+}
\ No newline at end of file
diff --git a/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/WingsSwaggerConfiguration.java b/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/WingsSwaggerConfiguration.java
new file mode 100644
index 000000000..cced7402d
--- /dev/null
+++ b/wings-example/src/main/java/pro/fessional/wings/example/spring/bean/WingsSwaggerConfiguration.java
@@ -0,0 +1,41 @@
+package pro.fessional.wings.example.spring.bean;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * @author jeff
+ * @since 2019-10-30
+ */
+@Configuration
+@EnableSwagger2
+@Profile({"dev", "init"})
+public class WingsSwaggerConfiguration {
+
+ @Bean
+ public Docket createRestApi() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .select()
+ .apis(RequestHandlerSelectors
+ .basePackage("pro.fessional.wings.example.controller"))
+ .paths(PathSelectors.regex("/.*"))
+ .build().apiInfo(apiSiteInfo());
+ }
+
+ private ApiInfo apiSiteInfo() {
+ return new ApiInfoBuilder()
+ .title("专业大翅【wings】")
+ .description("wings exmaple")
+ .version("2.2.7-SNAPSHOT")
+ .build();
+ }
+}
+
diff --git a/wings-example/src/main/resources/application.properties b/wings-example/src/main/resources/application.properties
index 907b8d105..d377c0c21 100644
--- a/wings-example/src/main/resources/application.properties
+++ b/wings-example/src/main/resources/application.properties
@@ -1,3 +1,3 @@
-server.error.whitelabel.enabled=false
server.port=8080
-spring.application.name=wings-example
\ No newline at end of file
+spring.application.name=wings-example
+spring.profiles.active=dev
\ No newline at end of file
diff --git a/wings-example/src/main/resources/templates/index.html b/wings-example/src/main/resources/templates/index.html
deleted file mode 100644
index e7828a79d..000000000
--- a/wings-example/src/main/resources/templates/index.html
+++ /dev/null
@@ -1,62 +0,0 @@
-
-