Skip to content

Commit 79d131a

Browse files
committed
1 parent 3bce1e2 commit 79d131a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Person Database.sol

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
pragma solidity 0.5.1;
2+
contract Person_Data_BlockChain_Base {
3+
uint256 public peopleCount = 0;
4+
mapping(uint => Person) public people;
5+
6+
struct Person {
7+
uint id;
8+
string firstname;
9+
string lastname;
10+
}
11+
function addPerson(string memory firstname, string memory lastname) public {
12+
peopleCount += 1;
13+
people[peopleCount] = Person(peopleCount, firstname, lastname);
14+
}
15+
}

0 commit comments

Comments
 (0)