Optimize user management api

This commit is contained in:
2023-11-29 10:55:44 +08:00
parent a0a6ce8f87
commit 7cf6b5cea2
8 changed files with 103 additions and 43 deletions

View File

@@ -0,0 +1,54 @@
package top.fatweb.api.vo.permission
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
import io.swagger.v3.oas.annotations.media.Schema
import java.time.LocalDateTime
/**
* User with information value object
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@Schema(description = "用户信息返回参数")
data class UserWithInfoVo(
@JsonSerialize(using = ToStringSerializer::class)
val id: Long?,
@Schema(description = "用户名", example = "User")
val username: String?,
@Schema(description = "是否锁定", example = "false")
val locking: Boolean?,
@Schema(description = "过期时间", example = "1900-01-01T00:00:00.000Z")
val expiration: LocalDateTime?,
@Schema(description = "认证过期时间", example = "1900-01-01T00:00:00.000Z")
val credentialsExpiration: LocalDateTime?,
@Schema(description = "是否启用", example = "true")
val enable: Boolean?,
@Schema(description = "当前登录时间", example = "1900-01-01T00:00:00.000Z")
val currentLoginTime: LocalDateTime?,
@Schema(description = "当前登录 IP", example = "1.1.1.1")
val currentLoginIp: String?,
@Schema(description = "最后登录时间", example = "1900-01-01T00:00:00.000Z")
val lastLoginTime: LocalDateTime?,
@Schema(description = "最后登录 IP", example = "1.1.1.1")
val lastLoginIp: String?,
@Schema(description = "创建时间", example = "1900-01-01T00:00:00.000Z")
val createTime: LocalDateTime?,
@Schema(description = "修改时间", example = "1900-01-01T00:00:00.000Z")
val updateTime: LocalDateTime?,
@Schema(description = "用户资料")
val userInfo: UserInfoVo?
)