package com.abbidot.tracker.bean

import android.os.Parcelable
import com.abbidot.tracker.base.BaseDiffBean
import kotlinx.parcelize.Parcelize

/**
 *Created  by .yzq on 2022/2/28/028.
 * @link
 * @description:
 */
@Parcelize
data class FamilyBean(
    var acceptEmail: String,
    var deviceId: String,
    var familyId: String,
    var imgurl: String,
    var inviteDate: String,
    var sendEmail: String,
    var status: Int,//设备的分享状态 1 是分享成功 0 分享中 2 已拒绝
    var userId: String,
    var relation: Int,//关系 1 Family 2 friend 3 love 4 colleague
    var avatar: Int,//头像 1 男生 2 女生 3 未知
    var userName: String,
    var petId: String,
    var petName: String
) : Parcelable, BaseDiffBean() {
    constructor() : this("", "", "", "", "", "", 0, "", 1, 1, "", "", "")

    override fun isSameObject(other: Any): Boolean {
        val oldItem = other as FamilyBean
        return familyId == oldItem.familyId
    }

    override fun hasSameContent(other: Any): Boolean {
        val oldItem = other as FamilyBean
        return oldItem.imgurl == imgurl && oldItem.acceptEmail == acceptEmail
    }
}
