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
d84a8af6
Commit
d84a8af6
authored
Mar 06, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
34934752
Pipeline
#10445
passed with stages
in 2 minutes and 33 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
things/nest-typeorm/src/entities/decorators/relation.ts
things/nest-typeorm/src/entities/decorators/relation.ts
+7
-1
No files found.
things/nest-typeorm/src/entities/decorators/relation.ts
View file @
d84a8af6
...
...
@@ -30,6 +30,7 @@ export const RelationColumn = (
IsInt
(),
IsPositive
(),
]);
export
const
StringRelationColumn
=
(
description
=
'
对应编号
'
,
notNull
=
false
,
...
...
@@ -38,7 +39,12 @@ export const StringRelationColumn = (
)
=>
MergePropertyDecorators
([
Column
(
'
varchar
'
,
{
length
:
32
,
nullable
:
!
notNull
,
...
columnExtras
}),
ApiProperty
({
type
:
String
,
description
,
...
propertyExtras
}),
ApiProperty
({
type
:
String
,
required
:
notNull
,
description
,
...
propertyExtras
,
}),
...(
notNull
?
[]
:
[
IsOptional
()]),
IsNotEmpty
(),
]);
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