package cn.iocoder.yudao.framework.common.base;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.util.Date;

/**
 * 功能描述: 实体公共字段
 * <p>
 * 作者: Admin
 * 日期: 2020-09-15 12:00
 * @author Admin
 */
@Data
@MappedSuperclass
@EqualsAndHashCode(callSuper = false)
public abstract class BaseRowEntity extends BaseEntity {
    private static final long serialVersionUID = 5016292482743655554L;

    /** 创建人 */
    @Column(name = "created_by", nullable = false, columnDefinition = "bigint not null DEFAULT 0 comment '行创建用户'")
    private Long createdBy;

    /** 创建时间 */
    @Column(name = "created_at", nullable = false, columnDefinition = "timestamp not null comment '行创建时间'")
    private Date createdAt;

    /** 修改人 */
    @Column(name = "updated_by", nullable = false, columnDefinition = "bigint not null DEFAULT 0 comment '行修改用户'")
    private Long updatedBy;

    /** 修改时间 */
    @Column(name = "updated_at", nullable = false, columnDefinition = "timestamp not null comment '行修改时间'")
    private Date updatedAt;
}
