From 407e83114073158cafd3d552183f62868f4b6d02 Mon Sep 17 00:00:00 2001 From: blushi Date: Mon, 9 Sep 2024 13:31:42 +0200 Subject: [PATCH] feat: add sellOrderPrice to project doc --- schemas/documents/shared/project.js | 10 ++++++++++ schemas/objects/sellOrderPrice.js | 20 ++++++++++++++++++++ schemas/schema.js | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 schemas/objects/sellOrderPrice.js diff --git a/schemas/documents/shared/project.js b/schemas/documents/shared/project.js index 5a172ab..90b0474 100644 --- a/schemas/documents/shared/project.js +++ b/schemas/documents/shared/project.js @@ -25,6 +25,16 @@ export default { }, ], }, + { + title: 'Sell orders available for fiat purchases', + name: 'fiatSellOrders', + type: 'array', + of: [ + { + type: 'sellOrderPrice', + }, + ], + }, { title: 'Project name', name: 'projectName', diff --git a/schemas/objects/sellOrderPrice.js b/schemas/objects/sellOrderPrice.js new file mode 100644 index 0000000..d792321 --- /dev/null +++ b/schemas/objects/sellOrderPrice.js @@ -0,0 +1,20 @@ +export default { + title: 'Sell Order Price', + name: 'sellOrderPrice', + type: 'object', + fields: [ + { + title: 'Sell order id', + name: 'sellOrderId', + type: 'string', + validation: Rule => Rule.required(), + }, + { + title: 'Sell order price', + description: 'price per credit in USD', + name: 'usdPrice', + type: 'number', + validation: Rule => Rule.required(), + }, + ], +}; diff --git a/schemas/schema.js b/schemas/schema.js index 83d7f93..205161d 100644 --- a/schemas/schema.js +++ b/schemas/schema.js @@ -267,6 +267,7 @@ import classPrefinanceTimelineItem from './objects/classPrefinanceTimelineItem'; import prefinanceTimelineItem from './objects/prefinanceTimelineItem'; import prefinanceProjects from './objects/prefinanceProjects'; import createProjectPagePopup from './objects/createProjectPagePopup'; +import sellOrderPrice from './objects/sellOrderPrice'; export const objectSchemas = [ heroSection, @@ -404,6 +405,7 @@ export const objectSchemas = [ prefinanceTimelineItem, prefinanceProjects, createProjectPagePopup, + sellOrderPrice, ]; export default [