训练营课程资料包(一)表结构

1 xx_users (用户表)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
hyxx会员信息arrayone-many
openidopenidstringfalse
ddxx订单信息arrayone-many
pjxx评价信息arrayone-many
avtarURL头像stringx-imagefalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
phone手机号stringphonefalse
updateBy修改人stringfather-sonfalsetruetrue
_openid记录创建者string仅微信云开发下使用falsetrue
czjl充值记录arrayone-many
nickname昵称stringx-primary-columnfalse
dzxx地址信息arrayone-many
_id数据标识stringtruetrue
status状态stringx-enumfalse
updatedAt更新时间numberdatetimefalsetrue

2 xx_members(会员表)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
hykjjl会员扣减记录arrayone-many
level会员等级stringx-enumfalse
member_no会员编码stringx-autonumberx-primary-columnfalse
userId用户标识objectmany-onefalse
points会员积分numberfalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
balance会员余额numberfalse
updateBy修改人stringfather-sonfalsetruetrue
_openid记录创建者string仅微信云开发下使用falsetrue
czjl充值记录arrayone-many
_id数据标识stringtruetrue
status会员状态stringx-enumfalse
updatedAt更新时间numberdatetimefalsetrue

3 recharge_records(充值记录表)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
member_id会员标识objectmany-onefalse
recharge_amount充值金额numberfalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
recharge_time充值时间numberdatetimefalse
updateBy修改人stringfather-sonfalsetruetrue
user_id用户标识objectmany-onefalse
_openid记录创建者string仅微信云开发下使用falsetrue
_id数据标识stringx-primary-columntruetrue
payment_method支付方式stringx-enumfalse
updatedAt更新时间numberdatetimefalsetrue

4 广告表(advertisements)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
updateBy修改人stringfather-sonfalsetruetrue
_openid记录创建者string仅微信云开发下使用falsetrue
cover_image封面图片stringx-imagefalse
_id数据标识stringx-primary-columntruetrue
title广告标题stringfalse
content广告内容stringx-rtffalse
status广告状态stringx-enumfalse
updatedAt更新时间numberdatetimefalsetrue

5 服务分类(xx_service_categories)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
description分类描述stringfalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
updateBy修改人stringfather-sonfalsetruetrue
fwxm服务项目arrayone-many
_openid记录创建者string仅微信云开发下使用falsetrue
name分类名称stringx-primary-columnfalse
iconUrl分类图标stringx-imagefalse
_id数据标识stringtruetrue
order排序值numberfalse
status分类状态stringx-enumfalse
updatedAt更新时间numberdatetimefalsetrue

6 服务项目(xx_services)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
cover_image封面图片stringx-imagefalse
description服务简介stringx-textareafalse
categroyId服务分类objectmany-onefalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
min_price最低价格numberfalse
updateBy修改人stringfather-sonfalsetruetrue
service_details服务详情stringx-rtffalse
_openid记录创建者string仅微信云开发下使用falsetrue
name服务名称stringx-primary-columnfalse
status服务状态stringx-enumfalse
order排序值numberfalse
updatedAt更新时间numberdatetimefalsetrue

7 我的收藏(favorites)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
updateBy修改人stringfather-sonfalsetruetrue
_openid记录创建者string仅微信云开发下使用falsetrue
_id数据标识stringx-primary-columntruetrue
userId用户标识objectmany-onefalse
serviceId服务项目标识objectmany-onefalse
updatedAt更新时间numberdatetimefalsetrue

8 服务规格(service_spec)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
unit计价单位stringfalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
price价格numberfalse
updateBy修改人stringfather-sonfalsetruetrue
_openid记录创建者string仅微信云开发下使用falsetrue
_id数据标识stringx-primary-columntruetrue
name规格名称stringfalse
serviceId服务项目标识objectmany-onefalse
status状态stringx-enumfalse
updatedAt更新时间numberdatetimefalsetrue

9 订单表(orders)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
_mainDep所属主管部门stringfather-sonfalsetruetrue
serviceDateTime服务时间numberdatetimefalse
remarks备注stringx-textareafalse
address服务地址stringx-addressfalse
serviceId服务项目标识objectmany-onefalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
totalAmount订单金额numberfalse
owner所有人stringfather-sonfalsetruetrue
contactName联系人姓名stringfalse
updateBy修改人stringfather-sonfalsetruetrue
serviceSpecId服务规格标识objectmany-onefalse
userId用户标识objectmany-onefalse
_openid记录创建者string仅微信云开发下使用falsetrue
orderNo订单编号stringx-autonumberx-primary-columnfalse
serviceQuantity服务数量numberfalse
_id数据标识stringtruetrue
contactPhone联系人手机号stringphonefalse
status订单状态stringx-enumfalse

10 地址表(address_info)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
detail_address详细地址stringx-textareafalse
userId用户标识objectmany-onefalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
updateBy修改人stringfather-sonfalsetruetrue
_openid记录创建者string仅微信云开发下使用falsetrue
contact_name联系人姓名stringfalse
is_default是否默认地址booleanfalse
contact_phone联系人手机号stringphonefalse
_id数据标识stringx-primary-columntruetrue
region所在地区stringx-area-codefalse
updatedAt更新时间numberdatetimefalsetrue

11 会员余额扣减记录表(balance_deduction_record)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
deduction_time扣减时间numberdatetimefalse
memberId会员标识objectmany-onefalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
deduction_amount扣减金额numberfalse
updateBy修改人stringfather-sonfalsetruetrue
_openid记录创建者string仅微信云开发下使用falsetrue
deduction_reason扣减原因stringx-textareafalse
_id数据标识stringx-primary-columntruetrue
updatedAt更新时间numberdatetimefalsetrue

12 工人表(worker)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
_mainDep所属主管部门stringfather-sonfalsetruetrue
self_introduction自我介绍stringfalse
total_services_completed已完成服务次数numberfalse
pjxx评价信息arrayone-many
createdAt创建时间numberdatetimefalsetrue
shyj审核意见stringfalse
updateBy修改人stringfather-sonfalsetruetrue
avg_rating工人平均评分numberfalse
shsj审核时间numberdatetimefalse
ddpg订单派工arrayone-many
work_experience工作经验stringx-enumfalse
updatedAt更新时间numberdatetimefalsetrue
owner所有人stringfather-sonfalsetruetrue
id_number身份证号stringfalse
address地址stringfalse
sex性别stringx-enumfalse
ddxx订单信息arrayone-many
service_type服务类别arrayx-enumfalse
createBy创建人stringfather-sonfalsetruetrue
certificates持有证书arrayfalse
phone手机号stringphonefalse
_openid记录创建者string仅微信云开发下使用falsetrue
name姓名stringx-primary-columnfalse
total_reviews工人总评价数numberfalse
_id数据标识stringtruetrue
shr审核人objectmany-onefalse
work_stauts工作状态stringx-enumfalse
status状态stringx-enumfalse

13 订单状态日志子表(order_status_logs)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
orderId订单标识objectmany-onefalse
action_description操作描述stringx-textareafalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
operator操作人stringfalse
original_status原始状态stringx-enumfalse
updateBy修改人stringfather-sonfalsetruetrue
_openid记录创建者string仅微信云开发下使用falsetrue
new_status新状态stringx-enumfalse
_id数据标识stringx-primary-columntruetrue
operator_role操作人角色stringx-enumfalse
timestamp发生时间numberdatetimefalse
updatedAt更新时间numberdatetimefalsetrue

14 评价表(Reviews)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
tags评价标签arrayx-enumfalse
review_time评价时间numberdatetimefalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
updateBy修改人stringfather-sonfalsetruetrue
_openid记录创建者string仅微信云开发下使用falsetrue
review_type评价类型stringx-enumfalse
_id数据标识stringx-primary-columntruetrue
serviceId服务项目标识objectmany-onefalse
rating评分numberfalse
images图片arrayx-imagefalse
userId用户标识objectmany-onefalse
workerId工人标识objectmany-onefalse
content评价内容stringx-textareafalse
sp视频stringx-videofalse
updatedAt更新时间numberdatetimefalsetrue

15 点赞记录表(like_record)

Column NameTitleTypeFormatDescriptionPrimary KeyUniqueSystem FieldHidden
owner所有人stringfather-sonfalsetruetrue
_mainDep所属主管部门stringfather-sonfalsetruetrue
userId用户标识objectmany-onefalse
createdAt创建时间numberdatetimefalsetrue
createBy创建人stringfather-sonfalsetruetrue
updateBy修改人stringfather-sonfalsetruetrue
_openid记录创建者string仅微信云开发下使用falsetrue
_id数据标识stringx-primary-columntruetrue
worker_id工人数据标识objectmany-onefalse
updatedAt更新时间numberdatetimefalsetrue

实体 (Entities) 及其主要属性

  • 用户表 (xx_users)
    • 主要字段:_id (数据标识, Primary Key), nickname (昵称), phone (手机号), status (状态)
  • 会员表 (xx_members)
    • 主要字段:_id (数据标识, Primary Key), member_no (会员编号), userId (用户标识), current_balance (当前余额), member_level (会员等级), status (会员状态)
  • 广告表 (advertisements)
    • 主要字段:_id (数据标识, Primary Key), title (广告标题), type (广告类型), content (广告内容), status (广告状态)
  • 服务分类 (xx_service_categories)
    • 主要字段:_id (数据标识, Primary Key), name (分类名称), order (排序值), status (分类状态)
  • 服务项目 (xx_services)
    • 主要字段:_id (数据标识, Primary Key), name (服务名称), categoryId (分类标识), price (价格), status (服务状态), order (排序值)
  • 我的收藏 (favorites)
    • 主要字段:_id (数据标识, Primary Key), userId (用户标识), serviceId (服务项目标识)
  • 服务规格 (service_spec)
    • 主要字段:_id (数据标识, Primary Key), serviceId (服务项目标识), name (规格名称), price (规格价格), status (状态)
  • 订单表 (orders)
    • 主要字段:_id (数据标识, Primary Key), orderNo (订单号), userId (用户标识), serviceId (服务项目标识), addressId (地址标识), workerId (工人标识), serviceDateTime (服务时间), totalAmount (订单总金额), status (订单状态)
  • 地址表 (address_info)
    • 主要字段:_id (数据标识, Primary Key), userId (用户标识), detail_address (详细地址), contact_name (联系人姓名), contact_phone (联系人手机号), is_default (是否默认地址), region (所在地区)
  • 会员余额扣减记录表 (balance_deduction_record)
    • 主要字段:_id (数据标识, Primary Key), memberId (会员标识), deduction_time (扣减时间), deduction_amount (扣减金额), deduction_reason (扣减原因)
  • 工人表 (worker)
    • 主要字段:_id (数据标识, Primary Key), name (姓名), phone (手机号), id_number (身份证号), sex (性别), address (地址), service_type (服务类别), work_experience (工作经验), certificates (持有证书), self_introduction (自我介绍), total_services_completed (已完成服务次数), avg_rating (工人平均评分), total_reviews (工人总评价数), status (状态), work_stauts (工作状态), shr (审核人, 可能关联用户表)
  • 订单状态日志子表 (order_status_logs)
    • 主要字段:_id (数据标识, Primary Key), orderId (订单标识), timestamp (发生时间), original_status (原始状态), new_status (新状态), operator (操作人), operator_role (操作人角色), action_description (操作描述)
  • 评价表 (Reviews)
    • 主要字段:_id (数据标识, Primary Key), userId (用户标识), serviceId (服务项目标识), workerId (工人标识), rating (评分), content (评价内容), tags (评价标签), review_time (评价时间), review_type (评价类型), images (图片), sp (视频)
  • 点赞记录表 (like_record)
    • 主要字段:_id (数据标识, Primary Key), userId (用户标识), worker_id (工人数据标识)
  • 充值记录表 (recharge_records)
    • 主要字段:_id (数据标识, Primary Key), memberId (会员标识), recharge_amount (充值金额), recharge_time (充值时间), payment_method (支付方式)

关系 (Relationships) 描述

以下列出了各个实体之间的主要关系:

  • 用户与会员
    • xx_users (用户表) 和 xx_members (会员表) 之间存在 一对多 关系。xx_members 表中的 userId 字段引用 xx_users 表的 _id 字段。通常一个用户对应一个会员。
  • 用户与地址
    • xx_users (用户表) 和 address_info (地址表) 之间存在 一对多 关系。一个用户可以有多个地址,address_info 表中的 userId 字段引用 xx_users 表的 _id 字段。
  • 用户与收藏
    • xx_users (用户表) 和 favorites (我的收藏表) 之间存在 一对多 关系。一个用户可以收藏多个服务,favorites 表中的 userId 字段引用 xx_users 表的 _id 字段。
  • 用户与点赞记录
    • xx_users (用户表) 和 like_record (点赞记录表) 之间存在 一对多 关系。一个用户可以点赞多个工人,like_record 表中的 userId 字段引用 xx_users 表的 _id 字段。
  • 用户与评价
    • xx_users (用户表) 和 Reviews (评价表) 之间存在 一对多 关系。一个用户可以发布多个评价,Reviews 表中的 userId 字段引用 xx_users 表的 _id 字段。
  • 会员与余额扣减记录
    • xx_members (会员表) 和 balance_deduction_record (会员余额扣减记录表) 之间存在 一对多 关系。一个会员可以有多条扣减记录,balance_deduction_record 表中的 memberId 字段引用 xx_members 表的 _id 字段。
  • 会员与充值记录
    • xx_members (会员表) 和 recharge_records (充值记录表) 之间存在 一对多 关系。一个会员可以有多条充值记录,recharge_records 表中的 memberId 字段引用 xx_members 表的 _id 字段。
  • 服务分类与服务项目
    • xx_service_categories (服务分类表) 和 xx_services (服务项目表) 之间存在 一对多 关系。一个服务分类可以包含多个服务项目,xx_services 表中的 categoryId 字段引用 xx_service_categories 表的 _id 字段。
  • 服务项目与服务规格
    • xx_services (服务项目表) 和 service_spec (服务规格表) 之间存在 一对多 关系。一个服务项目可以有多个规格,service_spec 表中的 serviceId 字段引用 xx_services 表的 _id 字段。
  • 服务项目与收藏
    • xx_services (服务项目表) 和 favorites (我的收藏表) 之间存在 一对多 关系。一个服务项目可以被多个用户收藏,favorites 表中的 serviceId 字段引用 xx_services 表的 _id 字段。
  • 服务项目与评价
    • xx_services (服务项目表) 和 Reviews (评价表) 之间存在 一对多 关系。一个服务项目可以有多条评价,Reviews 表中的 serviceId 字段引用 xx_services 表的 _id 字段。
  • 订单与用户、服务、地址、工人
    • orders (订单表) 与 xx_users (用户表) 之间存在 多对一 关系(一个订单属于一个用户)。orders 表中的 userId 字段引用 xx_users 表的 _id 字段。
    • orders (订单表) 与 xx_services (服务项目表) 之间存在 多对一 关系(一个订单对应一个服务项目)。orders 表中的 serviceId 字段引用 xx_services 表的 _id 字段。
    • orders (订单表) 与 address_info (地址表) 之间存在 多对一 关系(一个订单使用一个地址)。orders 表中的 addressId 字段引用 address_info 表的 _id 字段。
    • orders (订单表) 与 worker (工人表) 之间存在 多对一 关系(一个订单指派给一个工人)。orders 表中的 workerId 字段引用 worker 表的 _id 字段。
  • 订单与订单状态日志
    • orders (订单表) 和 order_status_logs (订单状态日志子表) 之间存在 一对多 关系。一个订单可以有多条状态变更日志,order_status_logs 表中的 orderId 字段引用 orders 表的 _id 字段。
  • 工人与评价
    • worker (工人表) 和 Reviews (评价表) 之间存在 一对多 关系。一个工人可以有多条评价,Reviews 表中的 workerId 字段引用 worker 表的 _id 字段。
  • 工人与点赞记录
    • worker (工人表) 和 like_record (点赞记录表) 之间存在 一对多 关系。一个工人可以被多个用户点赞,like_record 表中的 worker_id 字段引用 worker 表的 _id 字段。

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

低代码布道师

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值