Commit Graph

24 Commits

Author SHA1 Message Date
Wu Clan
ebe710fac2 Update menu field show to display (#498) 2025-01-23 22:46:05 +08:00
Meepoljdx
78dad3021a Add postgresql database support (#475)
* feat: add postgresql db supports

* change: change mysql conn str create way

* fix: Modify the default alembic migration file to meet multi-database support

* Update settings and lint

* update models

* Simplify database config

* Simplify the get db method

* Update create db url

* Updated model type adaptation

* Update sql scripts

* Fix models type

* Adaptation to postgresql code generation

* Update README.md

* Fix alembic file template

* Update docker scripts
2024-12-25 22:04:04 +08:00
Wu Clan
4f59f459a0 Remove data scope in the role model (#478) 2024-12-24 17:29:17 +08:00
Wu Clan
7c4e288fd6 Simplify data rule and remove type (#468)
* Simplify data rule and remove type

* fix lint

* fix user info cache
2024-11-27 14:09:57 +08:00
Wu Clan
1838b63b11 Fix schema type of user role rule (#467)
* Fix schema type of user role rule

* Fix sql scripts
2024-11-24 16:42:40 +08:00
Wu Clan
bd45022a59 Update role-based data permissions (#465)
* Add department data operation permissions

* Update sys models

* Add role department many-to-many relationship

* Format RBAC code

* update codes

* add update role depts api

* add comments

* Update the implementation

* update dept arg

* debug front

* Update the model file naming

* Refactor the data perms

* Add data permission rule

* Optimize the details

* Implement data filtering

* finish
2024-11-23 21:23:52 +08:00
Wu Clan
ab4495ce65 Optimize and normalize the code generator (#430) 2024-09-24 13:50:02 +08:00
Wu Clan
a602dff739 Update some code generation api and params (#373)
* Update some code generation api and params

* Update get business api query

* Add get business models api

* Fix get business models api serialize

* Add get generate code path api

* Update download method post to get

* Add get model detail api

* Fix crud model method

* Fix get model api return

* Fix update model service

* Update create update model service

* Add code generate sql

* Add code generate api permissions

* Update code gen path join
2024-08-04 15:24:09 +08:00
Wu Clan
f9ec9d5d56 Add code generator app (#318)
* Add code generator app

* Define the generator interfaces

* Update the name of the template files

* update lock hash

* update route and schemas

* update gen code structure

* add some gen codes

* upgrade SQLAlchemy to release

* update template util

* Fix lint error

* Add template rendering code

* Add gen model code

* Fix gen model table

* Update business model column naming

* Update any route

* Fix api ninja args

* Update gen business model

* Fix interface services logic

* Fix template render

* Add more code template

* Add model auto gen template

* Fix model type map style

* Update schema and model templates

* Update gen_model schema

* Fix model template if

* Update have_datetime_column field from gen_model to gen_business table

* Update the name of the zip

* Update model template vars

* Add download generate code

* Add preview code encoding

* Update service code template

* fix lint

* Update github auth tag

* Update requirements

* Add code generation write

* Update generate interface and zip conf

* Optimize templates details

* Update model relation column conf

* Add import tables module

* Add get all databases interface

* Fix get tables interface

* Bump pydantic to 2.8.1

* Upgrading lint dependencies

* Add import business and model implement

* Split import database execution code

* Update text SQL execution to prevent SQL injection

* Optimize schema name generation

* clean code

* Update create tables sql scripts

* Update import sql query conditions

* Add todo comments

* Mark business creation interface

* Update features in README
2024-07-10 12:12:29 +08:00
Wu Clan
5e438c685d Refactor the backend architecture (#299)
* define the basic architecture

* Update script and deployment file locations

* Update the route registration

* Fix CI download dependencies

* Updated ruff to 0.3.3

* Update app subdirectory naming

* Update the model import

* fix pre-commit pdm lock

* Update the service directory naming

* Add CRUD method documents

* Fix the issue of circular import

* Update the README document

* Update the SQL statement for create tables

* Update docker scripts and documentation

* Fix docker scripts

* Update the backend README.md

* Add the security folder and move the redis client

* Update the configuration item

* Fix environment configuration reads

* Update the default configuration

* Updated README description

* Updated the user registration API

* Fix test cases

* Update the celery configuration

* Update and fix celery configuration

* Updated the celery structure

* Update celery tasks and api

* Add celery flower

* Update the import style

* Update contributors
2024-03-22 18:16:15 +08:00
Wu Clan
5c7d6659cf Reconstruct RBAC authentication logic (#264)
* Reconstruct RBAC authentication logic

* fix typo

* Migrate casbin sqla Adapter to redis

* Delete casbin model conf file

* Add permission dependencies

* Add request permission depends on execution condition

* Update openapi authorization method

* Add request permission identity

* Add request permission dependency description

* Migrate casbin redis adapter to sqla

* Update menu model and add function

* Fix menu permission identification

* Update user partial interface permissions

* Update menu table SQL

* Add role menu permission description to README

* fix README typo

* Simplify permission dependency injection

* Fix menu authorization store

* Fix interface permission dependency order

* Update role menu permission flag

* Update the background permission logic of the interface
2024-01-08 09:35:47 +08:00
Wu Clan
3bb28a3379 Add init pytest data sql file (#231)
* Add init pytest data sql file

* Fix SQL style
2023-10-22 20:54:27 +08:00
Wu Clan
d9ffe20121 Fix the interface logic for dept details (#201)
* Fix the interface logic for dept details
2023-08-12 21:17:50 +08:00
Wu Clan
0b95f2c61e Update asynccasbin to casbin async api (#199)
* Update asynccasbin to casbin async api

* remove pymysql dependency

* update the test-user test to admin
2023-08-08 17:27:20 +08:00
Wu Clan
c1295dda84 Fix casbin async enforcer (#192)
* rename the file casbin_rbac to rbac

* omit

* fix casbin async enforcer

* update the group rule interface access permissions

* add menu permission validation

* update the init test data sql

* add the staff field to the user information query return
2023-07-31 17:12:07 +08:00
Wu Clan
eb662e4525 Add user password encryption salt (#191)
* Add user password encryption salt

* update the salt logic

* Update the SQL files

* Add an update admin login permission interface

* update the is_staff field comment

* update the staff error msg

* Update user backend management operation permissions
2023-07-31 10:53:46 +08:00
Wu Clan
811fd278f7 Update SQL files and use them as execution targets (#188) 2023-07-29 00:18:16 +08:00
Wu Clan
f21006000a Update user role interface to standalone (#177)
* Update user role interface to standalone

* Fix the userinfo schema department field type

* fix update userinfo values

* fix update user avatar value

* update readme docs

* update test data sql

* update readme typo

* update readme docs
2023-07-14 17:01:47 +08:00
Wu Clan
d877c86664 Update monitoring return data (#176) 2023-07-13 17:44:07 +08:00
Wu Clan
44befcc79f Add query users by department ID (#175)
* Add query users by department ID

* fix dept parent id schema field

* fix dept get all select

* update the test sql
2023-07-09 16:39:37 +08:00
dylan
b194a32395 fix get_tree_data exception. (#169) 2023-07-04 20:41:17 +08:00
Wu Clan
84127066b7 Fix CORS 500 status code exception (#167)
* Fix CORS 500 status code exception

* update menu test sql data

* update docs string

* fix the exception category
2023-07-04 15:07:56 +08:00
Wu Clan
6f2c45a78d Update menu handling logic (#163)
* Restore superuser menu to get

* Update menu table fields

* Update the sql file

* Update the readme file

* lint
2023-07-02 00:44:27 +08:00
Wu Clan
01fb391934 Add database init sql files (#160) 2023-06-26 19:58:43 +08:00