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
a29c689c
Commit
a29c689c
authored
Dec 10, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base
parent
9f1e4173
Pipeline
#7686
passed with stages
in 1 minute and 28 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletion
+36
-1
things/nest-typeorm/src/entities/bases/AvatarBase.entity.ts
things/nest-typeorm/src/entities/bases/AvatarBase.entity.ts
+14
-0
things/nest-typeorm/src/entities/bases/IdNameDescBase.entity.ts
.../nest-typeorm/src/entities/bases/IdNameDescBase.entity.ts
+10
-0
things/nest-typeorm/src/entities/bases/ManualNameDescBase.entity.ts
...t-typeorm/src/entities/bases/ManualNameDescBase.entity.ts
+12
-1
No files found.
things/nest-typeorm/src/entities/bases/AvatarBase.entity.ts
0 → 100644
View file @
a29c689c
import
{
IdNameDescBase
}
from
'
./IdNameDescBase.entity
'
;
import
{
StringColumn
}
from
'
../decorators/base
'
;
import
{
SelectQueryBuilder
}
from
'
typeorm
'
;
import
{
applyQueryPropertyLike
}
from
'
../utility/query
'
;
export
class
AvatarBase
extends
IdNameDescBase
{
@
StringColumn
(
128
,
'
图标地址
'
,
undefined
,
false
)
avatarUrl
:
string
;
override
applyQuery
(
qb
:
SelectQueryBuilder
<
AvatarBase
>
,
entityName
:
string
)
{
super
.
applyQuery
(
qb
,
entityName
);
applyQueryPropertyLike
(
this
,
qb
,
entityName
,
'
avatarUrl
'
);
}
}
things/nest-typeorm/src/entities/bases/IdNameDescBase.entity.ts
View file @
a29c689c
import
{
IdNameBase
}
from
'
./IdNameBase.entity
'
;
import
{
IdNameBase
}
from
'
./IdNameBase.entity
'
;
import
{
IdNameDescWise
}
from
'
../interfaces/wises
'
;
import
{
IdNameDescWise
}
from
'
../interfaces/wises
'
;
import
{
EntityDescription
}
from
'
../decorators/extended
'
;
import
{
EntityDescription
}
from
'
../decorators/extended
'
;
import
{
SelectQueryBuilder
}
from
'
typeorm
'
;
import
{
applyQueryPropertyLike
}
from
'
../utility/query
'
;
export
class
IdNameDescBase
extends
IdNameBase
implements
IdNameDescWise
{
export
class
IdNameDescBase
extends
IdNameBase
implements
IdNameDescWise
{
@
EntityDescription
()
@
EntityDescription
()
desc
:
string
;
desc
:
string
;
override
applyQuery
(
qb
:
SelectQueryBuilder
<
IdNameDescBase
>
,
entityName
:
string
,
)
{
super
.
applyQuery
(
qb
,
entityName
);
applyQueryPropertyLike
(
this
,
qb
,
entityName
,
'
desc
'
);
}
}
}
things/nest-typeorm/src/entities/bases/ManualNameDescBase.entity.ts
View file @
a29c689c
import
{
ManualNameBase
}
from
'
./ManualNameBase.entity
'
;
import
{
ManualNameBase
}
from
'
./ManualNameBase.entity
'
;
import
{
StringIdNameDescWise
}
from
'
../interfaces/wises
'
;
import
{
StringIdNameDescWise
}
from
'
../interfaces/wises
'
;
import
{
EntityDescription
}
from
'
../decorators/extended
'
;
import
{
EntityDescription
}
from
'
../decorators/extended
'
;
import
{
SelectQueryBuilder
}
from
'
typeorm
'
;
import
{
applyQueryPropertyLike
}
from
'
../utility/query
'
;
export
class
ManualNameDescBase
export
class
ManualNameDescBase
extends
ManualNameBase
extends
ManualNameBase
implements
StringIdNameDescWise
{
implements
StringIdNameDescWise
{
@
EntityDescription
()
@
EntityDescription
()
desc
:
string
;
desc
:
string
;
override
applyQuery
(
qb
:
SelectQueryBuilder
<
ManualNameDescBase
>
,
entityName
:
string
,
)
{
super
.
applyQuery
(
qb
,
entityName
);
applyQueryPropertyLike
(
this
,
qb
,
entityName
,
'
desc
'
);
}
}
}
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