Last active
March 30, 2020 08:42
-
-
Save ibnuh/4d3cba7ef349823673300c1aea72cecb to your computer and use it in GitHub Desktop.
Sample data script
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
[ | |
{ | |
'repeat(5, 10)': { | |
id: '{{guid()}}', | |
name: '{{firstName()}} {{surname()}}', | |
position: '{{random("Doctor", "Nurse")}}', | |
registered: 'Mon - {{moment(this.date(new Date(2014, 0, 1), new Date())).format("ddd")}} {{random(1,12)}}:00 {{random("am", "pm")}} - {{random(1,12)}}:00 {{random("am", "pm")}}', | |
} | |
} | |
] |
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
[ | |
'{{repeat(30)}}', | |
{ | |
id: '{{guid()}}', | |
name: '{{firstName()}} {{random("Clinic", "Hospital")}}', | |
address: '{{integer(100, 999)}} {{street()}}, {{city()}}, {{state()}}, {{integer(100, 10000)}}', | |
openingHours: function(tags){ | |
return tags.random("24 hours", `${tags.random(1, 12)}:00 ${tags.random("am", "pm")} - ${tags.random(1,12)}:00 ${tags.random("am", "pm")}`) | |
}, | |
type: '{{random("Cardiac", "Physiotherapy", "Sickness")}}' | |
} | |
] |
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
// json-generator.com | |
[ | |
'{{repeat(5, 7)}}', | |
{ | |
id: '{{guid()}}', | |
nric: '{{objectId().slice(-10)}}', | |
name: '{{firstName()}} {{surname()}}', | |
queueNo: '{{integer(20, 40)}}', | |
dateCreated: '{{date(new Date(2014, 0, 1), new Date(), "YYYY-MM-dd hh:mm:ss")}}', | |
isWaiting: '{{bool()}}' | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment