-
Notifications
You must be signed in to change notification settings - Fork 0
/
Resume.sol
49 lines (41 loc) · 1.05 KB
/
Resume.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
contract Resume {
struct resume {
uint256 timestamp;
string _workExp;
string _eduExp;
string _contact;
}
mapping(string => resume[]) resumeMap;
function store(
string memory _key,
string memory _workExp,
string memory _eduExp,
string memory _contact
) public {
resumeMap[_key].push(
resume(block.timestamp, _workExp, _eduExp, _contact)
);
}
function length(string memory _key) public view returns (uint256) {
return resumeMap[_key].length;
}
function retrieve(string memory _key, uint256 index)
public
view
returns (
uint256,
string memory,
string memory,
string memory
)
{
return (
resumeMap[_key][index].timestamp,
resumeMap[_key][index]._workExp,
resumeMap[_key][index]._eduExp,
resumeMap[_key][index]._contact
);
}
}