Commit Graph
12 Commits
Author SHA1 Message Date
Lunny XiaoandGitHub 719bddcd76 Move repository model into models/repo (#17933)
* Some refactors related repository model

* Move more methods out of repository

* Move repository into models/repo

* Fix test

* Fix test

* some improvements

* Remove unnecessary function
2021-12-10 09:27:50 +08:00
Lunny XiaoandGitHub a666829a37 Move user related model into models/user (#17781)
* Move user related model into models/user

* Fix lint for windows

* Fix windows lint

* Fix windows lint

* Move some tests in models

* Merge
2021-11-24 17:49:20 +08:00
Lunny XiaoandGitHub d710af6669 Remove NewSession method from db.Engine interface (#17577)
* Remove NewSession method from db.Engine interface

* Fix bug

* Some improvements

* Fix bug

* Fix test

* Use XXXBean instead of XXXExample
2021-11-21 23:41:00 +08:00
Lunny XiaoandGitHub fc3d082609 Move attachment into models/repo/ (#17650)
* Move attachment into models/repo/

* Fix test

* Fix bug
2021-11-19 21:39:57 +08:00
Lunny XiaoandGitHub 99b2858e62 Move unit into models/unit/ (#17576)
* Move unit into models/unit/

* Rename unit.UnitType as unit.Type
2021-11-09 20:57:58 +01:00
zeripathandGitHub 9302eba971 DBContext is just a Context (#17100)
* DBContext is just a Context

This PR removes some of the specialness from the DBContext and makes it context
This allows us to simplify the GetEngine code to wrap around any context in future
and means that we can change our loadRepo(e Engine) functions to simply take contexts.

Signed-off-by: Andrew Thornton <[email protected]>

* fix unit tests

Signed-off-by: Andrew Thornton <[email protected]>

* another place that needs to set the initial context

Signed-off-by: Andrew Thornton <[email protected]>

* avoid race

Signed-off-by: Andrew Thornton <[email protected]>

* change attachment error

Signed-off-by: Andrew Thornton <[email protected]>
2021-09-23 23:45:36 +08:00
a4bfef265d Move db related basic functions to models/db (#17075)
* Move db related basic functions to models/db

* Fix lint

* Fix lint

* Fix test

* Fix lint

* Fix lint

* revert unnecessary change

* Fix test

* Fix wrong replace string

* Use *Context

* Correct committer spelling and fix wrong replaced words

Co-authored-by: zeripath <[email protected]>
2021-09-19 19:49:59 +08:00
luzpazandGitHub e0296b6a6d Fix various documentation, user-facing, and source comment typos (#16367)
* Fix various doc, user-facing, and source comment typos

Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby`
2021-07-08 13:38:13 +02:00
Bo-Yi WuandGitHub 167b0f46ef chore(models): rewrite code format. (#14754)
* chore: rewrite format.

* chore: update format

Signed-off-by: Bo-Yi Wu <[email protected]>

* chore: update format

Signed-off-by: Bo-Yi Wu <[email protected]>

* chore: Adjacent parameters with the same type should be grouped together

* chore: update format.
2021-03-14 19:52:12 +01:00
Lunny XiaoandGitHub 85202d4784 Display ui time with customize time location (#7792)
* display ui time with customize time location

* fix lint

* rename UILocation to DefaultUILocation

* move time related functions to modules/timeutil

* fix tests

* fix tests

* fix build

* fix swagger
2019-08-15 22:46:21 +08:00
Lunny XiaoandGitHub 2b7c366f64 fix sqlite lock (#5184)
* fix sqlite lock

* fix bug

Co-Authored-By: lunny <[email protected]>

* fix bug

Co-Authored-By: lunny <[email protected]>
2018-10-27 22:45:24 +08:00
kolaenteandtechknowlogick 1bff02de55 Added dependencies for issues (#2196) (#2531) 2018-07-17 17:23:58 -04:00