# 数据库初始化

# Mongodb - FS 数据库初始化

use mongo_cslc_fs

# 创建APP

db.getCollection('fs_apps').insert({
    "_id" : ObjectId("5ed5b7e56b2f0700013aa15f"),
    "_class" : "apps",
    "appSecret" : "2WPE36Kbwrr0pqzrz4n1KXUx9feZLgdc",
    "appName" : "电子合同模块",
    "createDate" : ISODate("2020-10-22T00:00:00.0Z"),
    "enabled" : true
});

appSecret 可替换成自定义的密钥

参数解释:

  • _id 应用appKey
  • appSecret 密钥
  • appName 应用名称
  • createDate 创建时间
  • lastUpdateDate 更新时间
  • enabled 是否启用 true启用,false禁用

# 初始化图片压缩模板

db.getCollection('fs_img_compress_template').insertMany([
{
    "_id" : ObjectId("5f68a1e3da8ec03c72ad138a"),
    "_class" : "ImgCompressTemplate",
    "name" : "econtract_compress_template",
    "title" : "电子合同压缩模板(勿动)",
    "type" : "RATIO",
    "quality" : 0.5,
    "scale" : 0.5,
    "note" : "电子合同压缩模板(勿动)",
    "createDate" : ISODate("2020-09-21T01:48:16.234Z")
},
{
    "_id" : ObjectId("5f8ffabf03ec6b5690e6c952"),
    "_class" : "ImgCompressTemplate",
    "name" : "hs-owner-sign",
    "title" : "电子合同手写板签署压缩模板(勿动)",
    "type" : "RATIOFIXED",
    "quality" : 0.7,
    "note" : "电子合同压缩模板(勿动)",
    "createDate" : ISODate("2020-10-21T01:48:16.234Z"),
    "width" : 300
},
{
    "_id" : ObjectId("5f8ffb8e03ec6b5690e6c95f"),
    "_class" : "ImgCompressTemplate",
    "name" : "owner-idcard",
    "title" : "电子合同身份证图片压缩模板(勿动)",
    "type" : "RATIO",
    "quality" : 0.7,
    "scale" : 0.5,
    "note" : "电子合同身份证图片压缩模板(勿动)",
    "createDate" : ISODate("2020-10-21T01:48:16.234Z")
},
{
    "_id" : ObjectId("5f8ffc1903ec6b5690e6c962"),
    "_class" : "ImgCompressTemplate",
    "name" : "owner-photo",
    "title" : "电子合同人像照片压缩模板(勿动)",
    "type" : "RATIO",
    "quality" : 0.7,
    "scale" : 0.5,
    "note" : "电子合同人像照片压缩模板(勿动)",
    "createDate" : ISODate("2020-10-21T01:48:16.234Z")
}
]);
最后更新于: 11/4/2020, 10:14:18 PM