Взгляните на SampleCashSchemaV3.kt
, здесь: https://github.com/corda/corda/blob/release-V3/finance/src/test/kotlin/net/corda/finance/schemas/SampleCashSchemaV3.kt.
В этой схеме список участников сохраняется как MutableSet<AbstractParty>?
:
object SampleCashSchemaV3 : MappedSchema(schemaFamily = CashSchema.javaClass, version = 3,
mappedTypes = listOf(PersistentCashState::class.java)) {
@Entity
@Table(name = "cash_states_v3")
class PersistentCashState(
/** [ContractState] attributes */
/** X500Name of participant parties **/
@ElementCollection
var participants: MutableSet<AbstractParty>? = null,
/** X500Name of owner party **/
@Column(name = "owner_name")
var owner: AbstractParty,
@Column(name = "pennies")
var pennies: Long,
@Column(name = "ccy_code", length = 3)
var currency: String,
/** X500Name of issuer party **/
@Column(name = "issuer_name")
var issuer: AbstractParty,
@Column(name = "issuer_ref", length = MAX_ISSUER_REF_SIZE)
@Type(type = "corda-wrapper-binary")
var issuerRef: ByteArray
) : PersistentState()
}