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) } } } /** * 用户注册表单 * * @property studentId 学号 * @property name 姓名 */ data class UserVo(val studentId:String,val name:String) /** * 用户登陆表单 * * @property studentId 学号 * @property password 密码 * @property device 设备型号 */ data class UserLoginVo(val studentId: String,val password: String,val device: String) data class UserLogoutVo(val userId:Int) data class UserResDto(val password:String) data class Token(val token:String, val createTime:Long, val userId:Int) data class TokenVo(val token:String,val userId:Int) sealed class BaseVo{ abstract val token:Token } data class LeaveMessageVo(val message: String, override val token:Token):BaseVo() data class OnlyToken(override val token: Token):BaseVo() //data class PageVo(val pageSize:Int=10,val page:, override val token: Token):BaseVo() 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):BaseVo() 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)