Last active
August 8, 2018 14:11
-
-
Save 738/1fd899e3f5834dbf237afd543aae1d08 to your computer and use it in GitHub Desktop.
CryptoDolbom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
import "./User.sol"; | |
contract BabySitter is User { | |
bool isMale; // 성별 | |
uint16 birthOfDate; // 생년월일 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
import "./Dolbom.sol"; | |
import "./BabySitter.sol"; | |
contract BabySitterDolbom is Dolbom { | |
BabySitter babySitter; // 글쓴이 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
import "./User.sol"; | |
import "./Dolbom.sol"; | |
import "./Review.sol"; | |
// Main Contract | |
contract CryptoDolbomManager { | |
mapping (uint256 => User) userIndexToUser; | |
mapping (uint256 => Dolbom) dolbomIndexToDolbom; | |
mapping (uint256 => Review) reviewIndexToReview; | |
mapping (uint256 => Review[]) dolbomIndexToReviews; | |
public function signup(uint256 userid) { | |
// 회원가입 | |
} | |
public function verify(uint256 userid) { | |
// 인증 | |
} | |
public function checkVerified(uint256 userid) { | |
// 인증 확인 | |
} | |
public function writeDolbom(uint256 userid, Dolbom dolbom) { | |
// 게시글 작성 | |
} | |
public function writeReview(uint256 userid, uint dolbomId, Review review) { | |
// 리뷰 작성 | |
} | |
public function depositDeposit(uint256 userid, uint amount) { | |
// 보증금 맡기기 | |
} | |
public function requestDeal(uint256 userid, uint dolbomId) { | |
// 돌봄 요청 | |
} | |
public function approveDeal(uint256 userid, uint dolbomId) { | |
// 돌봄 승인 | |
} | |
public function checkDealApproved(uint256 userid, uint dolbomId) { | |
// 돌봄 승인 확인 | |
} | |
public function makeDeal(uint256 parentid, uint256 babysitterid) { | |
// 돌봄 매칭이 이어짐 | |
} | |
public function concludeDeal(uint256 parentid, uint256 babysitterid) { | |
// 돌봄 행위가 끝나고나서 보상이 주어짐 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
contract Dolbom { | |
uint id; | |
string title; // 제목 | |
string geocode; // 지역 | |
string content; // 내용 | |
uint reward; // 보상 | |
uint start; // 시작 시간 | |
uint end; // 종료 시간 | |
Review[] reviews; // 리뷰들 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
import "./User.sol"; | |
contract Parent is User { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
import "./Dolbom.sol"; | |
import "./Parent.sol"; | |
contract ParentDolbom is Dolbom { | |
Parent parent; // 글쓴이 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
import "./User.sol"; | |
contract Review { | |
uint id; // 리뷰 id | |
uint dolbomId; // 게시글 id | |
User writer; // 글쓴이 | |
string content; // 내용 | |
uint8 score; // 평가점수 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
contract User { | |
uint id; | |
string name; // 이름 | |
string phoneNumber; // 전화번호 | |
string email; // 이메일 | |
uint geocode; // 지역 | |
uint8 score; // 평판 | |
string aboutme; // 자기소개 | |
address userAddress; // 주소 | |
uint deposit; // 보증금양 | |
// 유저에서 돌보미와 보호자를 나누지 않는 경우, 역할 속성을 추가 | |
Role role; // PARENT | BABYSITTER | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment