剧情弹幕:添加接口

This commit is contained in:
luying
2021-05-15 11:41:41 +08:00
parent a2d2d83f93
commit ee49699abd
3 changed files with 112 additions and 0 deletions

View 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);
}
}
}