관리자 관리 추가, 수정
This commit is contained in:
@@ -12,24 +12,27 @@ import jakarta.persistence.UniqueConstraint;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import java.time.ZonedDateTime;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor(access = AccessLevel.PROTECTED)
|
||||
@Table(
|
||||
name = "tb_user",
|
||||
uniqueConstraints = {@UniqueConstraint(name = "ux_tb_user_user_id", columnNames = "user_id")})
|
||||
name = "tb_user",
|
||||
uniqueConstraints = {@UniqueConstraint(name = "ux_tb_user_user_id", columnNames = "user_id")})
|
||||
public class UserEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_user_id_gen")
|
||||
@SequenceGenerator(
|
||||
name = "tb_user_id_gen",
|
||||
sequenceName = "tb_user_user_uid_seq",
|
||||
allocationSize = 1)
|
||||
name = "tb_user_id_gen",
|
||||
sequenceName = "tb_user_user_uid_seq",
|
||||
allocationSize = 1)
|
||||
@Column(name = "user_uid", nullable = false)
|
||||
private Long id;
|
||||
|
||||
@@ -52,7 +55,7 @@ public class UserEntity {
|
||||
@NotNull
|
||||
@ColumnDefault("'ACTIVE'")
|
||||
@Column(name = "state", nullable = false)
|
||||
private String state;
|
||||
private String state = "ACTIVE";
|
||||
|
||||
@Column(name = "date_withdrawal")
|
||||
private ZonedDateTime dateWithdrawal;
|
||||
@@ -85,6 +88,16 @@ public class UserEntity {
|
||||
@Column(name = "emp_id", nullable = false)
|
||||
private String empId;
|
||||
|
||||
public UserEntity(Long id, String userAuth, String userNm, String userId, String empId, String userEmail, String userPw) {
|
||||
this.id = id;
|
||||
this.userAuth = userAuth;
|
||||
this.userNm = userNm;
|
||||
this.userId = userId;
|
||||
this.empId = empId;
|
||||
this.userEmail = userEmail;
|
||||
this.userPw = userPw;
|
||||
}
|
||||
|
||||
public AuthDto.Basic toDto() {
|
||||
return new AuthDto.Basic(
|
||||
this.id,
|
||||
@@ -94,7 +107,7 @@ public class UserEntity {
|
||||
this.empId,
|
||||
this.userEmail,
|
||||
this.createdDttm
|
||||
) ;
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user