Refactor project structure and update .gitignore; enhance README with setup instructions and environment requirements. Clean up backend code for improved readability and maintainability.

This commit is contained in:
liumangmang
2026-02-04 11:07:42 +08:00
parent 765d05c0a7
commit 7e6ebd18a5
49 changed files with 3381 additions and 3389 deletions

View File

@@ -1,35 +1,35 @@
package com.sshmanager.entity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import javax.persistence.*;
import java.time.Instant;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "users")
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false, unique = true, length = 50)
private String username;
@Column(nullable = false, length = 255)
private String passwordHash;
@Column(length = 100)
private String displayName;
@Column(nullable = false)
private Instant createdAt = Instant.now();
@Column(nullable = false)
private Instant updatedAt = Instant.now();
}
package com.sshmanager.entity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import javax.persistence.*;
import java.time.Instant;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "users")
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false, unique = true, length = 50)
private String username;
@Column(nullable = false, length = 255)
private String passwordHash;
@Column(length = 100)
private String displayName;
@Column(nullable = false)
private Instant createdAt = Instant.now();
@Column(nullable = false)
private Instant updatedAt = Instant.now();
}