-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
465 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/kotlin/cn/edu/buaa/scs/controller/models/CreatePeerAppealRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* cloudapi_v2 | ||
* buaa scs cloud api v2 | ||
* | ||
* The version of the OpenAPI document: 2.0 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
package cn.edu.buaa.scs.controller.models | ||
|
||
|
||
/** | ||
* | ||
* @param content | ||
* @param expId | ||
*/ | ||
data class CreatePeerAppealRequest( | ||
val content: kotlin.String, | ||
val expId: kotlin.Int | ||
) | ||
|
26 changes: 26 additions & 0 deletions
26
src/main/kotlin/cn/edu/buaa/scs/controller/models/PatchPeerAppealRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* cloudapi_v2 | ||
* buaa scs cloud api v2 | ||
* | ||
* The version of the OpenAPI document: 2.0 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
package cn.edu.buaa.scs.controller.models | ||
|
||
|
||
/** | ||
* | ||
* @param content | ||
* @param processStatus | ||
* @param processContent | ||
*/ | ||
data class PatchPeerAppealRequest( | ||
val content: kotlin.String? = null, | ||
val processStatus: kotlin.Int? = null, | ||
val processContent: kotlin.String? = null | ||
) | ||
|
40 changes: 40 additions & 0 deletions
40
src/main/kotlin/cn/edu/buaa/scs/controller/models/PeerAppealResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* cloudapi_v2 | ||
* buaa scs cloud api v2 | ||
* | ||
* The version of the OpenAPI document: 2.0 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
package cn.edu.buaa.scs.controller.models | ||
|
||
import cn.edu.buaa.scs.controller.models.SimpleUser | ||
|
||
/** | ||
* | ||
* @param id | ||
* @param expId | ||
* @param studentId | ||
* @param content | ||
* @param appealedAt | ||
* @param processStatus 0: 未处理 1: 批准 2: 驳回 | ||
* @param processor | ||
* @param processContent | ||
* @param processedAt | ||
*/ | ||
data class PeerAppealResponse( | ||
val id: kotlin.Int, | ||
val expId: kotlin.Int, | ||
val studentId: kotlin.String, | ||
val content: kotlin.String, | ||
val appealedAt: kotlin.Long, | ||
/* 0: 未处理 1: 批准 2: 驳回 */ | ||
val processStatus: kotlin.Int, | ||
val processor: SimpleUser? = null, | ||
val processContent: kotlin.String? = null, | ||
val processedAt: kotlin.Long? = null | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package cn.edu.buaa.scs.model | ||
|
||
import org.ktorm.database.Database | ||
import org.ktorm.entity.Entity | ||
import org.ktorm.entity.sequenceOf | ||
import org.ktorm.schema.* | ||
|
||
interface PeerAppeal : Entity<PeerAppeal>, IEntity { | ||
companion object : Entity.Factory<PeerAppeal>() | ||
|
||
var id: Int | ||
var expId: Int | ||
var studentId: String | ||
var content: String | ||
var appealedAt: Long | ||
var processorId: String? | ||
var processorName: String? | ||
var processContent: String? | ||
var processStatus: Int | ||
var processedAt: Long? | ||
} | ||
|
||
object PeerAppeals : Table<PeerAppeal>("peer_appeal") { | ||
val id = int("id").primaryKey().bindTo { it.id } | ||
val expId = int("exp_id").bindTo { it.expId } | ||
val studentId = varchar("student_id").bindTo { it.studentId } | ||
val content = text("content").bindTo { it.content } | ||
val appealedAt = long("appealed_at").bindTo { it.appealedAt } | ||
val processorId = varchar("processor_id").bindTo { it.processorId } | ||
val processorName = varchar("processor_name").bindTo { it.processorName } | ||
val processContent = text("process_content").bindTo { it.processContent } | ||
val processStatus = int("process_status").bindTo { it.processStatus } | ||
val processAt = long("processed_at").bindTo { it.processedAt } | ||
} | ||
|
||
val Database.peerAppeals | ||
get() = this.sequenceOf(PeerAppeals) |
Oops, something went wrong.