Commit 641611fe authored by nanahira's avatar nanahira

rework index

parent 536e1ea7
......@@ -35,6 +35,10 @@
- srvpro 里面的 client.send(发送给客户端)还是对应 client.send
- srvpro 里面 server.send(模拟客户端发送消息)对应 this.ctx.dispatch(msgClassInstance, client)
## ts-rest 相关
- 契约文件放在 src/api/contract.ts 一个文件里面,方便其他项目复制。
## 参考项目
可以参考电脑的下面的项目,用来参考。这些代码只能看,不能改。~ 指代这台电脑的 HOME 目录。
......
......@@ -21,6 +21,7 @@ export class DuelRecordPlayer extends BaseTimeEntity {
@Generated('increment')
id!: number;
@Index()
@Column({
type: 'varchar',
length: 20,
......@@ -52,6 +53,7 @@ export class DuelRecordPlayer extends BaseTimeEntity {
})
clientKey!: string; // getClientKey(client)
@Index()
@Column('bool')
isFirst!: boolean; // wasSwapped ? duelPos==1 : duelPos==0
......
......@@ -25,6 +25,7 @@ export class DuelRecordEntity extends BaseTimeEntity {
@Column('timestamp')
startTime!: Date; // duelRecord.time
@Index()
@Column('timestamp')
endTime!: Date; // 入库时间
......@@ -51,8 +52,9 @@ export class DuelRecordEntity extends BaseTimeEntity {
@Column('smallint', {
unsigned: true,
})
duelCount!: number; // room.duelCount.length
duelCount!: number; // room.duelRecords.length
@Index()
@Column('smallint')
winReason!: number; // OnRoomWin.winMsg.type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment