package com.gyf.csams data class ApiResponse(val code:Int=200,val message:String,val body:T?=null) class Simple { companion object { fun success(message: String):ApiResponse{ return ApiResponse(code = 200, message = message, body = null) } fun error(message: String): ApiResponse { return ApiResponse(code = 500, message = message, body = null) } } } data class UserVo(val studentId:String,val name:String) sealed class BaseLoginVo{ abstract val password: String abstract val device: String abstract val clientType:ClientType } sealed class ClientBaseVo { abstract val token:Token abstract val clientType:ClientType } data class UserLoginVo(val studentId: String, override val password: String, override val device: String, override val clientType: ClientType=ClientType.Foreground ):BaseLoginVo() data class UserResDto(val password:String) data class ManagerLoginVo(val account:String, override val password:String, override val device:String):BaseLoginVo() { override val clientType: ClientType=ClientType.Background } data class Token(val token:String, val createTime:Long, val id:Int) data class LeaveMessageVo(val message: String, override val token:Token, override val clientType: ClientType=ClientType.Foreground):ClientBaseVo() data class OnlyToken(override val token: Token, override val clientType: ClientType):ClientBaseVo() data class LeaveMessageDto(val message: String,val user: UserVo) data class RegAssociationVo(val name:String, val desc:String, val fileId:Int, override val token: Token, override val clientType: ClientType=ClientType.Foreground ):ClientBaseVo() data class ImageFileDto(val filepath:String,val md5:String,val createTime: Long,val url:String) data class RegAssociationDto(val name:String,val desc:String,val logo:ImageFileDto) data class InitManagerDto(val account: String, val originPassword: String, val duty: Duty) data class PageDto(val currentPage:Long,val pageSize:Int=10) data class NotificationDto(val receiverId:Int, val receiverClient:ClientType, override val token: Token, val page:PageDto?, override val clientType: ClientType=receiverClient ):ClientBaseVo() data class NotificationVo(val title:String,val content:String,val id:Int,val createTime: Long)