当前位置: 首页 > news >正文

术语俗话 --- dto、vo、Entity是什么

术语俗话 --- dto、vo、Entity是什么

image

 dto、vo、Entity这三个概念是用户创建mvc项目是自定义的对象,作用用不同,dto是接收前端发来的对象,vo是返回给前端的对象,entity是给数据库收发的对象。

这是java里的概念但是python中叫做

 

Java 概念本架构中的对应物载体
Entity Model (GoodsDemo) ORM 类
DTO (输出) Schema (GoodsDemoOutSchema) Marshmallow 类
VO (视图) Jinja2 直接消费 Model 对象 模板变量