/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.2-dev * User agent: apibuilder app.apibuilder.io/mard/mard2p-api/0.0.2-dev/flow_erm_schema */ package payp.mard2p.api.v0.erm import io.flow.event.relation.mapper.schema.ErmSpec import io.apibuilder.spec.v0.models.{Enum, EnumValue, Field, Model, Union, UnionType} import payp.mard2p.api.v0.models.Account import payp.mard2p.api.v0.models.AccountForm import payp.mard2p.api.v0.models.Deposit import payp.mard2p.api.v0.models.Payment import payp.mard2p.api.v0.models.PaymentForm import payp.mard2p.api.v0.models.Transfer import payp.mard2p.api.v0.models.TransferForm import payp.mard2p.api.v0.models.Validation import payp.mard2p.api.v0.models.Withdraw object GeneratedErmSchema { implicit lazy val ermSpecAccount: ErmSpec[Account] = ErmSpec.model( qualifiedName = "payp.mard2p.api.v0.models.account", spec = Model(name = "account", plural = "accounts", fields = Seq( Field(name = "accountid", `type` = "long", required = true), Field(name = "ownerid", `type` = "string", required = true), Field(name = "total_amount", `type` = "double", required = true), Field(name = "currency", `type` = "string", required = true), Field(name = "sold", `type` = "double", required = true), Field(name = "debit", `type` = "double", required = true), )), ) implicit lazy val ermSpecAccountForm: ErmSpec[AccountForm] = ErmSpec.model( qualifiedName = "payp.mard2p.api.v0.models.account_form", spec = Model(name = "account_form", plural = "account_forms", fields = Seq( Field(name = "accountid", `type` = "long", required = true), Field(name = "ownerid", `type` = "string", required = true), Field(name = "total_amount", `type` = "double", required = false), Field(name = "sold", `type` = "double", required = true), Field(name = "debit", `type` = "double", required = false), Field(name = "currency", `type` = "string", required = true), )), ) implicit lazy val ermSpecDeposit: ErmSpec[Deposit] = ErmSpec.model( qualifiedName = "payp.mard2p.api.v0.models.deposit", spec = Model(name = "deposit", plural = "deposits", fields = Seq( Field(name = "depid", `type` = "long", required = true), Field(name = "paymentid", `type` = "long", required = true), )), ) implicit lazy val ermSpecPayment: ErmSpec[Payment] = ErmSpec.model( qualifiedName = "payp.mard2p.api.v0.models.payment", spec = Model(name = "payment", plural = "payments", fields = Seq( Field(name = "payid", `type` = "long", required = true), Field(name = "actorid", `type` = "string", required = true), Field(name = "amount", `type` = "double", required = true), Field(name = "ref_accountid", `type` = "long", required = true), Field(name = "payment_method", `type` = "string", required = true), Field(name = "operatorid", `type` = "string", required = true), Field(name = "phone", `type` = "long", required = true), Field(name = "pin", `type` = "integer", required = true), Field(name = "currency", `type` = "string", required = true), Field(name = "payment_context", `type` = "string", required = true), )), ) implicit lazy val ermSpecPaymentForm: ErmSpec[PaymentForm] = ErmSpec.model( qualifiedName = "payp.mard2p.api.v0.models.payment_form", spec = Model(name = "payment_form", plural = "payment_forms", fields = Seq( Field(name = "payid", `type` = "long", required = true), Field(name = "actorid", `type` = "string", required = true), Field(name = "amount", `type` = "double", required = true), Field(name = "ref_accountid", `type` = "long", required = true), Field(name = "payment_method", `type` = "string", required = true), Field(name = "operatorid", `type` = "string", required = true), Field(name = "phone", `type` = "long", required = true), Field(name = "pin", `type` = "integer", required = true), Field(name = "currency", `type` = "string", required = true), Field(name = "payment_context", `type` = "string", required = true), )), ) implicit lazy val ermSpecTransfer: ErmSpec[Transfer] = ErmSpec.model( qualifiedName = "payp.mard2p.api.v0.models.transfer", spec = Model(name = "transfer", plural = "transfers", fields = Seq( Field(name = "transferid", `type` = "long", required = true), Field(name = "senderid", `type` = "string", required = true), Field(name = "amount", `type` = "double", required = true), Field(name = "ref_accountid_receiver", `type` = "long", required = true), Field(name = "ref_accountid_sender", `type` = "long", required = true), Field(name = "currency", `type` = "string", required = true), )), ) implicit lazy val ermSpecTransferForm: ErmSpec[TransferForm] = ErmSpec.model( qualifiedName = "payp.mard2p.api.v0.models.transfer_form", spec = Model(name = "transfer_form", plural = "transfer_forms", fields = Seq( Field(name = "transferid", `type` = "long", required = true), Field(name = "senderid", `type` = "string", required = true), Field(name = "amount", `type` = "double", required = true), Field(name = "ref_accountid_receiver", `type` = "long", required = true), Field(name = "ref_accountid_sender", `type` = "long", required = true), Field(name = "currency", `type` = "string", required = true), )), ) implicit lazy val ermSpecValidation: ErmSpec[Validation] = ErmSpec.model( qualifiedName = "payp.mard2p.api.v0.models.validation", spec = Model(name = "validation", plural = "validations", fields = Seq( Field(name = "valid", `type` = "boolean", required = true), Field(name = "errors", `type` = "[string]", required = true), )), ) implicit lazy val ermSpecWithdraw: ErmSpec[Withdraw] = ErmSpec.model( qualifiedName = "payp.mard2p.api.v0.models.withdraw", spec = Model(name = "withdraw", plural = "withdraws", fields = Seq( Field(name = "wdwid", `type` = "long", required = true), Field(name = "paymentid", `type` = "long", required = true), )), ) val all: Seq[ErmSpec[_]] = Seq( ermSpecAccount, ermSpecAccountForm, ermSpecDeposit, ermSpecPayment, ermSpecPaymentForm, ermSpecTransfer, ermSpecTransferForm, ermSpecValidation, ermSpecWithdraw, ) }