package cn.reghao.tnb.content.app.vod.model.vo;

import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author reghao
 * @date 2021-12-08 09:46:24
 */
@Setter
@Getter
public class VideoCategoryVo {
    private final Integer id;
    private final String name;
    List<VideoCategoryVo> children;

    public VideoCategoryVo(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    @Override
    public int hashCode() {
        int result = 17;
        result = result * 31 + id.hashCode();
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }

        if (other instanceof VideoCategoryVo) {
            VideoCategoryVo o = (VideoCategoryVo) other;
            return o.id.equals(id);
        } else {
            return false;
        }
    }
}
