/*
 * Tencent is pleased to support the open source community by making QMUI_Android available.
 *
 * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
 *
 * Licensed under the MIT License (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 *
 * http://opensource.org/licenses/MIT
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language governing permissions and
 * limitations under the License.
 */


package com.bonait.bnframework.modules.home.fragment.mode;

import com.qmuiteam.qmui.widget.section.QMUISection;

/**
 * 选中Item
 */
public class SectionItem implements QMUISection.Model<SectionItem> {
    /**
     * 标签
     */
    private String tvTag;
    /**
     * 备注
     */
    private String tvNote;
    /**
     * 金额
     */
    private String tvAccount;
    /**
     * 是否收藏
     */
    private Boolean IsSC;
    /**
     * Url
     */
    private String address;

    public SectionItem(String name1, String name2, String name3,String address,boolean isSC) {
        this.tvTag = name1;
        this.tvNote = name2;
        this.tvAccount = name3;
        this.IsSC=isSC;
        this.address=address;
    }

    public String getTag() {
        return tvTag;
    }

    public String getNote() {
        return tvNote;
    }

    public String getAccount() {
        return tvAccount;
    }
    public Boolean getIsSC() {
        return IsSC;
    }
    public String getAddress() {
        return address;
    }

    public void SetIsSC(boolean isSC)
    {
        this.IsSC=isSC;
    }

    @Override
    public SectionItem cloneForDiff() {
        return new SectionItem(getTag(), getNote(), getAccount(),getAddress(),getIsSC());
    }

    @Override
    public boolean isSameItem(SectionItem other) {
        return tvTag == other.tvTag || (tvTag != null && tvTag.equals(other.tvTag))
              && tvNote == other.tvNote || (tvNote != null && tvNote.equals(other.tvNote))
              && IsSC == other.IsSC || (IsSC != null && IsSC.equals(other.IsSC))
                && address == other.address || (address != null && address.equals(other.address))
              && tvAccount == other.tvAccount || (tvAccount != null && tvAccount.equals(other.tvAccount));
    }
    @Override

    public boolean isSameContent(SectionItem other) {
        return true;
    }
}