Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
I
init-things
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
init-things
Commits
23f50897
Commit
23f50897
authored
Nov 25, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
override
parent
53ee82d4
Pipeline
#7151
passed with stages
in 1 minute and 5 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
things/nest-typeorm/src/entities/User.entity.ts
things/nest-typeorm/src/entities/User.entity.ts
+1
-1
things/nest-typeorm/src/entities/bases/IdBase.entity.ts
things/nest-typeorm/src/entities/bases/IdBase.entity.ts
+1
-1
things/nest-typeorm/src/entities/bases/IdNameBase.entity.ts
things/nest-typeorm/src/entities/bases/IdNameBase.entity.ts
+1
-1
things/nest-typeorm/src/entities/bases/ManualIdBase.entity.ts
...gs/nest-typeorm/src/entities/bases/ManualIdBase.entity.ts
+4
-1
things/nest-typeorm/src/entities/bases/ManualNameBase.entity.ts
.../nest-typeorm/src/entities/bases/ManualNameBase.entity.ts
+4
-1
No files found.
things/nest-typeorm/src/entities/User.entity.ts
View file @
23f50897
...
...
@@ -23,7 +23,7 @@ export enum UserRole {
@
Entity
()
export
class
User
extends
ManualNameDescBase
implements
QueryWise
<
User
>
{
applyQuery
(
qb
:
SelectQueryBuilder
<
User
>
,
entityName
:
string
)
{
override
applyQuery
(
qb
:
SelectQueryBuilder
<
User
>
,
entityName
:
string
)
{
super
.
applyQuery
(
qb
,
entityName
);
}
}
things/nest-typeorm/src/entities/bases/IdBase.entity.ts
View file @
23f50897
...
...
@@ -20,7 +20,7 @@ export class IdBase extends TimeBase implements IdWise {
@
IsPositive
()
id
:
number
;
applyQuery
(
qb
:
SelectQueryBuilder
<
IdBase
>
,
entityName
:
string
)
{
override
applyQuery
(
qb
:
SelectQueryBuilder
<
IdBase
>
,
entityName
:
string
)
{
super
.
applyQuery
(
qb
,
entityName
);
qb
.
orderBy
(
`
${
entityName
}
.id`
,
'
DESC
'
);
applyQueryProperty
(
this
,
qb
,
entityName
,
'
id
'
);
...
...
things/nest-typeorm/src/entities/bases/IdNameBase.entity.ts
View file @
23f50897
...
...
@@ -8,7 +8,7 @@ export class IdNameBase extends IdBase implements IdNameWise {
@
EntityName
()
name
:
string
;
applyQuery
(
qb
:
SelectQueryBuilder
<
IdNameBase
>
,
entityName
:
string
)
{
override
applyQuery
(
qb
:
SelectQueryBuilder
<
IdNameBase
>
,
entityName
:
string
)
{
super
.
applyQuery
(
qb
,
entityName
);
applyQueryPropertyLike
(
this
,
qb
,
entityName
,
'
name
'
);
}
...
...
things/nest-typeorm/src/entities/bases/ManualIdBase.entity.ts
View file @
23f50897
...
...
@@ -14,7 +14,10 @@ export class ManualIdBase extends TimeBase implements StringIdWise {
@
IsNotEmpty
()
id
:
string
;
applyQuery
(
qb
:
SelectQueryBuilder
<
ManualIdBase
>
,
entityName
:
string
)
{
override
applyQuery
(
qb
:
SelectQueryBuilder
<
ManualIdBase
>
,
entityName
:
string
,
)
{
super
.
applyQuery
(
qb
,
entityName
);
qb
.
orderBy
(
`
${
entityName
}
.id`
,
'
DESC
'
);
applyQueryProperty
(
this
,
qb
,
entityName
,
'
id
'
);
...
...
things/nest-typeorm/src/entities/bases/ManualNameBase.entity.ts
View file @
23f50897
...
...
@@ -7,7 +7,10 @@ import { applyQueryPropertyLike } from '../utility/query';
export
class
ManualNameBase
extends
ManualIdBase
implements
StringIdNameWise
{
@
EntityName
()
name
:
string
;
applyQuery
(
qb
:
SelectQueryBuilder
<
ManualNameBase
>
,
entityName
:
string
)
{
override
applyQuery
(
qb
:
SelectQueryBuilder
<
ManualNameBase
>
,
entityName
:
string
,
)
{
super
.
applyQuery
(
qb
,
entityName
);
applyQueryPropertyLike
(
this
,
qb
,
entityName
,
'
name
'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment