Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
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
srvpro
Commits
4d118ecb
Commit
4d118ecb
authored
Nov 16, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
b8d7105a
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
314 additions
and
289 deletions
+314
-289
data-manager/DataManager.js
data-manager/DataManager.js
+3
-2
data-manager/DataManager.ts
data-manager/DataManager.ts
+1
-1
data-manager/entities/Ban.js
data-manager/entities/Ban.js
+23
-20
data-manager/entities/BasePlayer.js
data-manager/entities/BasePlayer.js
+17
-14
data-manager/entities/CloudReplay.js
data-manager/entities/CloudReplay.js
+41
-38
data-manager/entities/CloudReplayPlayer.js
data-manager/entities/CloudReplayPlayer.js
+25
-22
data-manager/entities/DuelLog.js
data-manager/entities/DuelLog.js
+71
-68
data-manager/entities/DuelLogPlayer.js
data-manager/entities/DuelLogPlayer.js
+83
-80
data-manager/entities/RandomDuelBan.js
data-manager/entities/RandomDuelBan.js
+34
-31
data-manager/entities/User.js
data-manager/entities/User.js
+16
-13
No files found.
data-manager/DataManager.js
View file @
4d118ecb
...
@@ -78,10 +78,11 @@ class DataManager {
...
@@ -78,10 +78,11 @@ class DataManager {
.
select
(
`
${
minOrMax
}
(id)`
,
"
value
"
)
.
select
(
`
${
minOrMax
}
(id)`
,
"
value
"
)
.
from
(
CloudReplay_1
.
CloudReplay
,
"
replay
"
)
.
from
(
CloudReplay_1
.
CloudReplay
,
"
replay
"
)
.
getRawOne
()));
.
getRawOne
()));
if
(
!
minQuery
||
maxQuery
)
{
if
(
!
minQuery
||
!
maxQuery
)
{
return
null
;
return
null
;
}
}
const
targetId
=
Math
.
floor
((
maxQuery
.
value
-
minQuery
.
value
)
*
Math
.
random
())
+
minQuery
.
value
;
const
[
minId
,
maxId
]
=
[
minQuery
,
maxQuery
].
map
(
query
=>
parseInt
(
query
.
value
));
const
targetId
=
Math
.
floor
((
maxId
-
minId
)
*
Math
.
random
())
+
minId
;
return
await
this
.
db
.
createQueryBuilder
(
CloudReplay_1
.
CloudReplay
,
"
replay
"
)
return
await
this
.
db
.
createQueryBuilder
(
CloudReplay_1
.
CloudReplay
,
"
replay
"
)
.
where
(
"
replay.id >= :targetId
"
,
{
targetId
})
.
where
(
"
replay.id >= :targetId
"
,
{
targetId
})
.
orderBy
(
"
replay.id
"
,
"
ASC
"
)
.
orderBy
(
"
replay.id
"
,
"
ASC
"
)
...
...
data-manager/DataManager.ts
View file @
4d118ecb
...
@@ -104,7 +104,7 @@ export class DataManager {
...
@@ -104,7 +104,7 @@ export class DataManager {
if
(
!
minQuery
||
!
maxQuery
)
{
if
(
!
minQuery
||
!
maxQuery
)
{
return
null
;
return
null
;
}
}
const
[
m
axId
,
min
Id
]
=
[
minQuery
,
maxQuery
].
map
(
query
=>
parseInt
(
query
.
value
));
const
[
m
inId
,
max
Id
]
=
[
minQuery
,
maxQuery
].
map
(
query
=>
parseInt
(
query
.
value
));
const
targetId
=
Math
.
floor
((
maxId
-
minId
)
*
Math
.
random
())
+
minId
;
const
targetId
=
Math
.
floor
((
maxId
-
minId
)
*
Math
.
random
())
+
minId
;
return
await
this
.
db
.
createQueryBuilder
(
CloudReplay
,
"
replay
"
)
return
await
this
.
db
.
createQueryBuilder
(
CloudReplay
,
"
replay
"
)
.
where
(
"
replay.id >= :targetId
"
,
{
targetId
})
.
where
(
"
replay.id >= :targetId
"
,
{
targetId
})
...
...
data-manager/entities/Ban.js
View file @
4d118ecb
...
@@ -11,25 +11,28 @@ var __metadata = (this && this.__metadata) || function (k, v) {
...
@@ -11,25 +11,28 @@ var __metadata = (this && this.__metadata) || function (k, v) {
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
Ban
=
void
0
;
exports
.
Ban
=
void
0
;
const
typeorm_1
=
require
(
"
typeorm
"
);
const
typeorm_1
=
require
(
"
typeorm
"
);
let
Ban
=
class
Ban
{
let
Ban
=
/** @class */
(()
=>
{
};
let
Ban
=
class
Ban
{
__decorate
([
};
__decorate
([
typeorm_1
.
PrimaryGeneratedColumn
({
unsigned
:
true
,
type
:
"
bigint
"
}),
typeorm_1
.
PrimaryGeneratedColumn
({
unsigned
:
true
,
type
:
"
bigint
"
}),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
Ban
.
prototype
,
"
id
"
,
void
0
);
],
Ban
.
prototype
,
"
id
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Index
(),
typeorm_1
.
Index
(),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
64
,
nullable
:
true
}),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
64
,
nullable
:
true
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
Ban
.
prototype
,
"
ip
"
,
void
0
);
],
Ban
.
prototype
,
"
ip
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Index
(),
typeorm_1
.
Index
(),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
20
,
nullable
:
true
}),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
20
,
nullable
:
true
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
Ban
.
prototype
,
"
name
"
,
void
0
);
],
Ban
.
prototype
,
"
name
"
,
void
0
);
Ban
=
__decorate
([
Ban
=
__decorate
([
typeorm_1
.
Entity
(),
typeorm_1
.
Entity
(),
typeorm_1
.
Unique
([
"
ip
"
,
"
name
"
])
typeorm_1
.
Unique
([
"
ip
"
,
"
name
"
])
],
Ban
);
],
Ban
);
return
Ban
;
})();
exports
.
Ban
=
Ban
;
exports
.
Ban
=
Ban
;
//# sourceMappingURL=Ban.js.map
//# sourceMappingURL=Ban.js.map
\ No newline at end of file
data-manager/entities/BasePlayer.js
View file @
4d118ecb
...
@@ -11,19 +11,22 @@ var __metadata = (this && this.__metadata) || function (k, v) {
...
@@ -11,19 +11,22 @@ var __metadata = (this && this.__metadata) || function (k, v) {
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
BasePlayer
=
void
0
;
exports
.
BasePlayer
=
void
0
;
const
typeorm_1
=
require
(
"
typeorm
"
);
const
typeorm_1
=
require
(
"
typeorm
"
);
class
BasePlayer
{
let
BasePlayer
=
/** @class */
(()
=>
{
}
class
BasePlayer
{
__decorate
([
}
__decorate
([
typeorm_1
.
PrimaryGeneratedColumn
({
unsigned
:
true
,
type
:
"
bigint
"
}),
typeorm_1
.
PrimaryGeneratedColumn
({
unsigned
:
true
,
type
:
"
bigint
"
}),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
BasePlayer
.
prototype
,
"
id
"
,
void
0
);
],
BasePlayer
.
prototype
,
"
id
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
20
}),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
20
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
BasePlayer
.
prototype
,
"
name
"
,
void
0
);
],
BasePlayer
.
prototype
,
"
name
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
({
type
:
"
tinyint
"
}),
typeorm_1
.
Column
({
type
:
"
tinyint
"
}),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
BasePlayer
.
prototype
,
"
pos
"
,
void
0
);
],
BasePlayer
.
prototype
,
"
pos
"
,
void
0
);
return
BasePlayer
;
})();
exports
.
BasePlayer
=
BasePlayer
;
exports
.
BasePlayer
=
BasePlayer
;
//# sourceMappingURL=BasePlayer.js.map
//# sourceMappingURL=BasePlayer.js.map
\ No newline at end of file
data-manager/entities/CloudReplay.js
View file @
4d118ecb
...
@@ -17,7 +17,8 @@ const typeorm_1 = require("typeorm");
...
@@ -17,7 +17,8 @@ const typeorm_1 = require("typeorm");
const
CloudReplayPlayer_1
=
require
(
"
./CloudReplayPlayer
"
);
const
CloudReplayPlayer_1
=
require
(
"
./CloudReplayPlayer
"
);
const
underscore_1
=
__importDefault
(
require
(
"
underscore
"
));
const
underscore_1
=
__importDefault
(
require
(
"
underscore
"
));
const
moment_1
=
__importDefault
(
require
(
"
moment
"
));
const
moment_1
=
__importDefault
(
require
(
"
moment
"
));
let
CloudReplay
=
class
CloudReplay
{
let
CloudReplay
=
/** @class */
(()
=>
{
let
CloudReplay
=
class
CloudReplay
{
fromBuffer
(
buffer
)
{
fromBuffer
(
buffer
)
{
this
.
data
=
buffer
.
toString
(
"
base64
"
);
this
.
data
=
buffer
.
toString
(
"
base64
"
);
}
}
...
@@ -35,25 +36,27 @@ let CloudReplay = class CloudReplay {
...
@@ -35,25 +36,27 @@ let CloudReplay = class CloudReplay {
getDisplayString
()
{
getDisplayString
()
{
return
`R#
${
this
.
id
}
${
this
.
getPlayerNamesString
()}
${
this
.
getDateString
()}
`
;
return
`R#
${
this
.
id
}
${
this
.
getPlayerNamesString
()}
${
this
.
getDateString
()}
`
;
}
}
};
};
__decorate
([
__decorate
([
typeorm_1
.
PrimaryColumn
({
unsigned
:
true
,
type
:
"
bigint
"
}),
typeorm_1
.
PrimaryColumn
({
unsigned
:
true
,
type
:
"
bigint
"
}),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
CloudReplay
.
prototype
,
"
id
"
,
void
0
);
],
CloudReplay
.
prototype
,
"
id
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
({
type
:
"
text
"
}),
typeorm_1
.
Column
({
type
:
"
text
"
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
CloudReplay
.
prototype
,
"
data
"
,
void
0
);
],
CloudReplay
.
prototype
,
"
data
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
({
type
:
"
datetime
"
}),
typeorm_1
.
Column
({
type
:
"
datetime
"
}),
__metadata
(
"
design:type
"
,
Date
)
__metadata
(
"
design:type
"
,
Date
)
],
CloudReplay
.
prototype
,
"
date
"
,
void
0
);
],
CloudReplay
.
prototype
,
"
date
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
OneToMany
(()
=>
CloudReplayPlayer_1
.
CloudReplayPlayer
,
player
=>
player
.
cloudReplay
),
typeorm_1
.
OneToMany
(()
=>
CloudReplayPlayer_1
.
CloudReplayPlayer
,
player
=>
player
.
cloudReplay
),
__metadata
(
"
design:type
"
,
Array
)
__metadata
(
"
design:type
"
,
Array
)
],
CloudReplay
.
prototype
,
"
players
"
,
void
0
);
],
CloudReplay
.
prototype
,
"
players
"
,
void
0
);
CloudReplay
=
__decorate
([
CloudReplay
=
__decorate
([
typeorm_1
.
Entity
()
typeorm_1
.
Entity
()
],
CloudReplay
);
],
CloudReplay
);
return
CloudReplay
;
})();
exports
.
CloudReplay
=
CloudReplay
;
exports
.
CloudReplay
=
CloudReplay
;
//# sourceMappingURL=CloudReplay.js.map
//# sourceMappingURL=CloudReplay.js.map
\ No newline at end of file
data-manager/entities/CloudReplayPlayer.js
View file @
4d118ecb
...
@@ -8,13 +8,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
...
@@ -8,13 +8,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
var
__metadata
=
(
this
&&
this
.
__metadata
)
||
function
(
k
,
v
)
{
var
__metadata
=
(
this
&&
this
.
__metadata
)
||
function
(
k
,
v
)
{
if
(
typeof
Reflect
===
"
object
"
&&
typeof
Reflect
.
metadata
===
"
function
"
)
return
Reflect
.
metadata
(
k
,
v
);
if
(
typeof
Reflect
===
"
object
"
&&
typeof
Reflect
.
metadata
===
"
function
"
)
return
Reflect
.
metadata
(
k
,
v
);
};
};
var
CloudReplayPlayer_1
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
CloudReplayPlayer
=
void
0
;
exports
.
CloudReplayPlayer
=
void
0
;
const
typeorm_1
=
require
(
"
typeorm
"
);
const
typeorm_1
=
require
(
"
typeorm
"
);
const
CloudReplay_1
=
require
(
"
./CloudReplay
"
);
const
CloudReplay_1
=
require
(
"
./CloudReplay
"
);
const
BasePlayer_1
=
require
(
"
./BasePlayer
"
);
const
BasePlayer_1
=
require
(
"
./BasePlayer
"
);
let
CloudReplayPlayer
=
CloudReplayPlayer_1
=
class
CloudReplayPlayer
extends
BasePlayer_1
.
BasePlayer
{
let
CloudReplayPlayer
=
/** @class */
(()
=>
{
var
CloudReplayPlayer_1
;
let
CloudReplayPlayer
=
CloudReplayPlayer_1
=
class
CloudReplayPlayer
extends
BasePlayer_1
.
BasePlayer
{
static
fromPlayerInfo
(
info
)
{
static
fromPlayerInfo
(
info
)
{
const
p
=
new
CloudReplayPlayer_1
();
const
p
=
new
CloudReplayPlayer_1
();
p
.
key
=
info
.
key
;
p
.
key
=
info
.
key
;
...
@@ -22,18 +23,20 @@ let CloudReplayPlayer = CloudReplayPlayer_1 = class CloudReplayPlayer extends Ba
...
@@ -22,18 +23,20 @@ let CloudReplayPlayer = CloudReplayPlayer_1 = class CloudReplayPlayer extends Ba
p
.
pos
=
info
.
pos
;
p
.
pos
=
info
.
pos
;
return
p
;
return
p
;
}
}
};
};
__decorate
([
__decorate
([
typeorm_1
.
Index
(),
typeorm_1
.
Index
(),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
40
}),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
40
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
CloudReplayPlayer
.
prototype
,
"
key
"
,
void
0
);
],
CloudReplayPlayer
.
prototype
,
"
key
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
ManyToOne
(()
=>
CloudReplay_1
.
CloudReplay
,
replay
=>
replay
.
players
),
typeorm_1
.
ManyToOne
(()
=>
CloudReplay_1
.
CloudReplay
,
replay
=>
replay
.
players
),
__metadata
(
"
design:type
"
,
CloudReplay_1
.
CloudReplay
)
__metadata
(
"
design:type
"
,
CloudReplay_1
.
CloudReplay
)
],
CloudReplayPlayer
.
prototype
,
"
cloudReplay
"
,
void
0
);
],
CloudReplayPlayer
.
prototype
,
"
cloudReplay
"
,
void
0
);
CloudReplayPlayer
=
CloudReplayPlayer_1
=
__decorate
([
CloudReplayPlayer
=
CloudReplayPlayer_1
=
__decorate
([
typeorm_1
.
Entity
()
typeorm_1
.
Entity
()
],
CloudReplayPlayer
);
],
CloudReplayPlayer
);
return
CloudReplayPlayer
;
})();
exports
.
CloudReplayPlayer
=
CloudReplayPlayer
;
exports
.
CloudReplayPlayer
=
CloudReplayPlayer
;
//# sourceMappingURL=CloudReplayPlayer.js.map
//# sourceMappingURL=CloudReplayPlayer.js.map
\ No newline at end of file
data-manager/entities/DuelLog.js
View file @
4d118ecb
...
@@ -17,7 +17,8 @@ const typeorm_1 = require("typeorm");
...
@@ -17,7 +17,8 @@ const typeorm_1 = require("typeorm");
const
DuelLogPlayer_1
=
require
(
"
./DuelLogPlayer
"
);
const
DuelLogPlayer_1
=
require
(
"
./DuelLogPlayer
"
);
const
moment_1
=
__importDefault
(
require
(
"
moment
"
));
const
moment_1
=
__importDefault
(
require
(
"
moment
"
));
const
underscore_1
=
__importDefault
(
require
(
"
underscore
"
));
const
underscore_1
=
__importDefault
(
require
(
"
underscore
"
));
let
DuelLog
=
class
DuelLog
{
let
DuelLog
=
/** @class */
(()
=>
{
let
DuelLog
=
class
DuelLog
{
getViewString
()
{
getViewString
()
{
const
viewPlayers
=
underscore_1
.
default
.
clone
(
this
.
players
);
const
viewPlayers
=
underscore_1
.
default
.
clone
(
this
.
players
);
viewPlayers
.
sort
((
p1
,
p2
)
=>
p1
.
pos
-
p2
.
pos
);
viewPlayers
.
sort
((
p1
,
p2
)
=>
p1
.
pos
-
p2
.
pos
);
...
@@ -44,46 +45,48 @@ let DuelLog = class DuelLog {
...
@@ -44,46 +45,48 @@ let DuelLog = class DuelLog {
};
};
return
data
;
return
data
;
}
}
};
};
__decorate
([
__decorate
([
typeorm_1
.
PrimaryGeneratedColumn
({
unsigned
:
true
,
type
:
"
bigint
"
}),
typeorm_1
.
PrimaryGeneratedColumn
({
unsigned
:
true
,
type
:
"
bigint
"
}),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
DuelLog
.
prototype
,
"
id
"
,
void
0
);
],
DuelLog
.
prototype
,
"
id
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
datetime
"
),
typeorm_1
.
Column
(
"
datetime
"
),
__metadata
(
"
design:type
"
,
Date
)
__metadata
(
"
design:type
"
,
Date
)
],
DuelLog
.
prototype
,
"
time
"
,
void
0
);
],
DuelLog
.
prototype
,
"
time
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Index
(),
typeorm_1
.
Index
(),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
20
}),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
20
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
DuelLog
.
prototype
,
"
name
"
,
void
0
);
],
DuelLog
.
prototype
,
"
name
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
int
"
),
typeorm_1
.
Column
(
"
int
"
),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
DuelLog
.
prototype
,
"
roomId
"
,
void
0
);
],
DuelLog
.
prototype
,
"
roomId
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
bigint
"
),
typeorm_1
.
Column
(
"
bigint
"
),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
DuelLog
.
prototype
,
"
cloudReplayId
"
,
void
0
);
],
DuelLog
.
prototype
,
"
cloudReplayId
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
256
}),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
256
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
DuelLog
.
prototype
,
"
replayFileName
"
,
void
0
);
],
DuelLog
.
prototype
,
"
replayFileName
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
tinyint
"
,
{
unsigned
:
true
}),
typeorm_1
.
Column
(
"
tinyint
"
,
{
unsigned
:
true
}),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
DuelLog
.
prototype
,
"
roomMode
"
,
void
0
);
],
DuelLog
.
prototype
,
"
roomMode
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
tinyint
"
,
{
unsigned
:
true
}),
typeorm_1
.
Column
(
"
tinyint
"
,
{
unsigned
:
true
}),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
DuelLog
.
prototype
,
"
duelCount
"
,
void
0
);
],
DuelLog
.
prototype
,
"
duelCount
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
OneToMany
(()
=>
DuelLogPlayer_1
.
DuelLogPlayer
,
player
=>
player
.
duelLog
),
typeorm_1
.
OneToMany
(()
=>
DuelLogPlayer_1
.
DuelLogPlayer
,
player
=>
player
.
duelLog
),
__metadata
(
"
design:type
"
,
Array
)
__metadata
(
"
design:type
"
,
Array
)
],
DuelLog
.
prototype
,
"
players
"
,
void
0
);
],
DuelLog
.
prototype
,
"
players
"
,
void
0
);
DuelLog
=
__decorate
([
DuelLog
=
__decorate
([
typeorm_1
.
Entity
()
typeorm_1
.
Entity
()
],
DuelLog
);
],
DuelLog
);
return
DuelLog
;
})();
exports
.
DuelLog
=
DuelLog
;
exports
.
DuelLog
=
DuelLog
;
//# sourceMappingURL=DuelLog.js.map
//# sourceMappingURL=DuelLog.js.map
\ No newline at end of file
data-manager/entities/DuelLogPlayer.js
View file @
4d118ecb
...
@@ -8,14 +8,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
...
@@ -8,14 +8,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
var
__metadata
=
(
this
&&
this
.
__metadata
)
||
function
(
k
,
v
)
{
var
__metadata
=
(
this
&&
this
.
__metadata
)
||
function
(
k
,
v
)
{
if
(
typeof
Reflect
===
"
object
"
&&
typeof
Reflect
.
metadata
===
"
function
"
)
return
Reflect
.
metadata
(
k
,
v
);
if
(
typeof
Reflect
===
"
object
"
&&
typeof
Reflect
.
metadata
===
"
function
"
)
return
Reflect
.
metadata
(
k
,
v
);
};
};
var
DuelLogPlayer_1
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
DuelLogPlayer
=
void
0
;
exports
.
DuelLogPlayer
=
void
0
;
const
typeorm_1
=
require
(
"
typeorm
"
);
const
typeorm_1
=
require
(
"
typeorm
"
);
const
BasePlayer_1
=
require
(
"
./BasePlayer
"
);
const
BasePlayer_1
=
require
(
"
./BasePlayer
"
);
const
DuelLog_1
=
require
(
"
./DuelLog
"
);
const
DuelLog_1
=
require
(
"
./DuelLog
"
);
const
DeckEncoder_1
=
require
(
"
../DeckEncoder
"
);
const
DeckEncoder_1
=
require
(
"
../DeckEncoder
"
);
let
DuelLogPlayer
=
DuelLogPlayer_1
=
class
DuelLogPlayer
extends
BasePlayer_1
.
BasePlayer
{
let
DuelLogPlayer
=
/** @class */
(()
=>
{
var
DuelLogPlayer_1
;
let
DuelLogPlayer
=
DuelLogPlayer_1
=
class
DuelLogPlayer
extends
BasePlayer_1
.
BasePlayer
{
setStartDeck
(
deck
)
{
setStartDeck
(
deck
)
{
if
(
deck
===
null
)
{
if
(
deck
===
null
)
{
this
.
startDeckBuffer
=
null
;
this
.
startDeckBuffer
=
null
;
...
@@ -51,50 +52,52 @@ let DuelLogPlayer = DuelLogPlayer_1 = class DuelLogPlayer extends BasePlayer_1.B
...
@@ -51,50 +52,52 @@ let DuelLogPlayer = DuelLogPlayer_1 = class DuelLogPlayer extends BasePlayer_1.B
p
.
setCurrentDeck
(
info
.
deck
);
p
.
setCurrentDeck
(
info
.
deck
);
return
p
;
return
p
;
}
}
};
};
__decorate
([
__decorate
([
typeorm_1
.
Index
(),
typeorm_1
.
Index
(),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
20
}),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
20
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
DuelLogPlayer
.
prototype
,
"
realName
"
,
void
0
);
],
DuelLogPlayer
.
prototype
,
"
realName
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
64
,
nullable
:
true
}),
typeorm_1
.
Column
({
type
:
"
varchar
"
,
length
:
64
,
nullable
:
true
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
DuelLogPlayer
.
prototype
,
"
ip
"
,
void
0
);
],
DuelLogPlayer
.
prototype
,
"
ip
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
tinyint
"
,
{
unsigned
:
true
}),
typeorm_1
.
Column
(
"
tinyint
"
,
{
unsigned
:
true
}),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
DuelLogPlayer
.
prototype
,
"
isFirst
"
,
void
0
);
],
DuelLogPlayer
.
prototype
,
"
isFirst
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
tinyint
"
),
typeorm_1
.
Column
(
"
tinyint
"
),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
DuelLogPlayer
.
prototype
,
"
score
"
,
void
0
);
],
DuelLogPlayer
.
prototype
,
"
score
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
int
"
,
{
nullable
:
true
}),
typeorm_1
.
Column
(
"
int
"
,
{
nullable
:
true
}),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
DuelLogPlayer
.
prototype
,
"
lp
"
,
void
0
);
],
DuelLogPlayer
.
prototype
,
"
lp
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
smallint
"
,
{
nullable
:
true
}),
typeorm_1
.
Column
(
"
smallint
"
,
{
nullable
:
true
}),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
DuelLogPlayer
.
prototype
,
"
cardCount
"
,
void
0
);
],
DuelLogPlayer
.
prototype
,
"
cardCount
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
text
"
,
{
nullable
:
true
}),
typeorm_1
.
Column
(
"
text
"
,
{
nullable
:
true
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
DuelLogPlayer
.
prototype
,
"
startDeckBuffer
"
,
void
0
);
],
DuelLogPlayer
.
prototype
,
"
startDeckBuffer
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
text
"
,
{
nullable
:
true
}),
typeorm_1
.
Column
(
"
text
"
,
{
nullable
:
true
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
DuelLogPlayer
.
prototype
,
"
currentDeckBuffer
"
,
void
0
);
],
DuelLogPlayer
.
prototype
,
"
currentDeckBuffer
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
tinyint
"
),
typeorm_1
.
Column
(
"
tinyint
"
),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
DuelLogPlayer
.
prototype
,
"
winner
"
,
void
0
);
],
DuelLogPlayer
.
prototype
,
"
winner
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
ManyToOne
(()
=>
DuelLog_1
.
DuelLog
,
duelLog
=>
duelLog
.
players
),
typeorm_1
.
ManyToOne
(()
=>
DuelLog_1
.
DuelLog
,
duelLog
=>
duelLog
.
players
),
__metadata
(
"
design:type
"
,
DuelLog_1
.
DuelLog
)
__metadata
(
"
design:type
"
,
DuelLog_1
.
DuelLog
)
],
DuelLogPlayer
.
prototype
,
"
duelLog
"
,
void
0
);
],
DuelLogPlayer
.
prototype
,
"
duelLog
"
,
void
0
);
DuelLogPlayer
=
DuelLogPlayer_1
=
__decorate
([
DuelLogPlayer
=
DuelLogPlayer_1
=
__decorate
([
typeorm_1
.
Entity
()
typeorm_1
.
Entity
()
],
DuelLogPlayer
);
],
DuelLogPlayer
);
return
DuelLogPlayer
;
})();
exports
.
DuelLogPlayer
=
DuelLogPlayer
;
exports
.
DuelLogPlayer
=
DuelLogPlayer
;
//# sourceMappingURL=DuelLogPlayer.js.map
//# sourceMappingURL=DuelLogPlayer.js.map
\ No newline at end of file
data-manager/entities/RandomDuelBan.js
View file @
4d118ecb
...
@@ -11,36 +11,39 @@ var __metadata = (this && this.__metadata) || function (k, v) {
...
@@ -11,36 +11,39 @@ var __metadata = (this && this.__metadata) || function (k, v) {
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
RandomDuelBan
=
void
0
;
exports
.
RandomDuelBan
=
void
0
;
const
typeorm_1
=
require
(
"
typeorm
"
);
const
typeorm_1
=
require
(
"
typeorm
"
);
let
RandomDuelBan
=
class
RandomDuelBan
{
let
RandomDuelBan
=
/** @class */
(()
=>
{
let
RandomDuelBan
=
class
RandomDuelBan
{
setNeedTip
(
need
)
{
setNeedTip
(
need
)
{
this
.
needTip
=
need
?
1
:
0
;
this
.
needTip
=
need
?
1
:
0
;
}
}
getNeedTip
()
{
getNeedTip
()
{
return
this
.
needTip
>
0
?
true
:
false
;
return
this
.
needTip
>
0
?
true
:
false
;
}
}
};
};
__decorate
([
__decorate
([
typeorm_1
.
PrimaryColumn
({
type
:
"
varchar
"
,
length
:
64
}),
typeorm_1
.
PrimaryColumn
({
type
:
"
varchar
"
,
length
:
64
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
RandomDuelBan
.
prototype
,
"
ip
"
,
void
0
);
],
RandomDuelBan
.
prototype
,
"
ip
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
datetime
"
),
typeorm_1
.
Column
(
"
datetime
"
),
__metadata
(
"
design:type
"
,
Date
)
__metadata
(
"
design:type
"
,
Date
)
],
RandomDuelBan
.
prototype
,
"
time
"
,
void
0
);
],
RandomDuelBan
.
prototype
,
"
time
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
smallint
"
),
typeorm_1
.
Column
(
"
smallint
"
),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
RandomDuelBan
.
prototype
,
"
count
"
,
void
0
);
],
RandomDuelBan
.
prototype
,
"
count
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
({
type
:
"
simple-array
"
}),
typeorm_1
.
Column
({
type
:
"
simple-array
"
}),
__metadata
(
"
design:type
"
,
Array
)
__metadata
(
"
design:type
"
,
Array
)
],
RandomDuelBan
.
prototype
,
"
reasons
"
,
void
0
);
],
RandomDuelBan
.
prototype
,
"
reasons
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
({
type
:
"
tinyint
"
,
unsigned
:
true
}),
typeorm_1
.
Column
({
type
:
"
tinyint
"
,
unsigned
:
true
}),
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
RandomDuelBan
.
prototype
,
"
needTip
"
,
void
0
);
],
RandomDuelBan
.
prototype
,
"
needTip
"
,
void
0
);
RandomDuelBan
=
__decorate
([
RandomDuelBan
=
__decorate
([
typeorm_1
.
Entity
()
typeorm_1
.
Entity
()
],
RandomDuelBan
);
],
RandomDuelBan
);
return
RandomDuelBan
;
})();
exports
.
RandomDuelBan
=
RandomDuelBan
;
exports
.
RandomDuelBan
=
RandomDuelBan
;
//# sourceMappingURL=RandomDuelBan.js.map
//# sourceMappingURL=RandomDuelBan.js.map
\ No newline at end of file
data-manager/entities/User.js
View file @
4d118ecb
...
@@ -11,18 +11,21 @@ var __metadata = (this && this.__metadata) || function (k, v) {
...
@@ -11,18 +11,21 @@ var __metadata = (this && this.__metadata) || function (k, v) {
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
User
=
void
0
;
exports
.
User
=
void
0
;
const
typeorm_1
=
require
(
"
typeorm
"
);
const
typeorm_1
=
require
(
"
typeorm
"
);
let
User
=
class
User
{
let
User
=
/** @class */
(()
=>
{
};
let
User
=
class
User
{
__decorate
([
};
__decorate
([
typeorm_1
.
PrimaryColumn
({
type
:
"
varchar
"
,
length
:
128
}),
typeorm_1
.
PrimaryColumn
({
type
:
"
varchar
"
,
length
:
128
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
User
.
prototype
,
"
key
"
,
void
0
);
],
User
.
prototype
,
"
key
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Column
(
"
varchar
"
,
{
length
:
16
,
nullable
:
true
}),
typeorm_1
.
Column
(
"
varchar
"
,
{
length
:
16
,
nullable
:
true
}),
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
User
.
prototype
,
"
chatColor
"
,
void
0
);
],
User
.
prototype
,
"
chatColor
"
,
void
0
);
User
=
__decorate
([
User
=
__decorate
([
typeorm_1
.
Entity
()
typeorm_1
.
Entity
()
],
User
);
],
User
);
return
User
;
})();
exports
.
User
=
User
;
exports
.
User
=
User
;
//# sourceMappingURL=User.js.map
//# sourceMappingURL=User.js.map
\ No newline at end of file
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