/* Options: Date: 2024-12-22 21:57:03 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //Package: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateCoupon.* //ExcludeTypes: //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,java.io.InputStream,net.servicestack.client.* */ import java.math.* import java.util.* import java.io.InputStream import net.servicestack.client.* @Route(Path="/coupons", Verbs="POST") @ValidateRequest(Validator="HasRole(`Employee`)") open class CreateCoupon : IReturn, ICreateDb { @Validate(Validator="NotEmpty") open var description:String? = null @Validate(Validator="GreaterThan(0)") open var discount:Int? = null @Required() open var expiryDate:Date? = null companion object { private val responseType = IdResponse::class.java } override fun getResponseType(): Any? = CreateCoupon.responseType } @DataContract open class IdResponse { @DataMember(Order=1) open var id:String? = null @DataMember(Order=2) open var responseStatus:ResponseStatus? = null } /** * Discount Coupons */ open class Coupon { open var id:String? = null open var description:String? = null open var discount:Int? = null open var expiryDate:Date? = null }