Li Shengzhao
9 years ago
5 changed files with 176 additions and 1 deletions
@ -0,0 +1,105 @@
|
||||
/* |
||||
* Copyright (c) 2015 MONKEYK Information Technology Co. Ltd |
||||
* www.monkeyk.com |
||||
* All rights reserved. |
||||
* |
||||
* This software is the confidential and proprietary information of |
||||
* MONKEYK Information Technology Co. Ltd ("Confidential Information"). |
||||
* You shall not disclose such Confidential Information and shall use |
||||
* it only in accordance with the terms of the license agreement you |
||||
* entered into with MONKEYK Information Technology Co. Ltd. |
||||
*/ |
||||
package com.monkeyk.sos.domain.dto; |
||||
|
||||
import com.monkeyk.sos.domain.user.Privilege; |
||||
import com.monkeyk.sos.domain.user.User; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.format.DateTimeFormatter; |
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 2016/3/12 |
||||
* |
||||
* @author Shengzhao Li |
||||
*/ |
||||
public class UserDto implements Serializable { |
||||
private static final long serialVersionUID = -2502329463915439215L; |
||||
|
||||
|
||||
private String guid; |
||||
|
||||
private String username; |
||||
|
||||
private String phone; |
||||
private String email; |
||||
|
||||
private String createTime; |
||||
|
||||
private List<Privilege> privileges = new ArrayList<>(); |
||||
|
||||
|
||||
public UserDto() { |
||||
} |
||||
|
||||
|
||||
public UserDto(User user) { |
||||
this.guid = user.guid(); |
||||
this.username = user.username(); |
||||
this.phone = user.phone(); |
||||
this.email = user.email(); |
||||
|
||||
this.privileges = user.privileges(); |
||||
this.createTime = user.createTime().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME); |
||||
} |
||||
|
||||
public String getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(String createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public String getGuid() { |
||||
return guid; |
||||
} |
||||
|
||||
public void setGuid(String guid) { |
||||
this.guid = guid; |
||||
} |
||||
|
||||
public String getUsername() { |
||||
return username; |
||||
} |
||||
|
||||
public void setUsername(String username) { |
||||
this.username = username; |
||||
} |
||||
|
||||
public String getPhone() { |
||||
return phone; |
||||
} |
||||
|
||||
public void setPhone(String phone) { |
||||
this.phone = phone; |
||||
} |
||||
|
||||
public String getEmail() { |
||||
return email; |
||||
} |
||||
|
||||
public void setEmail(String email) { |
||||
this.email = email; |
||||
} |
||||
|
||||
public List<Privilege> getPrivileges() { |
||||
return privileges; |
||||
} |
||||
|
||||
public void setPrivileges(List<Privilege> privileges) { |
||||
this.privileges = privileges; |
||||
} |
||||
} |
@ -0,0 +1,52 @@
|
||||
/* |
||||
* Copyright (c) 2015 MONKEYK Information Technology Co. Ltd |
||||
* www.monkeyk.com |
||||
* All rights reserved. |
||||
* |
||||
* This software is the confidential and proprietary information of |
||||
* MONKEYK Information Technology Co. Ltd ("Confidential Information"). |
||||
* You shall not disclose such Confidential Information and shall use |
||||
* it only in accordance with the terms of the license agreement you |
||||
* entered into with MONKEYK Information Technology Co. Ltd. |
||||
*/ |
||||
package com.monkeyk.sos.domain.dto; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 2016/3/12 |
||||
* |
||||
* @author Shengzhao Li |
||||
*/ |
||||
public class UserOverviewDto implements Serializable { |
||||
private static final long serialVersionUID = 2023379587030489248L; |
||||
|
||||
|
||||
private String username; |
||||
|
||||
|
||||
private List<UserDto> userDtos = new ArrayList<>(); |
||||
|
||||
|
||||
public UserOverviewDto() { |
||||
} |
||||
|
||||
|
||||
public String getUsername() { |
||||
return username; |
||||
} |
||||
|
||||
public void setUsername(String username) { |
||||
this.username = username; |
||||
} |
||||
|
||||
public List<UserDto> getUserDtos() { |
||||
return userDtos; |
||||
} |
||||
|
||||
public void setUserDtos(List<UserDto> userDtos) { |
||||
this.userDtos = userDtos; |
||||
} |
||||
} |
Loading…
Reference in new issue