github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-supply-chain-master/protos/record.proto (about)

     1  // Copyright 2017 Intel Corporation
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  // -----------------------------------------------------------------------------
    15  
    16  syntax = "proto3";
    17  
    18  import "property.proto";
    19  
    20  
    21  message Record {
    22    message AssociatedAgent {
    23      string agent_id = 1;
    24      uint64 timestamp = 2;
    25    }
    26  
    27    // The user-defined natural key which identifies the object in the
    28    // real world (for example a serial number)
    29    string record_id = 1;
    30  
    31    string record_type = 2;
    32  
    33    // Ordered oldest to newest by timestamp
    34    repeated AssociatedAgent owners = 3;
    35    repeated AssociatedAgent custodians = 4;
    36  
    37    // Flag indicating whether the Record can be updated. If it is set
    38    // to true, then the record has been finalized and no further
    39    // changes can be made to it or its Properties.
    40    bool final = 5;
    41  }
    42  
    43  
    44  message RecordContainer {
    45    repeated Record entries = 1;
    46  }
    47  
    48  
    49  message RecordType {
    50    // A unique human-readable designation for the RecordType
    51    string name = 1;
    52  
    53    repeated PropertySchema properties = 2;
    54  }
    55  
    56  
    57  message RecordTypeContainer {
    58    repeated RecordType entries = 1;
    59  }