You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: modules do not rely on models, services do (#17861)
services: provide some services for users, usually use
database (models) modules: provide some basic functions without
database, eg: code parser, etc The major difference is services use
database, while modules don’t.
Signed-off-by: singuliere <singuliere@autistici.org>
Copy file name to clipboardExpand all lines: docs/content/doc/developers/guidelines-backend.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ To maintain understandable code and avoid circular dependencies it is important
38
38
-`models/db`: Basic database operations. All other `models/xxx` packages should depend on this package. The `GetEngine` function should only be invoked from `models/`.
39
39
-`models/fixtures`: Sample data used in unit tests and integration tests. One `yml` file means one table which will be loaded into database when beginning the tests.
40
40
-`models/migrations`: Stores database migrations between versions. PRs that change a database structure **MUST** also have a migration step.
41
-
-`modules`: Different modules to handle specific functionality in Gitea. Work in Progress: Some of them should be moved to `services`.
41
+
-`modules`: Different modules to handle specific functionality in Gitea. Work in Progress: Some of them should be moved to `services`, in particular those that depend on models because they rely on the database.
42
42
-`modules/setting`: Store all system configurations read from ini files and has been referenced by everywhere. But they should be used as function parameters when possible.
43
43
-`modules/git`: Package to interactive with `Git` command line or Gogit package.
0 commit comments