package com.mortals.xhx.module.page.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.page.model.vo.PageVo;
import lombok.Data;
/**
* 页面信息实体对象
*
* @author zxfei
* @date 2023-10-07
*/
@Data
public class PageEntity extends PageVo {
    private static final long serialVersionUID = 1L;

    /**
    * 页面名称
    */
    private String pageName;
    /**
    * 页面类型(1.首页,2.产品详情,3.文章详情)
    */
    private Integer pageType;
    /**
    * 页面短链接
    */
    private String pageUrl;
    /**
    * 可以是一个包含其他页面信息的JSON对象或单独的字段，根据页面的具体需求来设计
    */
    private String otherDetail;
    /**
    * 备注
    */
    private String remark;
    /**
    * 收藏时间
    */
    private Date favoriteTime;
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof PageEntity) {
            PageEntity tmp = (PageEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
            this.pageName = "";
            this.pageType = 0;
            this.pageUrl = "";
            this.otherDetail = "";
            this.remark = "";
            this.favoriteTime = new Date();
    }
}