package com.yutou.biliapi.bean.live.database;

import com.alibaba.fastjson2.annotation.JSONField;
import com.yutou.biliapi.bean.websocket.live.WSData;
import com.yutou.common.databases.AbsDatabasesBean;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class LiveSourceDatabaseBean extends AbsDatabasesBean {
    @JSONField(name = "id")
    int id;
    @JSONField(name = "type")
    private String type;
    @JSONField(name = "json")
    private String json;

    public LiveSourceDatabaseBean() {
        super("source",System.currentTimeMillis());
    }

    public LiveSourceDatabaseBean(WSData bean) {
        super("source",bean.getWs_timer());
        this.json = bean.getJson();
        type = bean.getCmd();
    }
}
