nextdeveloper/agreement

NextDeveloper 生成器包

v0.1.0 2024-07-29 22:54 UTC

This package is auto-updated.

Last update: 2024-10-01 00:20:49 UTC


README

此模块是 NextDeveloper 项目的组成部分。它提供了一种创建和管理店主与客户之间协议的方式。

要求

安装

您可以通过 Composer 安装此包

composer require nextdeveloper/agreement

数据库表

该包包含以下表

  • agreement_templates
  • agreement_contracts
  • agreement_webhooks

用法

存储协议模板

您可以使用以下示例存储协议模板

curl -X POST \
  http://example.com/agreement/templates \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {token}' \
  -d '{
    "name": "Terms and Conditions",
    "description": "Terms and Conditions",
    "reference": "2ab1eefc-c585-4b80-9d85-ba9e5a1a45af"  // This is the reference of the template in the external system
}'

存储协议合同

您可以使用以下示例存储协议合同

curl -X POST \
  http://example.com/agreement/contracts \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {token}' \
  -d '{
    "name": "Terms and Conditions",
    "description": "Terms and Conditions",
    "object_type": "NextDeveloper\\Partnerships\\Database\\Models\\Partnership",
    "object_id": 1,
    "template_reference": "2ab1eefc-c585-4b80-9d85-ba9e5a1a45af"
}'

存储 Webhooks

您可以使用以下示例存储 webhooks

curl -X POST \
  http://example.com/agreement/webhooks \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "source": "inspakt",
    "data": "{\"event\": \"agreement_created\", \"agreement_id\": 1}"
}'

商业支持

如果您需要任何商业支持,请告诉我们。我们目前没有这样的商业计划,但我们将很乐意帮助您在项目中,以及/或在此项目中应用此库

想贡献吗?

当然欢迎您贡献。请发送电子邮件给我们,以便我们联系并讨论细节;codewithus@nextdeveloper.com