Merge branch 'susu' into dev
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package app.module.admin.config.adapters.web.interceptor;
|
package app.module.admin.config.adapters.web.interceptor;
|
||||||
|
|
||||||
|
import app.module.admin.config.application.util.AdminUtil;
|
||||||
import app.module.core.config.adapters.web.interceptor.model.URITopTierVO;
|
import app.module.core.config.adapters.web.interceptor.model.URITopTierVO;
|
||||||
import app.module.core.config.application.enums.AppType;
|
import app.module.core.config.application.enums.AppType;
|
||||||
import app.module.core.config.application.exception.NoMatchingURIException;
|
import app.module.core.config.application.exception.NoMatchingURIException;
|
||||||
@@ -76,16 +77,16 @@ public class AdminURIInterceptor implements HandlerInterceptor {
|
|||||||
// 활성 프로파일 가져오기 TODO 2차 오픈시 삭제 예정
|
// 활성 프로파일 가져오기 TODO 2차 오픈시 삭제 예정
|
||||||
modelAndView.addObject("activeProfile", activeProfiles);
|
modelAndView.addObject("activeProfile", activeProfiles);
|
||||||
|
|
||||||
|
String roleId = AdminUtil.getLoginUserRole();
|
||||||
if (!CommonUtil.isAjaxRequest(request)) {
|
if (!CommonUtil.isAjaxRequest(request)) {
|
||||||
URITopTier topTierOutput = topTierPortIn.connect(AppType.ADMIN);
|
URITopTier topTierOutput = topTierPortIn.connectRoleId(AppType.ADMIN,roleId);
|
||||||
modelAndView.addObject("topNode", recursiveMapping(topTierOutput));
|
modelAndView.addObject("topNode", recursiveMapping(topTierOutput));
|
||||||
|
|
||||||
if (modelAndView.getModelMap().getAttribute("currentURI") == null) {
|
if (modelAndView.getModelMap().getAttribute("currentURI") == null) {
|
||||||
modelAndView.addObject("currentURI", request.getAttribute("currentURI"));
|
modelAndView.addObject("currentURI", request.getAttribute("currentURI"));
|
||||||
}
|
}
|
||||||
|
|
||||||
modelAndView.addObject(
|
modelAndView.addObject("menuHierarchy", uriAncestryPortIn.connect(AppType.ADMIN, request.getRequestURI()));
|
||||||
"menuHierarchy", uriAncestryPortIn.connect(AppType.ADMIN, request.getRequestURI()));
|
|
||||||
|
|
||||||
if (cloudFrontDomain != null && bucketFolder != null) {
|
if (cloudFrontDomain != null && bucketFolder != null) {
|
||||||
modelAndView.addObject("S3URL", "https://" + cloudFrontDomain + bucketFolder);
|
modelAndView.addObject("S3URL", "https://" + cloudFrontDomain + bucketFolder);
|
||||||
|
|||||||
@@ -65,17 +65,18 @@ public class AdminAuthSuccessEvent {
|
|||||||
"security.password.change.notify", adminUser.getRemainPasswordDays()));
|
"security.password.change.notify", adminUser.getRemainPasswordDays()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 로그인 활성화 기록 생성
|
// 로그인 이력 쌓기
|
||||||
// loggedInUserSavePortIn.connect(
|
loggedInUserSavePortIn.connect(
|
||||||
// LoggedInUserSaveCmd.builder()
|
LoggedInUserSaveCmd.builder()
|
||||||
// .loggedInUserId(
|
.loggedInUserId(
|
||||||
// LoggedInUserIdSaveCmd.builder()
|
LoggedInUserIdSaveCmd.builder()
|
||||||
// .appType(AppType.ADMIN)
|
.appType(AppType.ADMIN)
|
||||||
// .id(authentication.getName())
|
.id(authentication.getName())
|
||||||
// .build())
|
.build())
|
||||||
// .clientIP(CommonUtil.getClientIP(request))
|
.clientIP(CommonUtil.getClientIP(request))
|
||||||
// .lastLoggedInAt(LocalDateTime.now())
|
.lastLoggedInAt(LocalDateTime.now())
|
||||||
// .build());
|
.build());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventListener
|
@EventListener
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public class AdminDetailsService implements UserDetailsService {
|
|||||||
adminUser.getPassword(),
|
adminUser.getPassword(),
|
||||||
adminUser.getRoles().stream().map(CoreRole::getId).findFirst().orElse(null),
|
adminUser.getRoles().stream().map(CoreRole::getId).findFirst().orElse(null),
|
||||||
adminUser.getRegionMainCode(),
|
adminUser.getRegionMainCode(),
|
||||||
|
adminUser.getLastLoginIp(),
|
||||||
!accountDisabled,
|
!accountDisabled,
|
||||||
true,
|
true,
|
||||||
isCredentialsNonExpired(adminUser.getPasswordUpdatedAt()),
|
isCredentialsNonExpired(adminUser.getPasswordUpdatedAt()),
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ public class AdminUser extends User {
|
|||||||
private Long seq;
|
private Long seq;
|
||||||
private String roleId;
|
private String roleId;
|
||||||
private String regionMainCode;
|
private String regionMainCode;
|
||||||
|
private String lastLoginIp;
|
||||||
private long remainPasswordDays;
|
private long remainPasswordDays;
|
||||||
|
|
||||||
public AdminUser(
|
public AdminUser(
|
||||||
@@ -18,6 +19,7 @@ public class AdminUser extends User {
|
|||||||
String password,
|
String password,
|
||||||
String roleId,
|
String roleId,
|
||||||
String regionMainCode,
|
String regionMainCode,
|
||||||
|
String lastLoginIp,
|
||||||
boolean enabled,
|
boolean enabled,
|
||||||
boolean accountNonExpired,
|
boolean accountNonExpired,
|
||||||
boolean credentialsNonExpired,
|
boolean credentialsNonExpired,
|
||||||
@@ -35,6 +37,7 @@ public class AdminUser extends User {
|
|||||||
this.seq = seq;
|
this.seq = seq;
|
||||||
this.roleId = roleId;
|
this.roleId = roleId;
|
||||||
this.regionMainCode = regionMainCode;
|
this.regionMainCode = regionMainCode;
|
||||||
|
this.lastLoginIp = lastLoginIp;
|
||||||
this.remainPasswordDays = remainPasswordDays;
|
this.remainPasswordDays = remainPasswordDays;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,4 +53,14 @@ public class AdminUtil {
|
|||||||
AdminUser user = (AdminUser) authentication.getPrincipal();
|
AdminUser user = (AdminUser) authentication.getPrincipal();
|
||||||
return user.getRegionMainCode().isEmpty() ? null : user.getRegionMainCode();
|
return user.getRegionMainCode().isEmpty() ? null : user.getRegionMainCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getLoginUserLastIp() {
|
||||||
|
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||||
|
if (authentication == null || !(authentication.getPrincipal() instanceof AdminUser)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
AdminUser user = (AdminUser) authentication.getPrincipal();
|
||||||
|
return user.getLastLoginIp();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,15 @@
|
|||||||
<insert id="insert" parameterType="app.module.core.config.adapters.persistence.entity.LoggedInUser">
|
<insert id="insert" parameterType="app.module.core.config.adapters.persistence.entity.LoggedInUser">
|
||||||
INSERT INTO logged_in_user
|
INSERT INTO logged_in_user
|
||||||
(
|
(
|
||||||
app_type,
|
|
||||||
id,
|
id,
|
||||||
|
app_type,
|
||||||
|
login_id,
|
||||||
clientip,
|
clientip,
|
||||||
last_logged_in_at
|
last_logged_in_at
|
||||||
)
|
)
|
||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
|
nextval('logged_in_user_seq'),
|
||||||
#{appType},
|
#{appType},
|
||||||
#{id},
|
#{id},
|
||||||
#{clientIP},
|
#{clientIP},
|
||||||
@@ -27,7 +29,7 @@
|
|||||||
clientip = #{clientIP},
|
clientip = #{clientIP},
|
||||||
last_logged_in_at = #{lastLoggedInAt}
|
last_logged_in_at = #{lastLoggedInAt}
|
||||||
WHERE app_type = #{appType}
|
WHERE app_type = #{appType}
|
||||||
AND id = #{id}
|
AND login_id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
|
|
||||||
<!-- 자식 children 가 있는 경우 -->
|
<!-- 자식 children 가 있는 경우 -->
|
||||||
<th:block th:if="${#lists.size(menu.children) > 0}">
|
<th:block th:if="${#lists.size(menu.children) > 0}">
|
||||||
<a th:href="${menu.uri}" th:text="${#messages.msg(menu.id)}">메뉴명</a>
|
<a href="#" th:text="${#messages.msg(menu.id)}" >메뉴명</a>
|
||||||
<th:block th:insert="~{this :: subMenuFrag}"
|
<th:block th:insert="~{this :: subMenuFrag}"
|
||||||
th:with="subMenus = ${menu.children}, addSubMenuClass = false">
|
th:with="subMenus = ${menu.children}, addSubMenuClass = false">
|
||||||
</th:block>
|
</th:block>
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<p class="user"><strong sec:authentication="name">로그인 사용자명</strong>님 안녕하세요</p>
|
<p class="user"><strong sec:authentication="name">로그인 사용자명</strong>님 안녕하세요</p>
|
||||||
<span class="user-ip">111.11.111.111</span>
|
<span class="user-ip" th:text="${@adminUtil.getLoginUserLastIp}">111.11.111.111</span>
|
||||||
<button class="btn-logout" onclick="location.href='/logout'">로그아웃</button>
|
<button class="btn-logout" onclick="location.href='/logout'">로그아웃</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="component-btns bottom-btn-group">
|
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
|
||||||
<div class="btns-row align-right">
|
<div class="btns-row align-right">
|
||||||
<button type="button" class="btn">
|
<button type="button" class="btn">
|
||||||
<span class="btn-txt">정보수정</span>
|
<span class="btn-txt">정보수정</span>
|
||||||
|
|||||||
@@ -20,7 +20,18 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>방문일</th>
|
<th>방문일</th>
|
||||||
<td>
|
<td>
|
||||||
<input id="visitDate" class="flatpickr" name="visitDate" type="text" placeholder="방문일을 선택하세요"/>
|
<div class="component-datepicker">
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" class="datepicker-btn-trigger" name="visitDate" id="visitDate" aria-label="방문일"
|
||||||
|
placeholder="방문일을 입력해주세요" />
|
||||||
|
<span class="input-field-btn datepicker-state">
|
||||||
|
<span class="hide-txt">달력</span>
|
||||||
|
<i class="ico-calendar ico-normal" aria-hidden="true"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<th>관리분야</th>
|
<th>관리분야</th>
|
||||||
<td>
|
<td>
|
||||||
@@ -87,7 +98,7 @@
|
|||||||
|
|
||||||
const showHouseholdModal2 = (seq) => {
|
const showHouseholdModal2 = (seq) => {
|
||||||
document.querySelector(".modal02").ui.open();
|
document.querySelector(".modal02").ui.open();
|
||||||
initFlatpickr();
|
//initFlatpickr();
|
||||||
|
|
||||||
ajaxUtil._ajaxMethod(
|
ajaxUtil._ajaxMethod(
|
||||||
'/api/researcher/visitHousehold/'+seq,
|
'/api/researcher/visitHousehold/'+seq,
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public class AdminView implements Serializable {
|
|||||||
private Boolean accountDisabled;
|
private Boolean accountDisabled;
|
||||||
private Integer loginFailCnt;
|
private Integer loginFailCnt;
|
||||||
private Boolean accountLocked;
|
private Boolean accountLocked;
|
||||||
|
private String lastLoginIp;
|
||||||
private LocalDateTime createdAt;
|
private LocalDateTime createdAt;
|
||||||
private String createdBy;
|
private String createdBy;
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
|
|||||||
@@ -9,5 +9,7 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface URIMapper {
|
public interface URIMapper {
|
||||||
URITopTier findTopTierByAppType(@Param("appType") AppType appType);
|
URITopTier findTopTierByAppType(@Param("appType") AppType appType);
|
||||||
|
URITopTier findTopTierByAppTypeByRoleId(@Param("appType") AppType appType,@Param("roleId") String roleId);
|
||||||
List<URITopTier> findChildrenByParentId(@Param("parentId") String parentId);
|
List<URITopTier> findChildrenByParentId(@Param("parentId") String parentId);
|
||||||
|
List<URITopTier> findChildrenByParentIdByRoleId(@Param("parentId") String parentId,@Param("roleId") String roleId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,16 @@ public class URITopTierDao implements URITopTierPortOut {
|
|||||||
|
|
||||||
return recursiveMapping(top);
|
return recursiveMapping(top);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public URITopTier connectRoleId(AppType appType, String roleId) {
|
||||||
|
URITopTier top = uriMapper.findTopTierByAppTypeByRoleId(appType,roleId);
|
||||||
|
if (top == null) {
|
||||||
|
throw new RuntimeException("There is no top tier item of " + appType);
|
||||||
|
}
|
||||||
|
|
||||||
|
return recursiveMapping(top,roleId);
|
||||||
|
}
|
||||||
|
|
||||||
private URITopTier recursiveMapping(URITopTier current) {
|
private URITopTier recursiveMapping(URITopTier current) {
|
||||||
List<URITopTier> children = uriMapper.findChildrenByParentId(current.getId());
|
List<URITopTier> children = uriMapper.findChildrenByParentId(current.getId());
|
||||||
@@ -33,4 +43,15 @@ public class URITopTierDao implements URITopTierPortOut {
|
|||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private URITopTier recursiveMapping(URITopTier current,String roleId) {
|
||||||
|
List<URITopTier> children = uriMapper.findChildrenByParentIdByRoleId(current.getId(),roleId);
|
||||||
|
current.setChildren(children.stream()
|
||||||
|
.map(uri -> recursiveMapping(uri,roleId))
|
||||||
|
.collect(Collectors.toList()));
|
||||||
|
return current;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ import app.module.core.usecase.uri.toptier.ports.application.domain.URITopTier;
|
|||||||
|
|
||||||
public interface URITopTierPortIn {
|
public interface URITopTierPortIn {
|
||||||
URITopTier connect(AppType appType);
|
URITopTier connect(AppType appType);
|
||||||
|
URITopTier connectRoleId(AppType appType, String roleId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ import app.module.core.usecase.uri.toptier.ports.application.domain.URITopTier;
|
|||||||
public interface URITopTierPortOut {
|
public interface URITopTierPortOut {
|
||||||
|
|
||||||
URITopTier connect(AppType appType);
|
URITopTier connect(AppType appType);
|
||||||
|
URITopTier connectRoleId(AppType appType,String roleId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,10 @@ public class URITopTierService implements URITopTierPortIn {
|
|||||||
public URITopTier connect(AppType appType) {
|
public URITopTier connect(AppType appType) {
|
||||||
return topTierPortOut.connect(appType);
|
return topTierPortOut.connect(appType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public URITopTier connectRoleId(AppType appType, String roleId) {
|
||||||
|
return topTierPortOut.connectRoleId(appType,roleId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,12 +18,17 @@
|
|||||||
a.account_disabled,
|
a.account_disabled,
|
||||||
a.login_fail_cnt,
|
a.login_fail_cnt,
|
||||||
a.account_locked,
|
a.account_locked,
|
||||||
|
liu.clientip as last_login_ip,
|
||||||
a.created_at,
|
a.created_at,
|
||||||
a.created_by,
|
a.created_by,
|
||||||
a.updated_at,
|
a.updated_at,
|
||||||
a.updated_by
|
a.updated_by
|
||||||
FROM admin a
|
FROM admin a
|
||||||
WHERE id = #{id}
|
LEFT JOIN ( SELECT clientip,login_id
|
||||||
|
FROM logged_in_user liu
|
||||||
|
ORDER BY last_logged_in_at desc
|
||||||
|
LIMIT 1 ) liu on liu.login_id = a.id
|
||||||
|
WHERE a.id = #{id}
|
||||||
AND a.is_deleted = false
|
AND a.is_deleted = false
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -2,32 +2,65 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="app.module.core.usecase.uri.toptier.adapters.persistence.URIMapper">
|
<mapper namespace="app.module.core.usecase.uri.toptier.adapters.persistence.URIMapper">
|
||||||
|
|
||||||
<select id="findTopTierByAppType" resultType="app.module.core.usecase.uri.toptier.ports.application.domain.URITopTier">
|
<select id="findTopTierByAppType" resultType="app.module.core.usecase.uri.toptier.ports.application.domain.URITopTier">
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
u.id,
|
||||||
app_type,
|
u.app_type,
|
||||||
text,
|
u.text,
|
||||||
uri,
|
u.uri,
|
||||||
show_on_navi,
|
u.show_on_navi,
|
||||||
order_no
|
u.order_no
|
||||||
FROM uri
|
FROM uri u
|
||||||
WHERE app_type = #{appType}
|
WHERE u.app_type = #{appType}
|
||||||
AND parent_id IS NULL
|
AND u.parent_id IS NULL
|
||||||
AND is_deleted = false
|
AND u.is_deleted = false
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findChildrenByParentId" resultType="app.module.core.usecase.uri.toptier.ports.application.domain.URITopTier">
|
<select id="findChildrenByParentId" resultType="app.module.core.usecase.uri.toptier.ports.application.domain.URITopTier">
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
u.id,
|
||||||
app_type,
|
u.app_type,
|
||||||
text,
|
u.text,
|
||||||
uri,
|
u.uri,
|
||||||
show_on_navi,
|
u.show_on_navi,
|
||||||
order_no
|
u.order_no
|
||||||
FROM uri
|
FROM uri u
|
||||||
WHERE parent_id = #{parentId}
|
WHERE u.parent_id = #{parentId}
|
||||||
AND is_deleted = false
|
AND u.is_deleted = false
|
||||||
ORDER BY order_no ASC
|
ORDER BY u.order_no ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findTopTierByAppTypeByRoleId" resultType="app.module.core.usecase.uri.toptier.ports.application.domain.URITopTier">
|
||||||
|
SELECT
|
||||||
|
u.id,
|
||||||
|
u.app_type,
|
||||||
|
u.text,
|
||||||
|
u.uri,
|
||||||
|
u.show_on_navi,
|
||||||
|
u.order_no
|
||||||
|
FROM uri u
|
||||||
|
JOIN uri_has_role uhr ON u.id = uhr.uri_id and uhr.is_deleted = false
|
||||||
|
WHERE u.app_type = #{appType}
|
||||||
|
AND u.parent_id IS NULL
|
||||||
|
AND u.is_deleted = false
|
||||||
|
AND uhr.role_id = #{roleId}
|
||||||
|
AND u.show_on_navi = true
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findChildrenByParentIdByRoleId" resultType="app.module.core.usecase.uri.toptier.ports.application.domain.URITopTier">
|
||||||
|
SELECT
|
||||||
|
u.id,
|
||||||
|
u.app_type,
|
||||||
|
u.text,
|
||||||
|
u.uri,
|
||||||
|
u.show_on_navi,
|
||||||
|
u.order_no
|
||||||
|
FROM uri u
|
||||||
|
JOIN uri_has_role uhr ON u.id = uhr.uri_id and uhr.is_deleted = false
|
||||||
|
WHERE u.parent_id = #{parentId}
|
||||||
|
AND u.is_deleted = false
|
||||||
|
AND uhr.role_id = #{roleId}
|
||||||
|
AND u.show_on_navi = true
|
||||||
|
ORDER BY u.order_no ASC
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -831,23 +831,26 @@ COMMENT ON COLUMN operation_log.is_deleted IS '삭제여부';
|
|||||||
|
|
||||||
-- ============================================
|
-- ============================================
|
||||||
-- TABLE : logged_in_user
|
-- TABLE : logged_in_user
|
||||||
-- DESC : 로그인 사용자 정보 테이블
|
-- DESC : 로그인 사용자 이력 테이블
|
||||||
-- ============================================
|
-- ============================================
|
||||||
|
CREATE SEQUENCE logged_in_user_seq START WITH 1 INCREMENT BY 1 CACHE 1 NO CYCLE;
|
||||||
CREATE TABLE logged_in_user (
|
CREATE TABLE logged_in_user (
|
||||||
|
id bigint DEFAULT nextval('logged_in_user_seq') NOT NULL, -- 로그 ID (PK)
|
||||||
app_type varchar(255) NOT NULL, -- 앱 타입 (FRONT / ADMIN)
|
app_type varchar(255) NOT NULL, -- 앱 타입 (FRONT / ADMIN)
|
||||||
id varchar(255) NOT NULL, -- 로그인 아이디
|
login_id varchar(255) NOT NULL, -- 로그인 아이디
|
||||||
last_logged_in_at timestamp(6), -- 마지막 로그인 날짜
|
last_logged_in_at timestamp(6), -- 마지막 로그인 날짜
|
||||||
clientip varchar(255), -- 접속 아이피
|
clientip varchar(255), -- 접속 아이피
|
||||||
|
|
||||||
CONSTRAINT logged_in_user_pkey PRIMARY KEY (app_type, id),
|
CONSTRAINT logged_in_user_pkey PRIMARY KEY (id),
|
||||||
CONSTRAINT logged_in_user_app_type_check
|
CONSTRAINT logged_in_user_app_type_check
|
||||||
CHECK (app_type::text = ANY (ARRAY['FRONT', 'ADMIN']))
|
CHECK (app_type::text = ANY (ARRAY['FRONT', 'ADMIN']))
|
||||||
);
|
);
|
||||||
|
|
||||||
COMMENT ON TABLE logged_in_user IS '로그인사용자정보테이블';
|
COMMENT ON TABLE logged_in_user IS '로그인사용자이력테이블';
|
||||||
|
|
||||||
|
COMMENT ON COLUMN logged_in_user.id IS '로그 ID';
|
||||||
COMMENT ON COLUMN logged_in_user.app_type IS '앱 타입';
|
COMMENT ON COLUMN logged_in_user.app_type IS '앱 타입';
|
||||||
COMMENT ON COLUMN logged_in_user.id IS '로그인 아이디';
|
COMMENT ON COLUMN logged_in_user.login_id IS '로그인 아이디';
|
||||||
COMMENT ON COLUMN logged_in_user.last_logged_in_at IS '마지막 로그인 날짜';
|
COMMENT ON COLUMN logged_in_user.last_logged_in_at IS '마지막 로그인 날짜';
|
||||||
COMMENT ON COLUMN logged_in_user.clientip IS '접속 아이피';
|
COMMENT ON COLUMN logged_in_user.clientip IS '접속 아이피';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user