generate dao code