车型数据库设计 mongodb

直接上代码了

const mongoose = require('mongoose');
const Schema = mongoose.Schema;// 汽车索引列表
const CarListSchema = new mongoose.Schema({// 首字母 A、B、C...initial: String,// 汽车品牌分类category: [{// 首字母initial: String,// 拼音pinyin: Array,// 汽车大品牌的名称name: String,logo: String,// 具体子品牌brand: [{// 子品牌名称name: String,car: [{ name: String, img: String, batch_at: Array }]}]}]
})const CarList = mongoose.model('CarList', CarListSchema)
// export
module.exports = CarList;

在数据库中插入字母分类索引

db.carlists.insert({"initial":"A"});
db.carlists.insert({"initial":"B"});
db.carlists.insert({"initial":"C"});
db.carlists.insert({"initial":"D"});
db.carlists.insert({"initial":"E"});
db.carlists.insert({"initial":"F"});
db.carlists.insert({"initial":"G"});
db.carlists.insert({"initial":"H"});
db.carlists.insert({"initial":"I"});
db.carlists.insert({"initial":"J"});
db.carlists.insert({"initial":"K"});
db.carlists.insert({"initial":"L"});
db.carlists.insert({"initial":"M"});
db.carlists.insert({"initial":"N"});
db.carlists.insert({"initial":"O"});
db.carlists.insert({"initial":"P"});
db.carlists.insert({"initial":"Q"});
db.carlists.insert({"initial":"R"});
db.carlists.insert({"initial":"S"});
db.carlists.insert({"initial":"T"});
db.carlists.insert({"initial":"U"});
db.carlists.insert({"initial":"V"});
db.carlists.insert({"initial":"W"});
db.carlists.insert({"initial":"X"});
db.carlists.insert({"initial":"Y"});
db.carlists.insert({"initial":"Z"});

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/415805.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

洛谷 P3102 [USACO14FEB]秘密代码Secret Code

P3102 [USACO14FEB]秘密代码Secret Code 题目描述 Farmer John has secret message that he wants to hide from his cows; the message is a string of length at least 2 containing only the characters A..Z. To encrypt his message, FJ applies a sequence of "oper…

iview tag 标签点击事件

iview的tag组件有一个地方比较奇怪&#xff0c;就是默认只有on-close事件。 当我们想点击关闭和激活tag组件的时候&#xff0c;我们只能自己进行维护。 需要只用click.native进行控制 <Tag color"red" :checkable"true" :checked"false" clic…

android 获取url中的参数,验证邮箱格式,截取字符串中键值对的值,String的字节长度,去空格,替换字符

String ss"hello"; byte[] buffss.getBytes(); int fbuff.length; System.out.println(f); 字节长度。一个中文是3。其他是1 1、获取url中的参数 创建string String urls "http://www.yxtribe.com/yuanxinbuluo/weixin/getJsp?urlwechatweb/business-style-f…

oracle数据导入与导出

数据的导入导出 说明&#xff1a; 针对的对象&#xff1a; 数据的导入导出牵涉到的角色主要是工程实施人员。 需解决的问题&#xff1a;把所需要的数据从一个数据库中导入到另外一个数据库中。 1 工具方式 1.1 工具说明 1. 使用PLSQL Developer工具主要为了…

ubuntu中使用apt-get安装zbar

apt-get是linux中常用的shell命令&#xff0c;适用于deb包管理式的操作系统&#xff0c;主要用于自动从互联网的软件仓库中搜索、安装、升级、卸载软件或操作系统。apt-get命令一般需要root权限执行&#xff0c;所以前边一般跟着sudo命令。 Zbar是一个开源的二维码&#xff08;…

微信红包 开发前的准备

今天的开发目标是实现微信红包功能。先记录需要进行微信红包开发前的准备工作。 1、进行微信支付&#xff1a;需要注册认证的服务号或者认证的企业号 2、若要进行红包开发&#xff0c;前置准备条件 入住时间超过90天&#xff1b;连续交易正常交易时间30天&#xff1b; 3、微…

QC安装与运行中的问题汇集

服务器localhost127.0.0.1一、QC安装成功&#xff0c;但服务无法启动QC在安装过程中最容易出问题的就是SQL和jbossSQL ,JBOSS, QC三个启动都是独立的。托盘qc启动成功并不表示成功启动jboss,不加qcbin试试看&#xff0c;能确认jboss是否启动成功。如果JBOSS启动失败往往有以下几…

android 屏幕横竖屏切换时生命周期运行详解,创建横屏layout,has no declaration in the base

横屏代码 1、配置文件设置 android:screenOrientation"landscape" 2、java代码设置 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);//hp 竖屏代码 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);//sp activit…

CodeForces 580A Kefa and First Steps

Time limit 2000 ms Memory limit 262144 kB Kefa decided to make some money doing business on the Internet for exactly n days. He knows that on the i-th day (1 ≤ i ≤ n) he makes ai money. Kefa loves progress, thats why he wants to know the length of…

微信支付 商户Key 支付Key API密钥 的获取

读了微信支付的开发文档&#xff0c;感觉是不同阶段&#xff0c;不同的同学写的&#xff0c;有些专业名词比较混乱&#xff0c;甚至还会有错别字&#xff0c;以及接口更新了&#xff0c;而文档不更新的情况。 使用微信支付&#xff0c;必须要用到 api密钥进行签名 其中 &…

oracle 10g 报错:ORA-00257: archiver error. Connect internal only, until freed

今天在公司&#xff0c;突然同事告诉我数据库无法登录了&#xff0c;想想这段时间没有动过库&#xff0c;为什么无法登录呢&#xff1f;一边想是什么问题&#xff0c;一边连接测试登录。 首先报错&#xff1a;ORA-00257: archiver error. Connect internal only, until freed.…

android 获取键盘回车键事件,设置软键盘回车键显示内容,点击空白处隐藏软键盘

首先设置EditText的回车属性 drawable文件 drawable/editcolor <?xml version"1.0" encoding"utf-8"?> <shape xmlns:android"http://schemas.android.com/apk/res/android" android:shape"rectangle"><size andro…

微信支付 签名算法 sign node实现

开发微信支付过程中&#xff0c;第一道门槛就是微信支付接口签名&#xff0c;只要按照官方文档写&#xff0c;就不会有什么错。 1、官方签名文档地址 https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter4_3 2、我的实现 // 获取微信签名 getSign: (para…

触发器定义

create trigger atf on dbo.a after insertasbegin truncate table aend转载于:https://www.cnblogs.com/huanglong1987/p/7587570.html

android RecyclerView EditText 取消自动聚焦

在manifest中的activity中配置 android:windowSoftInputMode"adjustPan"

使用WINPE在硬盘安装WIN7系统

使用WINPE在硬盘安装WIN7系统 看到此标题&#xff0c;可能好多朋友会说&#xff0c;安装个WIN7操作系统&#xff0c;使用安装盘直接安装就是了&#xff0c;有必要做个文章介绍吗&#xff1f;的确&#xff0c;安装操作系统&#xff0c;最方便最简单的方法&#xff0c;就是使用系…