Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Revive
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
Ygopro Arena Revive
Commits
9acd774c
Commit
9acd774c
authored
Feb 21, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some new apis and rename entities
parent
5ca9b2c4
Pipeline
#2465
passed with stages
in 39 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
198 additions
and
69 deletions
+198
-69
src/app.controller.ts
src/app.controller.ts
+46
-2
src/app.service.ts
src/app.service.ts
+135
-50
src/entities/mycard/DeckDemo.ts
src/entities/mycard/DeckDemo.ts
+1
-1
src/entities/mycard/DeckInfo.ts
src/entities/mycard/DeckInfo.ts
+2
-2
src/entities/mycard/DeckInfoHistory.ts
src/entities/mycard/DeckInfoHistory.ts
+2
-2
src/entities/mycard/UserInfo.ts
src/entities/mycard/UserInfo.ts
+8
-8
src/entities/mycard/Votes.ts
src/entities/mycard/Votes.ts
+4
-4
No files found.
src/app.controller.ts
View file @
9acd774c
...
@@ -80,8 +80,42 @@ export class AppController {
...
@@ -80,8 +80,42 @@ export class AppController {
}
}
@
Post
(
'
activity
'
)
@
Post
(
'
activity
'
)
async
updateActivity
(@
Body
()
body
:
any
)
{
async
updateActivity
(@
Body
()
body
:
any
,
@
Res
()
res
:
express
.
Response
)
{
return
await
this
.
appService
.
updateActivity
(
body
);
const
code
=
await
this
.
appService
.
updateActivity
(
body
);
res
.
status
(
code
).
json
({
code
});
}
@
Get
(
'
label
'
)
async
getLabel
(@
Res
()
res
:
express
.
Response
)
{
const
value
=
await
this
.
appService
.
getSiteConfig
(
'
label
'
);
if
(
value
)
{
res
.
status
(
200
).
json
({
code
:
200
,
text
:
value
,
});
}
else
{
res
.
status
(
500
).
json
({
code
:
500
,
});
}
}
@
Post
(
'
label
'
)
async
updateLabel
(
@
Body
(
'
labelone
'
)
value
:
string
,
@
Res
()
res
:
express
.
Response
,
)
{
const
code
=
await
this
.
appService
.
updateSiteConfig
(
'
label
'
,
value
);
res
.
status
(
code
).
json
({
code
});
}
@
Post
(
'
adSwitchChange
'
)
async
updateAdvertisementSetting
(
@
Body
(
'
status
'
)
value
:
string
,
@
Res
()
res
:
express
.
Response
,
)
{
const
code
=
await
this
.
appService
.
updateSiteConfig
(
'
auto_close_ad
'
,
value
);
res
.
status
(
code
).
json
({
code
});
}
}
@
Post
(
'
votes
'
)
@
Post
(
'
votes
'
)
...
@@ -177,4 +211,14 @@ export class AppController {
...
@@ -177,4 +211,14 @@ export class AppController {
}
}
res
.
json
({
deck
});
res
.
json
({
deck
});
}
}
@
Post
(
'
deckdemo
'
)
async
submitDeckDemo
(@
Body
()
body
:
any
,
@
Res
()
res
:
express
.
Response
)
{
const
code
=
await
this
.
appService
.
submitDeckDemo
(
body
);
res
.
status
(
code
).
json
({
code
});
}
@
Post
(
'
deckinfo
'
)
async
submitDeckInfo
(@
Body
()
body
:
any
,
@
Res
()
res
:
express
.
Response
)
{
const
code
=
await
this
.
appService
.
submitDeckInfo
(
body
);
res
.
status
(
code
).
json
({
code
});
}
}
}
src/app.service.ts
View file @
9acd774c
...
@@ -30,6 +30,7 @@ import { scheduleJob } from 'node-schedule';
...
@@ -30,6 +30,7 @@ import { scheduleJob } from 'node-schedule';
import
{
DeckInfo
}
from
'
./entities/mycard/DeckInfo
'
;
import
{
DeckInfo
}
from
'
./entities/mycard/DeckInfo
'
;
import
{
DeckInfoHistory
}
from
'
./entities/mycard/DeckInfoHistory
'
;
import
{
DeckInfoHistory
}
from
'
./entities/mycard/DeckInfoHistory
'
;
import
{
DeckDemo
}
from
'
./entities/mycard/DeckDemo
'
;
import
{
DeckDemo
}
from
'
./entities/mycard/DeckDemo
'
;
import
{
Deck
}
from
'
./entities/mycard/Deck
'
;
const
attrOffset
=
1010
;
const
attrOffset
=
1010
;
const
raceOffset
=
1020
;
const
raceOffset
=
1020
;
...
@@ -188,7 +189,7 @@ export class AppService {
...
@@ -188,7 +189,7 @@ export class AppService {
.
createQueryBuilder
(
'
userInfo
'
)
.
createQueryBuilder
(
'
userInfo
'
)
.
orderBy
(
orderByWhat
,
'
DESC
'
)
.
orderBy
(
orderByWhat
,
'
DESC
'
)
.
limit
(
100
)
.
limit
(
100
)
.
get
Raw
Many
();
.
getMany
();
}
}
async
getCardInfo
(
id
:
number
,
lang
:
string
)
{
async
getCardInfo
(
id
:
number
,
lang
:
string
)
{
...
@@ -463,35 +464,40 @@ export class AppService {
...
@@ -463,35 +464,40 @@ export class AppService {
return
null
;
return
null
;
}
}
}
}
private
async
getSiteConfig
(
configKey
:
string
)
{
async
getSiteConfig
(
configKey
:
string
)
{
const
configObject
=
await
this
.
mcdb
try
{
.
getRepository
(
SiteConfig
)
const
configObject
=
await
this
.
mcdb
.
findOneOrFail
({
.
getRepository
(
SiteConfig
)
select
:
[
'
configValue
'
],
.
findOneOrFail
({
where
:
[
configKey
],
select
:
[
'
configValue
'
],
});
where
:
[
configKey
],
return
configObject
.
configValue
;
})
;
}
return
configObject
.
configValue
;
private
async
updateSiteConfig
(
configKey
:
string
,
configValue
:
string
)
{
}
catch
(
e
)
{
await
this
.
mcdb
this
.
log
.
warn
(
`Failed to get config
${
configKey
}
:
${
e
.
toString
()}
`
);
.
getRepository
(
SiteConfig
)
return
null
;
.
update
({
configKey
},
{
configValue
});
}
}
}
async
updateSiteConfig
(
configKey
:
string
,
configValue
:
string
)
{
async
updateActivity
(
body
:
any
)
{
const
{
start
,
end
,
max
,
name
}
=
body
;
const
activityStr
=
JSON
.
stringify
({
start
,
end
,
max
,
name
});
try
{
try
{
await
this
.
updateSiteConfig
(
'
activity
'
,
activityStr
);
await
this
.
mcdb
return
{
code
:
200
};
.
getRepository
(
SiteConfig
)
.
update
({
configKey
},
{
configValue
});
return
200
;
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
log
.
warn
(
this
.
log
.
warn
(
`Failed to update
activity to
${
activityStr
}
:
${
e
.
toString
()}
`
,
`Failed to update
config
${
configKey
}
to
${
configValue
}
:
${
e
.
toString
()}
`
,
);
);
return
{
code
:
500
}
;
return
500
;
}
}
}
}
async
updateActivity
(
body
:
any
)
{
const
{
start
,
end
,
max
,
name
}
=
body
;
const
activityStr
=
JSON
.
stringify
({
start
,
end
,
max
,
name
});
return
this
.
updateSiteConfig
(
'
activity
'
,
activityStr
);
}
private
async
findOrCreateUser
(
username
:
string
)
{
private
async
findOrCreateUser
(
username
:
string
)
{
const
repo
=
this
.
mcdb
.
getRepository
(
UserInfo
);
const
repo
=
this
.
mcdb
.
getRepository
(
UserInfo
);
let
user
=
await
repo
.
findOne
({
let
user
=
await
repo
.
findOne
({
...
@@ -779,10 +785,10 @@ export class AppService {
...
@@ -779,10 +785,10 @@ export class AppService {
.
set
({
.
set
({
exp
:
expResult
.
expA
,
exp
:
expResult
.
expA
,
pt
:
ptResult
.
ptA
,
pt
:
ptResult
.
ptA
,
athletic
W
in
:
()
=>
`athletic_win +
${
paramA
.
athletic_win
}
`
,
athletic
_w
in
:
()
=>
`athletic_win +
${
paramA
.
athletic_win
}
`
,
athletic
Lose
:
()
=>
`athletic_lose +
${
paramA
.
athletic_win
}
`
,
athletic
_lose
:
()
=>
`athletic_lose +
${
paramA
.
athletic_lose
}
`
,
athletic
Draw
:
()
=>
`athletic_draw +
${
paramA
.
athletic_win
}
`
,
athletic
_draw
:
()
=>
`athletic_draw +
${
paramA
.
athletic_draw
}
`
,
athletic
All
:
()
=>
`athletic_all +
${
paramA
.
athletic_win
}
`
,
athletic
_all
:
()
=>
`athletic_all +
${
paramA
.
athletic_all
}
`
,
})
})
.
where
(
'
username = :username
'
,
{
username
:
userA
.
username
})
.
where
(
'
username = :username
'
,
{
username
:
userA
.
username
})
.
execute
(),
.
execute
(),
...
@@ -792,10 +798,10 @@ export class AppService {
...
@@ -792,10 +798,10 @@ export class AppService {
.
set
({
.
set
({
exp
:
expResult
.
expB
,
exp
:
expResult
.
expB
,
pt
:
ptResult
.
ptB
,
pt
:
ptResult
.
ptB
,
athletic
W
in
:
()
=>
`athletic_win +
${
paramB
.
athletic_win
}
`
,
athletic
_w
in
:
()
=>
`athletic_win +
${
paramB
.
athletic_win
}
`
,
athletic
Lose
:
()
=>
`athletic_lose +
${
paramB
.
athletic_win
}
`
,
athletic
_lose
:
()
=>
`athletic_lose +
${
paramB
.
athletic_lose
}
`
,
athletic
Draw
:
()
=>
`athletic_draw +
${
paramB
.
athletic_win
}
`
,
athletic
_draw
:
()
=>
`athletic_draw +
${
paramB
.
athletic_draw
}
`
,
athletic
All
:
()
=>
`athletic_all +
${
paramB
.
athletic_win
}
`
,
athletic
_all
:
()
=>
`athletic_all +
${
paramB
.
athletic_all
}
`
,
})
})
.
where
(
'
username = :username
'
,
{
username
:
userB
.
username
})
.
where
(
'
username = :username
'
,
{
username
:
userB
.
username
})
.
execute
(),
.
execute
(),
...
@@ -857,10 +863,12 @@ export class AppService {
...
@@ -857,10 +863,12 @@ export class AppService {
.
update
(
UserInfo
)
.
update
(
UserInfo
)
.
set
({
.
set
({
exp
:
expResult
.
expA
,
exp
:
expResult
.
expA
,
entertainWin
:
()
=>
`entertain_win +
${
paramA
.
entertain_win
}
`
,
entertain_win
:
()
=>
`entertain_win +
${
paramA
.
entertain_win
}
`
,
entertainLose
:
()
=>
`entertain_lose +
${
paramA
.
entertain_win
}
`
,
entertain_lose
:
()
=>
entertainDraw
:
()
=>
`entertain_draw +
${
paramA
.
entertain_win
}
`
,
`entertain_lose +
${
paramA
.
entertain_lose
}
`
,
entertainAll
:
()
=>
`entertain_all +
${
paramA
.
entertain_win
}
`
,
entertain_draw
:
()
=>
`entertain_draw +
${
paramA
.
entertain_draw
}
`
,
entertain_all
:
()
=>
`entertain_all +
${
paramA
.
entertain_all
}
`
,
})
})
.
where
(
'
username = :username
'
,
{
username
:
userA
.
username
})
.
where
(
'
username = :username
'
,
{
username
:
userA
.
username
})
.
execute
(),
.
execute
(),
...
@@ -869,10 +877,12 @@ export class AppService {
...
@@ -869,10 +877,12 @@ export class AppService {
.
update
(
UserInfo
)
.
update
(
UserInfo
)
.
set
({
.
set
({
exp
:
expResult
.
expB
,
exp
:
expResult
.
expB
,
entertainWin
:
()
=>
`entertain_win +
${
paramB
.
entertain_win
}
`
,
entertain_win
:
()
=>
`entertain_win +
${
paramB
.
entertain_win
}
`
,
entertainLose
:
()
=>
`entertain_lose +
${
paramB
.
entertain_win
}
`
,
entertain_lose
:
()
=>
entertainDraw
:
()
=>
`entertain_draw +
${
paramB
.
entertain_win
}
`
,
`entertain_lose +
${
paramB
.
entertain_lose
}
`
,
entertainAll
:
()
=>
`entertain_all +
${
paramB
.
entertain_win
}
`
,
entertain_draw
:
()
=>
`entertain_draw +
${
paramB
.
entertain_draw
}
`
,
entertain_all
:
()
=>
`entertain_all +
${
paramB
.
entertain_all
}
`
,
})
})
.
where
(
'
username = :username
'
,
{
username
:
userB
.
username
})
.
where
(
'
username = :username
'
,
{
username
:
userB
.
username
})
.
execute
(),
.
execute
(),
...
@@ -1060,16 +1070,13 @@ export class AppService {
...
@@ -1060,16 +1070,13 @@ export class AppService {
const
page_num
:
number
=
query
.
page_num
||
15
;
const
page_num
:
number
=
query
.
page_num
||
15
;
const
offset
=
(
page_no
-
1
)
*
page_num
;
const
offset
=
(
page_no
-
1
)
*
page_num
;
const
repo
=
this
.
mcdb
.
getRepository
(
Votes
);
const
repo
=
this
.
mcdb
.
getRepository
(
Votes
);
const
countQuery
=
repo
.
createQueryBuilder
();
if
(
status
!==
undefined
)
{
countQuery
.
where
(
'
status = :status
'
,
{
status
});
}
const
total
=
await
countQuery
.
getCount
();
const
voteQuery
=
repo
.
createQueryBuilder
();
const
voteQuery
=
repo
.
createQueryBuilder
();
if
(
status
!==
undefined
)
{
if
(
status
!==
undefined
)
{
voteQuery
.
where
(
'
status = :status
'
,
{
status
});
voteQuery
.
where
(
'
status = :status
'
,
{
status
});
}
}
voteQuery
.
orderBy
(
'
create_time
'
,
'
DESC
'
).
limit
(
page_num
).
offset
(
offset
);
const
total
=
await
voteQuery
.
getCount
();
voteQuery
.
orderBy
(
'
create_time
'
,
'
DESC
'
);
voteQuery
.
limit
(
page_num
).
offset
(
offset
);
const
votes
=
await
voteQuery
.
getMany
();
const
votes
=
await
voteQuery
.
getMany
();
const
optionCountMap
:
any
=
{};
const
optionCountMap
:
any
=
{};
const
voteCountMap
:
any
=
{};
const
voteCountMap
:
any
=
{};
...
@@ -1090,8 +1097,8 @@ export class AppService {
...
@@ -1090,8 +1097,8 @@ export class AppService {
const
now
=
moment
().
toDate
();
const
now
=
moment
().
toDate
();
const
allVotes
=
await
this
.
mcdb
.
getRepository
(
Votes
).
find
({
const
allVotes
=
await
this
.
mcdb
.
getRepository
(
Votes
).
find
({
status
:
true
,
status
:
true
,
start
T
ime
:
LessThanOrEqual
(
now
),
start
_t
ime
:
LessThanOrEqual
(
now
),
end
T
ime
:
MoreThanOrEqual
(
now
),
end
_t
ime
:
MoreThanOrEqual
(
now
),
});
});
const
votedIds
=
(
const
votedIds
=
(
await
this
.
mcdb
.
getRepository
(
VoteResult
).
find
({
await
this
.
mcdb
.
getRepository
(
VoteResult
).
find
({
...
@@ -1123,14 +1130,14 @@ export class AppService {
...
@@ -1123,14 +1130,14 @@ export class AppService {
.
where
(
'
name = :name
'
,
{
name
})
.
where
(
'
name = :name
'
,
{
name
})
.
andWhere
(
'
id = :id
'
,
{
id
:
parseInt
(
version
)
})
.
andWhere
(
'
id = :id
'
,
{
id
:
parseInt
(
version
)
})
.
orderBy
(
'
start_time
'
,
'
DESC
'
)
.
orderBy
(
'
start_time
'
,
'
DESC
'
)
.
get
Raw
One
();
.
getOne
();
}
else
{
}
else
{
deck
=
await
this
.
mcdb
deck
=
await
this
.
mcdb
.
getRepository
(
DeckInfo
)
.
getRepository
(
DeckInfo
)
.
createQueryBuilder
()
.
createQueryBuilder
()
.
where
(
'
name like :name
'
,
{
name
:
`%
${
name
}
%`
})
.
where
(
'
name like :name
'
,
{
name
:
`%
${
name
}
%`
})
.
orderBy
(
'
start_time
'
,
'
DESC
'
)
.
orderBy
(
'
start_time
'
,
'
DESC
'
)
.
get
Raw
One
();
.
getOne
();
}
}
if
(
!
deck
)
{
if
(
!
deck
)
{
return
{
return
{
...
@@ -1143,15 +1150,17 @@ export class AppService {
...
@@ -1143,15 +1150,17 @@ export class AppService {
.
createQueryBuilder
()
.
createQueryBuilder
()
.
where
(
'
name = :name
'
,
{
name
:
resName
})
.
where
(
'
name = :name
'
,
{
name
:
resName
})
.
orderBy
(
'
start_time
'
,
'
DESC
'
)
.
orderBy
(
'
start_time
'
,
'
DESC
'
)
.
get
Raw
Many
();
.
getMany
();
const
demo
=
(
const
demo
=
(
await
this
.
mcdb
await
this
.
mcdb
.
getRepository
(
DeckDemo
)
.
getRepository
(
DeckDemo
)
.
createQueryBuilder
()
.
createQueryBuilder
()
.
where
(
'
name = :name
'
,
{
name
:
resName
})
.
where
(
'
name = :name
'
,
{
name
:
resName
})
.
orderBy
(
'
create_time
'
,
'
DESC
'
)
.
orderBy
(
'
create_time
'
,
'
DESC
'
)
.
get
Raw
Many
()
.
getMany
()
).
map
((
row
)
=>
{
).
map
((
row
)
=>
{
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
row
.
create_time
=
moment
(
row
.
create_time
).
format
(
'
YYYY-MM-DD
'
);
row
.
create_time
=
moment
(
row
.
create_time
).
format
(
'
YYYY-MM-DD
'
);
return
row
;
return
row
;
});
});
...
@@ -1287,4 +1296,80 @@ export class AppService {
...
@@ -1287,4 +1296,80 @@ export class AppService {
side
:
sideCardArr
,
side
:
sideCardArr
,
};
};
}
}
async
submitDeckDemo
(
body
:
any
)
{
const
author
:
string
=
body
.
user
;
const
title
:
string
=
body
.
title
;
const
name
:
string
=
body
.
name
;
const
img_url
:
string
=
body
.
url
;
const
file
:
string
=
body
.
file
||
''
;
const
now
=
moment
().
toDate
();
const
deckDemo
=
new
DeckDemo
();
deckDemo
.
author
=
author
;
deckDemo
.
title
=
title
;
deckDemo
.
url
=
img_url
;
deckDemo
.
name
=
name
;
deckDemo
.
file
=
file
;
deckDemo
.
create_time
=
now
;
try
{
await
this
.
mcdb
.
getRepository
(
DeckDemo
).
save
(
deckDemo
);
return
200
;
}
catch
(
e
)
{
this
.
log
.
error
(
`Failed submitting deck demo:
${
e
.
toString
()}
`
);
return
500
;
}
}
async
submitDeckInfo
(
body
:
any
)
{
const
author
=
body
.
user
;
const
title
=
body
.
title
;
const
name
=
body
.
name
;
const
desc
=
body
.
desc
;
const
strategy
=
body
.
strategy
;
const
reference
=
body
.
reference
;
const
img_url
=
body
.
url
;
const
isNew
=
body
.
isNew
;
const
now
=
moment
().
toDate
();
const
content
=
{
author
:
this
.
chineseDirtyFilter
.
clean
(
author
),
title
:
this
.
chineseDirtyFilter
.
clean
(
title
),
desc
:
this
.
chineseDirtyFilter
.
clean
(
desc
),
strategy
:
this
.
chineseDirtyFilter
.
clean
(
strategy
),
reference
:
this
.
chineseDirtyFilter
.
clean
(
reference
),
url
:
img_url
,
};
const
contentStr
=
JSON
.
stringify
(
content
);
let
code
=
200
;
await
this
.
transaction
(
this
.
mcdb
,
async
(
db
)
=>
{
try
{
if
(
isNew
===
'
true
'
)
{
const
deckInfo
=
new
DeckInfo
();
deckInfo
.
name
=
name
;
deckInfo
.
content
=
contentStr
;
deckInfo
.
start_time
=
now
;
await
db
.
getRepository
(
DeckInfo
).
save
(
deckInfo
);
}
else
{
await
db
.
getRepository
(
DeckInfo
)
.
update
({
name
},
{
content
:
contentStr
,
end_time
:
now
});
}
const
deckInfoHistory
=
new
DeckInfoHistory
();
deckInfoHistory
.
name
=
name
;
deckInfoHistory
.
content
=
contentStr
;
deckInfoHistory
.
end_time
=
now
;
await
db
.
getRepository
(
DeckInfoHistory
).
save
(
deckInfoHistory
);
}
catch
(
e
)
{
this
.
log
.
error
(
`Failed to submit deck info
${
name
}
:
${
e
.
toString
()}
`
);
code
=
500
;
return
false
;
}
return
true
;
});
return
code
;
}
}
}
src/entities/mycard/DeckDemo.ts
View file @
9acd774c
...
@@ -24,5 +24,5 @@ export class DeckDemo {
...
@@ -24,5 +24,5 @@ export class DeckDemo {
name
:
'
create_time
'
,
name
:
'
create_time
'
,
nullable
:
true
,
nullable
:
true
,
})
})
create
T
ime
:
Date
;
create
_t
ime
:
Date
;
}
}
src/entities/mycard/DeckInfo.ts
View file @
9acd774c
...
@@ -12,8 +12,8 @@ export class DeckInfo {
...
@@ -12,8 +12,8 @@ export class DeckInfo {
content
:
string
;
content
:
string
;
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
start_time
'
,
nullable
:
true
})
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
start_time
'
,
nullable
:
true
})
start
T
ime
:
Date
;
start
_t
ime
:
Date
;
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
end_time
'
,
nullable
:
true
})
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
end_time
'
,
nullable
:
true
})
end
T
ime
:
Date
;
end
_t
ime
:
Date
;
}
}
src/entities/mycard/DeckInfoHistory.ts
View file @
9acd774c
...
@@ -12,8 +12,8 @@ export class DeckInfoHistory {
...
@@ -12,8 +12,8 @@ export class DeckInfoHistory {
content
:
string
;
content
:
string
;
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
start_time
'
,
nullable
:
true
})
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
start_time
'
,
nullable
:
true
})
start
T
ime
:
Date
;
start
_t
ime
:
Date
;
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
end_time
'
,
nullable
:
true
})
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
end_time
'
,
nullable
:
true
})
end
T
ime
:
Date
;
end
_t
ime
:
Date
;
}
}
src/entities/mycard/UserInfo.ts
View file @
9acd774c
...
@@ -20,28 +20,28 @@ export class UserInfo {
...
@@ -20,28 +20,28 @@ export class UserInfo {
pt
:
number
;
pt
:
number
;
@
Column
(
'
integer
'
,
{
name
:
'
entertain_win
'
,
default
:
0
})
@
Column
(
'
integer
'
,
{
name
:
'
entertain_win
'
,
default
:
0
})
entertain
W
in
:
number
;
entertain
_w
in
:
number
;
@
Column
(
'
integer
'
,
{
name
:
'
entertain_lose
'
,
default
:
0
})
@
Column
(
'
integer
'
,
{
name
:
'
entertain_lose
'
,
default
:
0
})
entertain
L
ose
:
number
;
entertain
_l
ose
:
number
;
@
Column
(
'
integer
'
,
{
name
:
'
entertain_draw
'
,
default
:
0
})
@
Column
(
'
integer
'
,
{
name
:
'
entertain_draw
'
,
default
:
0
})
entertain
D
raw
:
number
;
entertain
_d
raw
:
number
;
@
Column
(
'
integer
'
,
{
name
:
'
entertain_all
'
,
default
:
0
})
@
Column
(
'
integer
'
,
{
name
:
'
entertain_all
'
,
default
:
0
})
entertain
A
ll
:
number
;
entertain
_a
ll
:
number
;
@
Column
(
'
integer
'
,
{
name
:
'
athletic_win
'
,
default
:
0
})
@
Column
(
'
integer
'
,
{
name
:
'
athletic_win
'
,
default
:
0
})
athletic
W
in
:
number
;
athletic
_w
in
:
number
;
@
Column
(
'
integer
'
,
{
name
:
'
athletic_lose
'
,
default
:
0
})
@
Column
(
'
integer
'
,
{
name
:
'
athletic_lose
'
,
default
:
0
})
athletic
L
ose
:
number
;
athletic
_l
ose
:
number
;
@
Column
(
'
integer
'
,
{
name
:
'
athletic_draw
'
,
default
:
0
})
@
Column
(
'
integer
'
,
{
name
:
'
athletic_draw
'
,
default
:
0
})
athletic
D
raw
:
number
;
athletic
_d
raw
:
number
;
@
Column
(
'
integer
'
,
{
name
:
'
athletic_all
'
,
default
:
0
})
@
Column
(
'
integer
'
,
{
name
:
'
athletic_all
'
,
default
:
0
})
athletic
A
ll
:
number
;
athletic
_a
ll
:
number
;
@
Column
(
'
integer
'
,
{
name
:
'
id
'
,
nullable
:
true
})
@
Column
(
'
integer
'
,
{
name
:
'
id
'
,
nullable
:
true
})
id
:
number
;
id
:
number
;
...
...
src/entities/mycard/Votes.ts
View file @
9acd774c
...
@@ -16,13 +16,13 @@ export class Votes {
...
@@ -16,13 +16,13 @@ export class Votes {
name
:
'
create_time
'
,
name
:
'
create_time
'
,
nullable
:
true
,
nullable
:
true
,
})
})
create
T
ime
:
Date
;
create
_t
ime
:
Date
;
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
start_time
'
,
nullable
:
true
})
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
start_time
'
,
nullable
:
true
})
start
T
ime
:
Date
;
start
_t
ime
:
Date
;
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
end_time
'
,
nullable
:
true
})
@
Column
(
'
timestamp without time zone
'
,
{
name
:
'
end_time
'
,
nullable
:
true
})
end
T
ime
:
Date
;
end
_t
ime
:
Date
;
@
Column
(
'
boolean
'
,
{
name
:
'
status
'
,
nullable
:
true
,
default
:
false
})
@
Column
(
'
boolean
'
,
{
name
:
'
status
'
,
nullable
:
true
,
default
:
false
})
status
:
boolean
;
status
:
boolean
;
...
@@ -30,7 +30,7 @@ export class Votes {
...
@@ -30,7 +30,7 @@ export class Votes {
@
Column
(
'
boolean
'
,
{
@
Column
(
'
boolean
'
,
{
name
:
'
multiple
'
,
name
:
'
multiple
'
,
nullable
:
true
,
nullable
:
true
,
default
:
'
false
'
,
default
:
false
,
})
})
multiple
:
boolean
;
multiple
:
boolean
;
...
...
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