Skip to content

Commit

Permalink
Merge branch 'develop' into feature/general_queries_3
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulApivat authored Sep 29, 2021
2 parents 25f1f99 + f4ce3be commit b418c6f
Show file tree
Hide file tree
Showing 2 changed files with 199 additions and 0 deletions.
93 changes: 93 additions & 0 deletions mongo/bounties/bboard_final2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[
{
"_id": "60f6585b453e70eed340e8e3",
"season": 1,
"title": "Make new website landing page",
"description": "Description for new website landing page with specs",
"criteria": "A completed bounty has the following deliverables...",
"reward": {
"currency": "BANK",
"amount": 10000,
"precision": 2
},
"applicableGuilds": [
"Research Guild",
"Legal Guild",
"Design Guild",
"AV Guild",
"Translator's Guild",
"Marketing Guild",
"Writer's Guild",
"Education Guild",
"Developer's Guild",
"Analytics Guild",
"Ops Guild",
"BizDev",
"Treasury Guild",
"Local Ambassadors"
],
"createdBy": {
"isDaoMember": true,
"guildName": "Analytics Guild",
"discordHandle": "paul#8888",
"discordId": "324439902343239764"
},
"createdAt": "2021-07-20T06:40:56.112Z",
"dueAt": "2021-07-20T06:42:28.853Z",
"activatedAt": "2021-07-20T06:44:33.858Z",
"claimedBy": [
{
"isDaoMember": false,
"guildName": null,
"discordHandle": "rick#5555",
"discordId": "324423432343239764"
}
],
"claimedAt": "2021-07-20T07:00:31.166Z",
"completedAt": "2021-07-20T07:00:31.166Z",
"submissionUrl": "https://example.org/rels/v1/bounty_submission",
"submissionNotes": "it took me a long time to work on this bounty",
"status": "Draft",
"statusHistory": [
{
"status": "Open",
"modifiedAt": "2021-07-20T07:00:31.166Z"
},
{
"status": "Draft",
"modifiedAt": "2021-07-20T07:00:31.166Z"
},
{
"status": "In-Progress",
"modifiedAt": "2021-07-20T07:00:31.166Z"
},
{
"status": "In-Review",
"modifiedAt": "2021-07-20T07:00:31.166Z"
},
{
"status": "Completed",
"modifiedAt": "2021-07-20T07:00:31.166Z"
},
{
"status": "Deleted",
"modifiedAt": "2021-07-20T07:00:31.166Z"
}
],
"hash": "96efcf14fe28a4f17a07a5441b00285b12cbb208bf3c1bdbb030bb95d3e31a8b",
"skillsRequired": [
"writing",
"design",
"frontend software development",
"backend software development",
"strategic planning",
"data analysis",
"grant writing",
"proposal development",
"team building",
"consensus building",
"marketing",
"sales"
]
}
]
106 changes: 106 additions & 0 deletions mongo/bounties/validation_final2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
db.createCollection("bounties", {
validator: {
$jsonSchema: {
bsonType: "object",
required: [
"season",
"title",
"description",
"criteria",
"reward",
"applicableGuilds",
"createdBy",
"createdAt",
"dueAt",
"status",
"statusHistory",
],
properties: {
season: {
bsonType: "int",
description:
"the current season of the DAO, nonzero integer, /^[0,9]+$/",
},
title: {
bsonType: "string",
description:
"a short title about the bounty, /^[\\w\\s.!@#$%&,?']{1,50}$/",
},
description: {
bsonType: "string",
description:
"a short description of the bounty, /^[\\w\\s.!@#$%&,?']{1,250}$/",
},
criteria: {
bsonType: "string",
description:
"absolutely required work for bounty to be Completed, /^[\\w\\s.!@#$%&,?']{1,250}$/",
},
status: {
bsonType: "string",
description: "the current status of the bounty",
},
statusHistory: {
bsonType: "array",
description: "the history of the status of the bounty",
},
reward: {
bsonType: "object",
description:
"how much to be distributed to worker once bounty is Completed",
required: ["currency", "amount", "scale"],
properties: {
currency: {
bsonType: "string",
description: "the currency denomination i.e ETH",
},
amount: {
bsonType: "int",
description: "the amount to be rewarded i.e 1000",
},
scale: {
bsonType: "int",
description: "the decimal value for the given amount",
},
},
},
applicableGuilds: {
bsonType: ["array"],
minItems: 0, // users have the option of tagging a guild, but are not required to
uniqueItems: true,
additionalProperties: false,
items: {
bsonType: ["string"],
additionalProperties: false,
description:
"users have the option of tagging a guild, but are not required to",
},
},
createdBy: {
bsonType: "object",
description: "user object who created the bounty",
required: ["discordHandle", "discordId"],
properties: {
discordHandle: {
bsonType: "string",
description: "the discord tag i.e hydrabolt#0001",
},
discordId: {
bsonType: "string",
description: "the discord internal id, i.e 324439906234239764",
},
},
},
createdAt: {
bsonType: "string",
description: "ISO8601 date string for when the bounty was created",
},
dueAt: {
bsonType: "string",
description:
"ISO8601 date string for when the bounty is due (default to end of season)",
},
},
},
},
});

0 comments on commit b418c6f

Please sign in to comment.