1.实体类
import jakarta.persistence.*;
import lombok.Data;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.util.Date;
@Entity
@Table(name = "teacher")
@EntityListeners({AuditingEntityListener.class})
@Data
public class Teacher {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
@CreatedBy
private String createUserId;
@LastModifiedBy
private String updateUserId;
@CreatedDate
private Date createTime