All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tairitsu.ignotus.foundation.model.JsonApiBody.kt Maven / Gradle / Ivy

There is a newer version: 1.0.32
Show newest version
package com.tairitsu.ignotus.foundation.model

import com.tairitsu.ignotus.validation.annotation.Required

/**
 * 一个 Json Api 格式的对象
 */
class JsonApiObject {
    var type: String? = null

    var id: String? = null

    @Required
    var attributes: T? = null
}

/**
 * 一个由单个 Json Api 对象组成的请求体
 */
class JsonApiObjectBody {
    @Required
    lateinit var data: JsonApiObject
}

/**
 * 一个由多个 Json Api 对象组成的请求体
 */
class JsonApiListBody {
    @Required
    lateinit var data: List>
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy