package com.chenyang.nse.bussiness.entity.orm.table.core;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.chenyang.nse.bussiness.entity.orm.table.TBaseEntity;
import com.chenyang.nse.bussiness.entity.orm.table.core.scopeproject.TProAttributeGroup;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(
   name = "T_CORE_DATA_SCOPE"
)
public class TCoreDataScope extends TBaseEntity {
   @Column(
      length = 100
   )
   private String edition_id;
   @Column(
      length = 100
   )
   private String scope_id;
   @Column(
      length = 100
   )
   private String scope_name;
   @Column(
      length = 100
   )
   private String fa_tid;
   @Column(
      length = 50
   )
   private String create_user;
   @Column(
      length = 50
   )
   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   private Date create_date;
   @Transient
   private List<TCoreDataScope> childrens = new ArrayList();
   @Transient
   private List<TProAttributeGroup> groups = new ArrayList();

   public String getScope_id() {
      return this.scope_id;
   }

   public void setScope_id(String scope_id) {
      this.scope_id = scope_id;
   }

   public String getScope_name() {
      return this.scope_name;
   }

   public void setScope_name(String scope_name) {
      this.scope_name = scope_name;
   }

   public String getFa_tid() {
      return this.fa_tid;
   }

   public void setFa_tid(String fa_tid) {
      this.fa_tid = fa_tid;
   }

   public String getCreate_user() {
      return this.create_user;
   }

   public void setCreate_user(String create_user) {
      this.create_user = create_user;
   }

   public Date getCreate_date() {
      return this.create_date;
   }

   public void setCreate_date(Date create_date) {
      this.create_date = create_date;
   }

   public String getEdition_id() {
      return this.edition_id;
   }

   public void setEdition_id(String edition_id) {
      this.edition_id = edition_id;
   }

   public List<TCoreDataScope> getChildrens() {
      return this.childrens;
   }

   public List<TProAttributeGroup> getGroups() {
      return this.groups;
   }

   public void setChildrens(final List<TCoreDataScope> childrens) {
      this.childrens = childrens;
   }

   public void setGroups(final List<TProAttributeGroup> groups) {
      this.groups = groups;
   }

   public boolean equals(final Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof TCoreDataScope)) {
         return false;
      } else {
         TCoreDataScope other = (TCoreDataScope)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            Object this$edition_id = this.getEdition_id();
            Object other$edition_id = other.getEdition_id();
            if (this$edition_id == null) {
               if (other$edition_id != null) {
                  return false;
               }
            } else if (!this$edition_id.equals(other$edition_id)) {
               return false;
            }

            Object this$scope_id = this.getScope_id();
            Object other$scope_id = other.getScope_id();
            if (this$scope_id == null) {
               if (other$scope_id != null) {
                  return false;
               }
            } else if (!this$scope_id.equals(other$scope_id)) {
               return false;
            }

            Object this$scope_name = this.getScope_name();
            Object other$scope_name = other.getScope_name();
            if (this$scope_name == null) {
               if (other$scope_name != null) {
                  return false;
               }
            } else if (!this$scope_name.equals(other$scope_name)) {
               return false;
            }

            Object this$fa_tid = this.getFa_tid();
            Object other$fa_tid = other.getFa_tid();
            if (this$fa_tid == null) {
               if (other$fa_tid != null) {
                  return false;
               }
            } else if (!this$fa_tid.equals(other$fa_tid)) {
               return false;
            }

            Object this$create_user = this.getCreate_user();
            Object other$create_user = other.getCreate_user();
            if (this$create_user == null) {
               if (other$create_user != null) {
                  return false;
               }
            } else if (!this$create_user.equals(other$create_user)) {
               return false;
            }

            Object this$create_date = this.getCreate_date();
            Object other$create_date = other.getCreate_date();
            if (this$create_date == null) {
               if (other$create_date != null) {
                  return false;
               }
            } else if (!this$create_date.equals(other$create_date)) {
               return false;
            }

            Object this$childrens = this.getChildrens();
            Object other$childrens = other.getChildrens();
            if (this$childrens == null) {
               if (other$childrens != null) {
                  return false;
               }
            } else if (!this$childrens.equals(other$childrens)) {
               return false;
            }

            Object this$groups = this.getGroups();
            Object other$groups = other.getGroups();
            if (this$groups == null) {
               if (other$groups != null) {
                  return false;
               }
            } else if (!this$groups.equals(other$groups)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(final Object other) {
      return other instanceof TCoreDataScope;
   }

   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      Object $edition_id = this.getEdition_id();
      result = result * 59 + ($edition_id == null ? 43 : $edition_id.hashCode());
      Object $scope_id = this.getScope_id();
      result = result * 59 + ($scope_id == null ? 43 : $scope_id.hashCode());
      Object $scope_name = this.getScope_name();
      result = result * 59 + ($scope_name == null ? 43 : $scope_name.hashCode());
      Object $fa_tid = this.getFa_tid();
      result = result * 59 + ($fa_tid == null ? 43 : $fa_tid.hashCode());
      Object $create_user = this.getCreate_user();
      result = result * 59 + ($create_user == null ? 43 : $create_user.hashCode());
      Object $create_date = this.getCreate_date();
      result = result * 59 + ($create_date == null ? 43 : $create_date.hashCode());
      Object $childrens = this.getChildrens();
      result = result * 59 + ($childrens == null ? 43 : $childrens.hashCode());
      Object $groups = this.getGroups();
      result = result * 59 + ($groups == null ? 43 : $groups.hashCode());
      return result;
   }

   public String toString() {
      return "TCoreDataScope(edition_id=" + this.getEdition_id() + ", scope_id=" + this.getScope_id() + ", scope_name=" + this.getScope_name() + ", fa_tid=" + this.getFa_tid() + ", create_user=" + this.getCreate_user() + ", create_date=" + this.getCreate_date() + ", childrens=" + this.getChildrens() + ", groups=" + this.getGroups() + ")";
   }
}
