It took me about half a month to develope XICI’s own lottery featrue. Administrator can configure and publish lottery event in the back-end now, and the event will be drawed automatically.
Database and all the logic are built upon Minapp Cloud which is a BaaS platform I mentioned before. This time I used trigger to build cron task and used cloud function to implement automatically drawing. That features are new to me this time but there are not so difficult to solve with the documentations.