master
pan 4 years ago
parent 10a11c7e1d
commit ece571beb6
  1. 146
      test1/src/main/kotlin/com/gyf/csams/module/Vo.kt

@ -1,5 +1,4 @@
package com.gyf.csams
package com.gyf.csams.module
data class ApiResponse<T>(val code:Int=200,val message:String,val body:T?=null)
@ -16,6 +15,16 @@ class Simple {
}
/**
* 客户端类型
*
*/
enum class ClientType{
//前台
Foreground,
//后台
Background
}
/**
* 一般信息
*
@ -51,7 +60,8 @@ data class ManagerInfoVo(val duty: Duty,
override val desc: String
): PersonInfoVo()
data class UserInfoVo(override val name: String, override val headImg: String?, override val desc: String):PersonInfoVo()
data class UserInfoVo(override val name: String, override val headImg: String?, override val desc: String):
PersonInfoVo()
/**
@ -123,28 +133,15 @@ 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()
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: UserInfoVo)
/**
* 社团注册资料表单
*
* @property name
* @property desc
* @property fileId
*/
data class AssociationRegVo(val id:Int?, val name: String, val desc: String, val fileId: Int,
override val clientType: ClientType=ClientType.Foreground,
override val token: Token
):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)
@ -161,7 +158,8 @@ data class SearchAssociationVo(val name:String, val desc:String,
data class ShowAssociationVo(val id: Int,
override val token: Token,
override val clientType: ClientType=ClientType.Foreground):ClientBaseVo()
override val clientType: ClientType = ClientType.Foreground
): ClientBaseVo()
data class QueryAssociationMembers(val id:Int,
val name:String?=null,
@ -199,7 +197,7 @@ enum class AssociationFaculty(val desc: String, val range: IntRange) {
}
abstract class BaseAssociationVo{
abstract val id: Int
abstract val associationId: Int
abstract val name: String
abstract val desc: String
abstract val logo:String
@ -212,7 +210,7 @@ abstract class BaseAssociationVo{
*
*/
class AssociationVo(
override val id: Int,
override val associationId: Int,
override val name: String,
override val desc: String,
override val logo: String,
@ -229,10 +227,6 @@ enum class CheckStatus(val desc: String){
Finish("审核完成")
}
data class AssociationMemberVo(
val association:AssociationVo,
val isHead:Boolean
)
/**
* 活动照片
@ -244,32 +238,48 @@ data class AssociationActPhotoVo(val path:String)
data class AssociationMainVo(val associationVo: AssociationVo, val head: UserInfoVo,
val photos:List<AssociationActPhotoVo>?=null)
data class AuditCheckVo(val checkStatus: CheckStatus, val applyTime: Long,
val firstCause:String, val lastCause:String?)
//前台社团注册资料
data class AssociationCheckVo(
override val id: Int,
override val associationId: Int,
override val name: String,
override val desc: String,
override val logo: String,
override val faculty: AssociationFaculty,
override val level: AssociationLevel?,
val checkStatus:CheckStatus,
val applyTime: Long,
val firstCause:String,
val lastCause:String?,
val fileId:Int
val fileId:Int,
val auditCheckVo: AuditCheckVo
): BaseAssociationVo()
val facultyRange=IntRange(4,5)
fun User.faculty():AssociationFaculty{
val num=studentId.substring(facultyRange).toInt()
AssociationFaculty.values().forEach {
if(num in it.range){
return it
}
}
throw IllegalArgumentException("无法根据${facultyRange}对应的num[${num}]找到所属院系")
/**
* 社团注册资料表单
*
* @property name
* @property desc
* @property fileId
*/
data class AssociationRegVo(val associationId:Int?,
val name: String,
val desc: String, val fileId: Int,
override val clientType: ClientType = ClientType.Foreground,
override val token: Token
): ClientBaseVo()
abstract class AuditVo{
abstract val audit: AuditLoggingVo
}
/**
* 社团注册审核记录
*
*
*/
data class AuditAssociationVo(val name:String, val desc:String,
val logo:String, override val audit: AuditLoggingVo
): AuditVo()
/**
* 通用审核记录
@ -289,30 +299,62 @@ data class AuditLoggingVo(val id:Int, val user:UserInfoVo, val applyTime: Long,
val auditTime:Long?, val nextAudit: AuditLoggingVo?)
/**
* 社团注册资料受理
* 资料受理
*
* @property regId
* @property auditId
* @property clientType
*/
data class AcceptRegAssociation(val regId:Int,
val isFirstAccept:Boolean,
data class AcceptVo(val auditId:Int,
override val clientType: ClientType = ClientType.Background,
override val token: Token
): ClientBaseVo()
/**
* 社团注册审核记录
*
*/
data class DisposeRegInfoVo(val name:String,val desc:String,val logo:String,val log:AuditLoggingVo)
/**
* 社团注册资料审核
*资料审核
*
* @property regId
* @property auditId
* @property result
* @property cause
* @property clientType
*/
data class CheckRegVo(val regId:Int, val result:Boolean, val cause:String,
data class CheckVo(val auditId:Int, val result:Boolean, val cause:String,
override val clientType: ClientType = ClientType.Background, override val token: Token
): ClientBaseVo()
data class BaseActivityVo(
val activityName:String,
val activityTime: Long,
val activityAddress:String,
val activityDesc:String,
val activitySize:Int
)
/**
* 前台活动申请书
*
* @property activityId
* @property clientType
*/
data class ActivityApplyVo(val activityId:Int?,
val associationId: Int,
val baseActivityVo: BaseActivityVo,
override val token: Token,
override val clientType: ClientType = ClientType.Foreground
): ClientBaseVo()
/**
* 后台活动申请书
*
* @property auditId
* @property activityName
* @property activityTime
* @property activityAddress
* @property activityDesc
* @property activitySize
*/
data class AuditActVo(val auditId:Int, val activityName:String, val activityTime: Long,
val activityAddress:String,
val activityDesc:String, val activitySize:Int,
override val audit: AuditLoggingVo
): AuditVo()
Loading…
Cancel
Save