"AnonymousModel" "Application Model" 中带有推送组件和 Postgre 的嵌入式模型

"AnonymousModel" Embedded Models in "Application Model" with Push Component and Postgre

如何使用具有 APNS 设置和 Postgre 的应用程序模型。

应用程序模型具有嵌入式模型。 我是对的,在传统数据库中,嵌入式模型只是简单地保存为对象? pushsettings 的 String 字段有一个 varchar(1024)。

推送示例执行此操作:

pushSettings: {
 apns: {
   certData: config.push.apnsCertData,
   keyData: config.push.apnsKeyData,
   feedbackOptions: {
     batchFeedback: true,
     interval: 300
   }
 },
 gcm: {
    serverApiKey: config.push.gcmServerApiKey
      }
 }
}

certData 和 keyData 超过 1024 个字符。

那么如何正确使用 Postgres 呢?

现在我唯一看到的是扩展应用程序模型并将 pushSettings 字段设置为更大的值,但我也无法完成这项工作。

请帮帮我

此致

我设法让它像我最初想的那样工作。 扩展应用模型json:

{
"name": "application",
"base": "Application",
"properties": {

"pushSettings": {
  "postgresql": {
    "dataType": "text",
    "dataLength": null,
    "nullable": "YES"
  },
  "apns": {
    "production": {
      "type": "boolean",
      "description": [
        "Production or development mode. It denotes what default APNS",
        "servers to be used to send notifications.",
        "See API documentation for more details."
      ]
    },

    "certData": {
      "type": "string",
      "description": "The certificate data loaded from the cert.pem file"
    },
    "keyData": {
      "type": "string",
      "description": "The key data loaded from the key.pem file"
    },

    "pushOptions": {
      "type": {
        "gateway": "string",
        "port": "number"
      }
    },

    "feedbackOptions": {
      "type": {
        "gateway": "string",
        "port": "number",
        "batchFeedback": "boolean",
        "interval": "number"
      }
    }
  },
  "gcm": {
    "serverApiKey": "string"
  }
}