实体对象
示例
定义
实体对象用于为GoooQo中的CRUD语句构建提供表名和列名。
实体对象需要实现以下接口:
GetId
用于构建UPDATE
语句。SetId
用于将生成的ID注入到实体。GetTableName
用于提供实体对应的表名。实体中的每个字段需要与表中的一列相对应。
GoooQo提供了两个Entity
的实现以简化实体定义:IntId
和Int64Id
。
示例中UserEntity
对应的增删查改语句为:
Last updated
实体对象用于为GoooQo中的CRUD语句构建提供表名和列名。
实体对象需要实现以下接口:
GetId
用于构建UPDATE
语句。
SetId
用于将生成的ID注入到实体。
GetTableName
用于提供实体对应的表名。
实体中的每个字段需要与表中的一列相对应。
GoooQo提供了两个Entity
的实现以简化实体定义:IntId
和Int64Id
。
示例中UserEntity
对应的增删查改语句为:
Last updated