Professional Documents
Culture Documents
namespace org.kapy.payments
enum OwnerEntity {
o FarmerAgent
o NurseryAdmin
o InspectionOfficer
o TreasuryAdmin
}
o String FarmerAgentId
}
participant NurseryAdmin identified by nurseryId {
o String nurseryId
o String InspectionOfficerId
--> LandRecord landrecord
}
o String TreasuryId
o String eid
o String LnRecId
o Integer NoSeedReq
o DateTime SubmittedDate
o String BankDetails
o Boolean isFarmerRecApproved
o Integer inspectionCompletedForYear
o Integer NoSeedSurvForYear
o Integer AmountProcessed
o Integer SeedlingPrice
o OwnerEntity ownerEntity
o String nurseryRecordsId
o String status
o OwnerEntity ownerEntity
o String GoKRecordsId
o Integer inspectionCompletedForYear
o Integer NoSeedSurvForYear
o OwnerEntity ownerEntity
}
o String TreasuryRecordsId
o Integer SeedlingPrice
o OwnerEntity ownerEntity
transaction Verification {
transaction Monitoring {
transaction Disbursement {
---Logic.js:-
/**
*
* @param {org.kapy.payments.Verification} UpdateNurseryRecords
* @transaction
*/
function Verification(UpdateNurseryRecords) {
/**
*
* @param {org.kapy.payments.Monitoring} UpdateGokRecords
* @transaction
*/
function Monitoring(UpdateGokRecords) {
//get asset registry for land records, and update on the ledger
return getAssetRegistry('org.kapy.payments.LandRecord')
.then(function (assetRegistry) {
return assetRegistry.update(UpdateGokRecords.landrecord);
})
}
/**
*
* @param {org.kapy.payments.Disbursement} UpdateTreasuryRecords
* @transaction
*/
function Disbursement(UpdateTreasuryRecords) {
Permission.acl:-
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
rule NetworkAdminUser {
description: "Grant business network administrators full access to user resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "**"
action: ALLOW
}
rule NetworkAdminSystem {
description: "Grant business network administrators full access to system resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}