剧情弹幕:添加接口
This commit is contained in:
22
shared/domain/roleField/barrage.ts
Normal file
22
shared/domain/roleField/barrage.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ScriptBarrageType } from '../../db/ScriptBarrage';
|
||||
import { getSeconds } from '../../pubUtils/timeUtil';
|
||||
|
||||
export class BarrageReturn {
|
||||
code: string; // code
|
||||
warId: number; // 关卡id
|
||||
rid: string; // 剧本id
|
||||
index: string; // 对话索引id
|
||||
content: string; // 弹幕内容
|
||||
createTime: number; // 发送时间
|
||||
|
||||
constructor(barrage: ScriptBarrageType) {
|
||||
if(barrage) {
|
||||
this.code = barrage.code;
|
||||
this.warId = barrage.warId;
|
||||
this.rid = barrage.rid;
|
||||
this.index = barrage.index;
|
||||
this.content = barrage.content;
|
||||
this.createTime = getSeconds(barrage.createdAt);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user