Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tabulator-another
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
MyCard
tabulator-another
Commits
345755c3
Commit
345755c3
authored
Apr 26, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bump nicot again
parent
0578c810
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
27 deletions
+13
-27
package-lock.json
package-lock.json
+4
-4
package.json
package.json
+1
-1
src/tournament/entities/Tournament.entity.ts
src/tournament/entities/Tournament.entity.ts
+8
-12
src/utility/query-operator.ts
src/utility/query-operator.ts
+0
-10
No files found.
package-lock.json
View file @
345755c3
...
...
@@ -22,7 +22,7 @@
"lodash"
:
"^4.17.21"
,
"nesties"
:
"^1.1.1"
,
"nestjs-mycard"
:
"^4.0.2"
,
"nicot"
:
"^1.1.1
1
"
,
"nicot"
:
"^1.1.1
3
"
,
"pg"
:
"^8.14.1"
,
"pg-native"
:
"^3.3.0"
,
"reflect-metadata"
:
"^0.2.2"
,
...
...
@@ -9061,9 +9061,9 @@
}
},
"node_modules/nicot"
:
{
"version"
:
"1.1.1
1
"
,
"resolved"
:
"https://registry.npmjs.org/nicot/-/nicot-1.1.1
1
.tgz"
,
"integrity"
:
"sha512-
ttZayz/JbVaJ4R4MA3bPht1+qGAC/DJ6/9sPw72wICuWakSFSMaxJbX4yQxdZ1TP8+fDYxt2UGEtrtkMbpbdr
A=="
,
"version"
:
"1.1.1
3
"
,
"resolved"
:
"https://registry.npmjs.org/nicot/-/nicot-1.1.1
3
.tgz"
,
"integrity"
:
"sha512-
uBDjRUx/jmuUGxQeC/KtmkP8C/QIZYRYJMYJuszAV7M1Na+Um9hnHTcTWeSK+whrXoIEt8bJlERFn/CnRTi06
A=="
,
"license"
:
"MIT"
,
"dependencies"
:
{
"lodash"
:
"^4.17.21"
,
...
...
package.json
View file @
345755c3
...
...
@@ -33,7 +33,7 @@
"
lodash
"
:
"
^4.17.21
"
,
"
nesties
"
:
"
^1.1.1
"
,
"
nestjs-mycard
"
:
"
^4.0.2
"
,
"
nicot
"
:
"
^1.1.1
1
"
,
"
nicot
"
:
"
^1.1.1
3
"
,
"
pg
"
:
"
^8.14.1
"
,
"
pg-native
"
:
"
^3.3.0
"
,
"
reflect-metadata
"
:
"
^0.2.2
"
,
...
...
src/tournament/entities/Tournament.entity.ts
View file @
345755c3
...
...
@@ -17,7 +17,10 @@ import {
NotInResult
,
NotQueryable
,
NotWritable
,
QueryColumn
,
QueryEqual
,
QueryGreaterEqual
,
QueryLessEqual
,
RelationComputed
,
}
from
'
nicot
'
;
import
{
MycardUser
}
from
'
nestjs-mycard
'
;
...
...
@@ -38,7 +41,6 @@ import { Match } from '../../match/entities/match.entity';
import
{
TournamentRules
}
from
'
../../tournament-rules/rule-map
'
;
import
_
from
'
lodash
'
;
import
{
RenameClass
}
from
'
nicot/dist/src/utility/rename-class
'
;
import
{
QueryOperator
}
from
'
../../utility/query-operator
'
;
export
enum
TournamentRule
{
SingleElimination
=
'
SingleElimination
'
,
...
...
@@ -134,24 +136,18 @@ export class Tournament extends DescBase {
@
DateColumn
({
description
:
'
创建时间
'
,
columnExtras
:
{
nullable
:
false
}
})
createdAt
:
Date
;
@
NotWritable
()
@
NotInResult
()
@
IsDate
()
@
QueryOperator
(
'
createdAt
'
,
'
<=
'
)
@
ApiProperty
({
@
QueryColumn
({
description
:
'
查询创建时间在什么时候之前的比赛
'
,
required
:
false
,
})
@
QueryLessEqual
(
'
createdAt
'
)
createdAtBefore
:
Date
;
@
NotWritable
()
@
NotInResult
()
@
IsDate
()
@
QueryOperator
(
'
createdAt
'
,
'
>=
'
)
@
ApiProperty
({
description
:
'
查询创建时间在什么时候之后的比赛
'
,
required
:
false
,
@
QueryColumn
({
description
:
'
查询创建时间在什么时候之前的比赛
'
,
})
@
QueryGreaterEqual
(
'
createdAt
'
)
createdAtAfter
:
Date
;
@
NotColumn
()
...
...
src/utility/query-operator.ts
deleted
100644 → 0
View file @
0578c810
import
{
QueryCondition
}
from
'
nicot
'
;
export
const
QueryOperator
=
(
dateField
:
string
,
operator
:
string
)
=>
QueryCondition
((
obj
,
qb
,
entityName
,
key
)
=>
{
if
(
!
obj
[
key
])
return
;
const
typeormKey
=
`operator_
${
entityName
}
_
${
dateField
}
_
${
key
}
`
;
qb
.
andWhere
(
`
${
entityName
}
.
${
dateField
}
${
operator
}
:
${
typeormKey
}
`
,
{
[
typeormKey
]:
obj
[
key
],
});
});
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