| Jin | f50fba6 | 2025-06-09 22:47:24 +0800 | [diff] [blame] | 1 | package com.example.myproject.entity; |
| 2 | |
| 3 | import java.time.LocalDateTime; |
| 4 | |
| 5 | import javax.persistence.Column; |
| 6 | import javax.persistence.Entity; |
| 7 | import javax.persistence.GeneratedValue; |
| 8 | import javax.persistence.GenerationType; |
| 9 | import javax.persistence.Id; |
| 10 | import javax.persistence.Table; |
| 11 | import lombok.Data; |
| 12 | |
| 13 | @Entity |
| 14 | @Table(name = "login_log") |
| 15 | @Data |
| 16 | public class LoginLog { |
| 17 | @Id |
| 18 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 19 | private Long id; |
| 20 | |
| 21 | private Long userId; |
| 22 | |
| 23 | @Column(columnDefinition = "datetime default now()", name = "login_time") |
| 24 | private LocalDateTime loginTime; |
| 25 | |
| 26 | } |