Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claim ¶
type Claim struct {
ContractUUID string `json:"contract_uuid"`
Date time.Time `json:"date"`
Description string `json:"description"`
IsTheft bool `json:"is_theft"`
Status ClaimStatus `json:"status"`
Reimbursable float32 `json:"reimbursable"`
Repaired bool `json:"repaired"`
FileReference string `json:"file_reference"`
}
Key consists of prefix + UUID of the contract + UUID of the claim
type ClaimStatus ¶
type ClaimStatus int8
The claim status indicates how the claim should be treated
const ( // The claims status is unknown ClaimStatusUnknown ClaimStatus = iota // The claim is new ClaimStatusNew // The claim has been rejected (either by the insurer, or by authorities ClaimStatusRejected // The item is up for repairs, or has been repaired ClaimStatusRepair // The customer should be reimbursed, or has already been ClaimStatusReimbursement // The theft of the item has been confirmed by authorities ClaimStatusTheftConfirmed )
func (ClaimStatus) MarshalJSON ¶
func (s ClaimStatus) MarshalJSON() ([]byte, error)
func (*ClaimStatus) UnmarshalJSON ¶
func (s *ClaimStatus) UnmarshalJSON(b []byte) error
type Contract ¶
type Contract struct {
Username string `json:"username"`
Item Item `json:"item"`
StartDate time.Time `json:"start_date"`
EndDate time.Time `json:"end_date"`
Void bool `json:"void"`
ContractTypeUUID string `json:"contract_type_uuid"`
ClaimIndex []string `json:"claim_index,omitempty"`
}
Key consists of prefix + username + UUID of the contract
type ContractType ¶
type ContractType struct {
ShopType string `json:"shop_type"`
FormulaPerDay string `json:"formula_per_day"`
MaxSumInsured float32 `json:"max_sum_insured"`
TheftInsured bool `json:"theft_insured"`
Description string `json:"description"`
Conditions string `json:"conditions"`
Active bool `json:"active"`
MinDurationDays int32 `json:"min_duration_days"`
MaxDurationDays int32 `json:"max_duration_days"`
}
Key consists of prefix + UUID of the contract type
type Item ¶
type Item struct {
ID int32 `json:"id"`
Brand string `json:"brand"`
Model string `json:"model"`
Price float32 `json:"price"`
Description string `json:"description"`
SerialNo string `json:"serial_no"`
}
Entity not persisted on its own
type RepairOrder ¶
type RepairOrder struct {
ClaimUUID string `json:"claim_uuid"`
ContractUUID string `json:"contract_uuid"`
Item Item `json:"item"`
Ready bool `json:"ready"`
}
Key consists of prefix + UUID fo the repair order
type SmartContract ¶
type SmartContract struct {
}
func (*SmartContract) Init ¶
func (t *SmartContract) Init(stub shim.ChaincodeStubInterface) pb.Response
Init callback representing the invocation of a chaincode
func (*SmartContract) Invoke ¶
func (t *SmartContract) Invoke(stub shim.ChaincodeStubInterface) pb.Response
Invoke Function accept blockchain code invocations.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.