Skip to content

Instantly share code, notes, and snippets.

@tiarebalbi
Created October 7, 2023 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiarebalbi/781419fb9a1f0c1ed6ac0313bf5d0cd0 to your computer and use it in GitHub Desktop.
Save tiarebalbi/781419fb9a1f0c1ed6ac0313bf5d0cd0 to your computer and use it in GitHub Desktop.
{
"schema": "1",
"solution": {
"name": "Real Estate Platform",
"description": "Default schema used for testing",
"status": "IN_DEVELOPMENT",
"domain": "real-estate.com",
"repository": {
"id": "real-estate-service",
"organization": "general-services",
"description": "GitHub repository for real estate platform.",
"license": "MIT",
"credentials": {
"type": "SSH"
}
},
"applications": [
{
"id": "catalog-service",
"name": "Catalog",
"description": "Management application for handling inquiries related to our catalog",
"domain": "catalog.real-estate.com",
"db": {
"connectionId": "default-postgres",
"type": "POSTGRES"
},
"cache": {
"connectionId": "default-redis",
"type": "REDIS"
},
"audit": {
"connectionId": "default-prometheus",
"type": "PROMETHEUS"
},
"dto": [
{
"id": "ActionSummary",
"description": "DTO used in additional service",
"attributes": [
{
"name": "itemId",
"definition": {
"type": "native.String"
}
},
{
"name": "processingTime",
"definition": {
"type": "native.DateTime",
"defaultValue": "now()"
}
}
]
}
],
"entities": [
{
"id": "CatalogItem",
"description": "Represents an item of the catalog",
"schema": "public",
"table": "catalog",
"rollbackStrategy": {
"deleteTable": false,
"truncate": false
},
"audit": {
"creation": true,
"modification": true,
"deletion": false,
"historical": false
},
"service": {
"insertable": true,
"updatable": true,
"deletable": false,
"disable": true,
"cache": {
"attribute": "id",
"ttl": "30m"
},
"generateDto": true
},
"attributes": [
{
"name": "application_id",
"type": "bigint",
"constraints": {
"primary": true,
"nullable": false
}
},
{
"name": "name",
"type": "varchar(255)",
"validation": {
"required": true
},
"constraints": {
"nullable": false,
"indexed": true
}
},
{
"name": "description",
"type": "text",
"defaultValue": "",
"constraints": {
"nullable": true
}
},
{
"name": "price",
"type": "currency",
"defaultValue": "0.00",
"validation": {
"required": true,
"min": 0
},
"constraints": {
"nullable": false
}
},
{
"name": "code",
"type": "varchar(12)",
"validation": {
"required": true
},
"constraints": {
"nullable": false,
"sensitive": true,
"hashCode": false
}
},
{
"name": "inventory",
"type": "entities.Inventory",
"cardinality": "ONE-TO-ONE"
}
]
}
],
"services": [
{
"id": "CatalogAdditionalService",
"description": "Represents a group of actions to manage the company's catalog.",
"inject": [
{
"name": "catalogItemService",
"type": "services.CatalogItemService"
}
],
"methods": [
{
"functionName": "reviewItem",
"input": [
{
"name": "itemId",
"type": "entities.CatalogItem.id"
}
],
"output": "dto.ActionSummary",
"block": {
"base64": "kk12o1i2o12=",
"hash": "21291289128"
}
}
]
}
],
"controllers": [
{
"id": "CatalogItemV1Controller",
"type": "REST",
"baseUrl": "/v1/catalog",
"inject": [
{
"name": "catalogItemService",
"type": "services.CatalogService"
}
],
"audit": false,
"methods": [
{
"name": "create",
"type": "POST",
"rule": [
"catalog-create"
],
"input": [
{
"name": "payload",
"type": "dto.CreateCatalogItem"
}
],
"output": "entity.CatalogItem",
"block": {
"base64": "kk12o1i2o12=",
"hash": "21291289128"
}
}
]
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment