-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请求大佬增加 mysql ddl 生成库 #80
Labels
Comments
生成的json文件,拿这些json文件再转为sql语句,目前缺ddl这一步,用php实现的,理想状态是我在web的网页上直接生成sql,但现在还需要借助php 多一步 {"order_id":{"type":"bigint(20) Unsigned","desc":"订单id","enum":"","remark":""},"tracking_id":{"type":"bigint(20) Unsigned","desc":"运单id","enum":"","remark":""},"partner_order_code":{"type":"varchar(64)","desc":"外部订单号","enum":"","remark":""},"serial_number":{"type":"varchar(64)","desc":"商家订单流水号","enum":"","remark":""},"order_status":{"type":"tinyint(6) Unsigned","desc":"订单状态","enum":"0:订单生成,1:运单生成成功,20:骑手接单, 80:骑手到店,2:配送中,3:已完成, 4:已取消,5:配送异常","remark":""},"carrier_driver_id":{"type":"varchar(64)","desc":"配送员ID","enum":"","remark":""},"carrier_driver_name":{"type":"varchar(32)","desc":"配送员姓名","enum":"","remark":""},"carrier_driver_phone":{"type":"varchar(20)","desc":"配送员电话","enum":"","remark":""},"estimate_arrive_time":{"type":"bigint(13) Unsigned","desc":"预计送达时间(毫秒)","enum":"","remark":""},"overtime_compensation_cost_cent":{"type":"int(10 )Unsigned","desc":"时效赔付","enum":"","remark":""},"if_can_add_tip":{"type":"int(10) Unsigned","desc":"调度费支持","enum":"0:不可以,1:可以","remark":"是否支持添加调度费 1可以,0不可以"},"order_tip_amount_cent":{"type":"int(10) Unsigned","desc":"订单当前小费总金额 分","enum":"","remark":""},"delivery_fetch_photos":{"type":"json","desc":"骑手取货照片地址","enum":"","remark":""},"order_total_amount_cent":{"type":"int(10) Unsigned","desc":"原始配送费金额无需关注","enum":"","remark":"原始配送费金额(优惠 前的纯配送费,不含 小费等) 该字段无需关注分"},"order_actual_amount _cent":{"type":"int(10) Unsigned","desc":"订单实际配送支付总 金额","enum":"","remark":"订单实际配送支付总 金额(优惠后 含小费等 一般关注这个字段即可)分"},"price_detail":{"type":"json","desc":"配送费价格明细","enum":"","remark":"PriceOpenapiDetail 详情见上文预下单文档"},"abnormal_code":{"type":"varchar(20)","desc":"运单异常原因code","enum":"","remark":""},"abnormal_desc":{"type":"varchar(255)","desc":"运单异常原因描述","enum":"","remark":""},"event_log_details":{"type":"json","desc":"运单事件节点信息","enum":"","remark":"示例: [ { <strong>"order_status"</strong>:<strong>1</strong>, <strong>"occur_time"</strong>:<strong>1469088084269</strong>, <strong>"carrier_driver_name"</strong>:<strong>"张三"</strong>, <strong>"carrier_driver_phone"</strong>:<strong>"13112345678"</strong> }, { <strong>"order_status"</strong>:<strong>3</strong>, <strong>"occur_time"</strong>:<strong>1469088084269</strong>, <strong>"carrier_driver_name"</strong>:<strong>""</strong>, <strong>"carrier_driver_phone"</strong>:<strong>""</strong> }]"},"complaint_id":{"type":"bigint(20)","desc":"投诉编号","enum":"","remark":""},"complaint_reason_desc":{"type":"varchar(255)","desc":"投诉原因描述","enum":"","remark":""},"complaint_status":{"type":"tinyint(6)","desc":"投诉状态","enum":"1:待处理, 2:成功,3:失败","remark":"投诉状态 1待处理, 2成功,3失败"},"claim_id":{"type":"bigint(20)","desc":"索赔id","enum":"","remark":""},"claim_reason_desc":{"type":"varchar(255)","desc":"索赔原因描述","enum":"","remark":""},"claim_status":{"type":"tinyint(6) Unsigned","desc":"索赔状态","enum":"1:待处理, 2:成功,3:失败","remark":"索赔状态"},"temperature":{"type":"varchar(20)","desc":"骑手体温","enum":"","remark":"示例:骑手体温36.5℃"},"order_distance":{"type":"decimal(10,2)","desc":"配送距离","enum":"","remark":"单位:m"}} |
我先看下哈 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
目前npm 搜索ddl 没找到相关的库
社区有 ddl 2 json的 但是没有 链式操作 生成ddl的库
我目前的需求是根据markdown 生成 msyql的语句建表,因为这样写好文档就相当于写好了mysql
markdown 根据 table 解析为json 已经解决
ddl生成目前采用的 https://github.com/easy-swoole/ddl
不过我觉得生成代码这种工作 放在前端比较好 所以希望社区增加该类型的库
这是我现在用php生成的文件
1.markdown table语法 转为json
2.根据json循环生成 sql文件
3.复制sql内容到Navicat
The text was updated successfully, but these errors were encountered: