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

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

@EqualsAndHashCode(callSuper = true)
@Data
public class LiveInteractWordDatabaseBean extends AbsDatabasesBean {
    @JSONField(name = "id")
    int id;
    @JSONField(name = "uid")
    private long uid;
    @JSONField(name = "type")
    private int type; //1为进场,2为关注
    @JSONField(name = "room_id")
    private long roomId;
    @JSONField(name = "timer")
    private long timer;
    @JSONField(name = "uname")
    private String uname;
    @JSONField(name = "uname_color")
    private String uname_color;
    @JSONField(name = "face")
    private String face;

    public LiveInteractWordDatabaseBean() {
        super("InteractWord",System.currentTimeMillis());
    }

    public LiveInteractWordDatabaseBean(WSInteractWord bean) {
        super("InteractWord", bean.getWs_timer());
        uid = bean.getUid();
        type = bean.getType();
        roomId = bean.getRoomId();
        timer = bean.getTimer();
        uname = bean.getUname();
        uname_color = bean.getUname_color();
        face = bean.getFace();

    }
}
