⚡ 优化代码

This commit is contained in:
awenes
2023-09-21 22:02:28 +08:00
parent 558f7e8b0a
commit 6d69209194
4 changed files with 55 additions and 137 deletions
@@ -82,143 +82,7 @@
<constraints nullable="true"/>
</column>
</createTable>
<createTable remarks="应用权限资源" tableName="app_permission_resource">
<column name="id_" remarks="主键ID" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name_" remarks="资源名称" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="code_" remarks="资源编码" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="desc_" remarks="资源描述" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="app_id" remarks="所属应用" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="is_enabled" remarks="是否启用" type="TINYINT(1)"/>
<column name="create_by" remarks="创建者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="create_time" remarks="创建时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="update_by" remarks="修改者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="update_time" remarks="修改时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="remark_" remarks="备注" type="TEXT"/>
<column name="is_deleted" remarks="删除标记" type="TINYINT(1)" defaultValueNumeric="0">
<constraints nullable="true"/>
</column>
</createTable>
<createTable remarks="应用权限角色表" tableName="app_permission_role">
<column name="id_" remarks="主键ID" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name_" remarks="角色名称" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column name="code_" remarks="角色编码" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="app_id" remarks="所属应用" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="is_enabled" remarks="是否启用" type="TINYINT(1)"/>
<column name="create_by" remarks="创建者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="create_time" remarks="创建时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="update_by" remarks="修改者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="update_time" remarks="修改时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="remark_" remarks="备注" type="TEXT"/>
<column name="is_deleted" remarks="删除标记" type="TINYINT(1)" defaultValueNumeric="0">
<constraints nullable="true"/>
</column>
</createTable>
<createTable remarks="应用权限项" tableName="app_permission_action">
<column name="id_" remarks="主键ID" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="value_" remarks="操作编码" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="type_" remarks="权限类型" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="name_" remarks="权限描述" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="resource_id" remarks="所属资源" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="create_by" remarks="创建者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="create_time" remarks="创建时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="update_by" remarks="修改者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="update_time" remarks="修改时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="remark_" remarks="备注" type="TEXT"/>
<column name="is_deleted" remarks="删除标记" type="TINYINT(1)" defaultValueNumeric="0">
<constraints nullable="true"/>
</column>
</createTable>
<createTable remarks="应用权限策略" tableName="app_permission_policy">
<column name="id_" type="BIGINT" remarks="主键ID">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="app_id" remarks="所属应用" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="subject_id" remarks="权限主体ID(用户、角色、分组、组织机构)" type="VARCHAR2(64)">
<constraints nullable="false"/>
</column>
<column name="subject_type" remarks="权限主体类型(用户、角色、分组、组织机构)" type="VARCHAR(20)">
<constraints nullable="false"/>
</column>
<column name="object_id" remarks="权限客体ID(操作权限、角色)" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="object_type" remarks="权限客体类型(操作权限、角色)" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="effect_" remarks="效果(Allow(允许)、Deny(拒绝))" type="VARCHAR(10)">
<constraints nullable="false"/>
</column>
<column name="create_by" remarks="创建者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="create_time" remarks="创建时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="update_by" remarks="修改者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="update_time" remarks="修改时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="remark_" remarks="备注" type="TEXT"/>
<column name="is_deleted" remarks="删除标记" type="TINYINT(1)" defaultValueNumeric="0">
<constraints nullable="true"/>
</column>
</createTable>
<!--创建索引-->
<createIndex tableName="app_group_association" indexName="uk_app_group_association" unique="true">
<column name="group_id"/>
<column name="app_id"/>