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

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

@EqualsAndHashCode(callSuper = true)
@Data
public class LiveGuardBuyBean extends AbsDatabasesBean {
    @JSONField(name = "uid")
    private String uid;

    @JSONField(name = "username")
    private String username;

    @JSONField(name = "guard_level")
    private long guardLevel;

    @JSONField(name = "num")
    private long num;

    @JSONField(name = "price")
    private long price;

    @JSONField(name = "gift_id")
    private long giftID;

    @JSONField(name = "gift_name")
    private String giftName;

    @JSONField(name = "start_time")
    private long startTime;

    @JSONField(name = "end_time")
    private long endTime;


    public LiveGuardBuyBean() {
        super("guardBuy", System.currentTimeMillis());
    }
    public LiveGuardBuyBean(WSGuardBuy guard) {
        super("guardBuy", System.currentTimeMillis());
        this.uid = guard.getUid();
        this.username = guard.getUsername();
        this.guardLevel = guard.getGuardLevel();
        this.num = guard.getNum();
        this.price = guard.getPrice();
        this.giftID = guard.getGiftID();
        this.giftName = guard.getGiftName();
        this.startTime = guard.getStartTime();
        this.endTime = guard.getEndTime();
    }
}
