content: /*
   *  Copyright (C) 2019 Alpha Jiang. All rights reserved.
   *
   *  Licensed under the Apache License, Version 2.0 (the "License");
   *  you may not use this file except in compliance with the License.
   *  You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
   *  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 io.github.alphajiang.hyena.model.base;
  
  import com.fasterxml.jackson.annotation.JsonFormat;
  import com.fasterxml.jackson.annotation.JsonInclude;
  
  import java.util.Date;
  
  public abstract class BasePo<T> extends BaseObject {
  
      @JsonInclude(JsonInclude.Include.NON_NULL)
      private T id;
  
      @JsonInclude(JsonInclude.Include.NON_NULL)
      private Boolean enable;
  
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
      @JsonInclude(JsonInclude.Include.NON_NULL)
      private Date createTime;
  
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
      @JsonInclude(JsonInclude.Include.NON_NULL)
      private Date updateTime;
  
      public T getId() {
          return id;
      }
  
      public BasePo setId(T id) {
          this.id = id;
          return this;
      }
  
      public Boolean getEnable() {
          return enable;
      }
  
      public BasePo setEnable(Boolean enable) {
          this.enable = enable;
          return this;
      }
  
      public Date getCreateTime() {
          return createTime;
      }
  
      public BasePo setCreateTime(Date createTime) {
          this.createTime = createTime;
          return this;
      }
  
      public Date getUpdateTime() {
          return updateTime;
      }
  
      public BasePo setUpdateTime(Date updateTime) {
          this.updateTime = updateTime;
          return this;
      }
  
      public void copyBase(BasePo<T> in) {
          this.id = in.id;
          this.enable = in.enable;
          this.createTime = in.createTime;
          this.updateTime = in.updateTime;
      }
  }