All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.yt.mybatis.domain.BaseEntity Maven / Gradle / Ivy

There is a newer version: 3.0.1
Show newest version
package com.github.yt.mybatis.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

@Table
public class BaseEntity> implements Serializable {

    private static final long serialVersionUID = 6468926052770326495L;

    @Transient
    public static final String DEFAULT_OPERATOR = "default";
    @Transient
    public static final String OPERATOR_ID = "operatorId";
    @Transient
    public static final String OPERATOR_NAME = "operatorName";
    @Transient
    public static final String DELETE_FLAG = "deleteFlag";

    // 创建时间
    private Date createDateTime;
    // 修改时间
    private Date modifyDateTime;
    // 创建人ID
    private String founderId;
    // 创建人姓名
    private String founderName;
    // 修改人ID
    private String modifierId;
    // 修改人姓名
    private String modifierName;
    // 删除标示
    @Column(nullable = false)
    private Boolean deleteFlag;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format= "yyyy-MM-dd HH:mm:ss")
    public Date getModifyDateTime() {
        return modifyDateTime;
    }

    public T setModifyDateTime(Date modifyDateTime) {
        this.modifyDateTime = modifyDateTime;
        return (T) this;
    }

    @JSONField(format= "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getCreateDateTime() {
        return createDateTime;
    }

    public T setCreateDateTime(Date createDateTime) {
        this.createDateTime = createDateTime;
        return (T) this;
    }

    public String getFounderId() {
        return founderId;
    }

    public T setFounderId(String founderId) {
        this.founderId = founderId;
        return (T) this;
    }

    public String getFounderName() {
        return founderName;
    }

    public T setFounderName(String founderName) {
        this.founderName = founderName;
        return (T) this;
    }

    public String getModifierId() {
        return modifierId;
    }

    public T setModifierId(String modifierId) {
        this.modifierId = modifierId;
        return (T) this;
    }

    public String getModifierName() {
        return modifierName;
    }

    public T setModifierName(String modifierName) {
        this.modifierName = modifierName;
        return (T) this;
    }

    public Boolean getDeleteFlag() {
        return deleteFlag;
    }

    public T setDeleteFlag(Boolean deleteFlag) {
        this.deleteFlag = deleteFlag;
        return (T) this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy