From 7b4b71ee33c7a42383d3e6a69885d521fd7b6688 Mon Sep 17 00:00:00 2001
From: jhjang <jhjang@maprex.co.kr>
Date: 수, 08 12월 2021 17:25:23 +0900
Subject: [PATCH] Merge branch 'master' of http://192.168.0.25:9001/r/owl-kisa

---
 src/main/java/kr/wisestone/owl/domain/User.java |   59 +++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 39 insertions(+), 20 deletions(-)

diff --git a/src/main/java/kr/wisestone/owl/domain/User.java b/src/main/java/kr/wisestone/owl/domain/User.java
index 29b8f96..d479a6e 100644
--- a/src/main/java/kr/wisestone/owl/domain/User.java
+++ b/src/main/java/kr/wisestone/owl/domain/User.java
@@ -1,7 +1,6 @@
 package kr.wisestone.owl.domain;
 
 import kr.wisestone.owl.domain.enumType.SocialType;
-import kr.wisestone.owl.util.CommonUtil;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.userdetails.UserDetails;
 import javax.persistence.*;
@@ -16,9 +15,14 @@
 
     public static final String USER_STATUS_ACTIVE = "01";  //  �궗�슜�옄 �솢�꽦
     public static final String USER_STATUS_DEL = "02";    //  �궗�슜�옄 �깉�눜
-    public static final String DEFAULT_PROFILE = "assets/images/default_profile.png";    //  湲곕낯 �봽濡쒗븘
-    public static final String DEFAULT_RESERVATION_NOTIFY_TIME = "09:00";    //  湲곕낯 �씠硫붿씪 �븣由� �삁�젙 �떆媛�
+    //public static final String DEFAULT_PROFILE = "assets/images/default_profile.png";    //  湲곕낯 �봽濡쒗븘
+    public static final String DEFAULT_PROFILE = "assets/images/default-profile-kisa.png";    //  �씤�꽣�꽬吏꾪씎�썝 湲곕낯 �봽濡쒗븘
+    //public static final String DEFAULT_RESERVATION_NOTIFY_TIME = "09:00";    //  湲곕낯 �씠硫붿씪 �븣由� �삁�젙 �떆媛�
+    public static final String DEFAULT_RESERVATION_NOTIFY_TIME = "false";    //  湲곕낯 �씠硫붿씪 �븣由� �삁�젙 �떆媛� false濡� 蹂�寃�
     public static final String DEFAULT_LANGUAGE = "ko"; //  湲곕낯 �뼵�뼱
+
+    public static final String INSERT_TYPE_NORMAL = "N";    // 異붽� ���엯(�씪諛�)
+    public static final String INSERT_TYPE_API = "A";       // 異붽� ���엯(API)
 
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -30,15 +34,16 @@
     private String phone;
     private String profile;
     private String awsKey;
-//    private Long departmentId;
     @Enumerated(EnumType.STRING)
     private SocialType socialType;
     private Long lastWorkspaceId;
     private Long lastProjectId;
+    private Long lastIssueTypeId;
     private Date lastLoginDate;
     private String reservationNotifyTime;   //  �씠硫붿씪 �븣由� �떆媛� �삁�젙
     private String language;
     private String licensekey;
+    private String insertType = User.INSERT_TYPE_NORMAL;
 
     @OneToMany(mappedBy = "user", cascade = {CascadeType.ALL}, orphanRemoval = true)
     private Set<SystemRoleUser> systemRoleUsers = new HashSet<>();
@@ -65,10 +70,8 @@
     @JoinColumn(name="level_id")
     private UserLevel userLevel;
 
-    @ManyToOne(targetEntity = DepartmentManagement.class, fetch = FetchType.LAZY)
-    @JoinColumn(name="department_id")
-    private DepartmentManagement departmentManagement;
-
+    @OneToMany(mappedBy = "user", cascade = {CascadeType.ALL}, orphanRemoval = true)
+    private Set<ApiToken> apiTokens = new HashSet<>();
 
     public User() {
     }
@@ -77,14 +80,6 @@
         this.id = id;
         this.name = name;
         this.account = account;
-    }
-
-    public DepartmentManagement getDepartmentId() {
-        return departmentManagement;
-    }
-
-    public void setDepartmentId(DepartmentManagement department) {
-        this.departmentManagement = department;
     }
 
     public UserLevel getUserLevel() {
@@ -170,6 +165,14 @@
         this.lastProjectId = lastProjectId;
     }
 
+    public Long getLastIssueTypeId() {
+        return lastIssueTypeId;
+    }
+
+    public void setLastIssueTypeId(Long lastIssueTypeId) {
+        this.lastIssueTypeId = lastIssueTypeId;
+    }
+
     public String getAwsKey() {
         return awsKey;
     }
@@ -213,6 +216,14 @@
 
     public void setProjectRoleUsers(Set<ProjectRoleUser> projectRoleUsers) {
         this.projectRoleUsers = projectRoleUsers;
+    }
+
+    public String getInsertType() {
+        return insertType;
+    }
+
+    public void setInsertType(String insertType) {
+        this.insertType = insertType;
     }
 
     public void addProjectRole(ProjectRole projectRole) {
@@ -310,10 +321,10 @@
         return this.userLevel.getPermission();
     }
 
-    // TEST
-    //public void setPermission(Integer permission) {
-    //    this.userLevel.setPermission(permission);
-    //}
+    // wyu - TEST
+//    public void setPermission(Integer permission) {
+//        this.userLevel.setPermission(permission);
+//    }
 
     public String getLicensekey() {
         return licensekey;
@@ -323,6 +334,14 @@
         this.licensekey = licensekey;
     }
 
+    public Set<ApiToken> getApiTokens() {
+        return apiTokens;
+    }
+
+    public void setApiTokens(Set<ApiToken> apiTokens) {
+        this.apiTokens = apiTokens;
+    }
+
     @Override
     public Collection<? extends GrantedAuthority> getAuthorities() {
         // TODO Auto-generated method stub

--
Gitblit v1.8.0