feat(templates): create schemas for users, labels, projects, sprints, issues, comments
This commit is contained in:
parent
be4ceeae97
commit
150c39c3f9
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"name": "pocketbase-lite",
|
||||
"version": "0.1.0",
|
||||
"paths": {
|
||||
"data": "collections/",
|
||||
"media": "media/",
|
||||
"indexes": ".gitapp/indexes/"
|
||||
},
|
||||
"schemas": [
|
||||
{
|
||||
"id": "users",
|
||||
"file": "schemas/users.json",
|
||||
"glob": "collections/users/*.json"
|
||||
},
|
||||
{
|
||||
"id": "labels",
|
||||
"file": "schemas/labels.json",
|
||||
"glob": "collections/labels/*.json"
|
||||
},
|
||||
{
|
||||
"id": "projects",
|
||||
"file": "schemas/projects.json",
|
||||
"glob": "collections/projects/*.json"
|
||||
},
|
||||
{
|
||||
"id": "sprints",
|
||||
"file": "schemas/sprints.json",
|
||||
"glob": "collections/sprints/*.json"
|
||||
},
|
||||
{
|
||||
"id": "issues",
|
||||
"file": "schemas/issues.json",
|
||||
"glob": "collections/issues/*.json"
|
||||
},
|
||||
{
|
||||
"id": "comments",
|
||||
"file": "schemas/comments.json",
|
||||
"glob": "collections/comments/*.json"
|
||||
}
|
||||
],
|
||||
"operations": [],
|
||||
"policies": {
|
||||
"roles": [
|
||||
"viewer",
|
||||
"editor"
|
||||
],
|
||||
"acl": null
|
||||
},
|
||||
"lfs": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"$id": "comments",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"issue": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "issues",
|
||||
"type": "single"
|
||||
}
|
||||
},
|
||||
"author": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "users",
|
||||
"type": "single"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
{
|
||||
"$id": "issues",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"title",
|
||||
"type",
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"bug",
|
||||
"feature",
|
||||
"task",
|
||||
"story",
|
||||
"epic"
|
||||
]
|
||||
},
|
||||
"priority": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"low",
|
||||
"medium",
|
||||
"high",
|
||||
"critical"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"backlog",
|
||||
"todo",
|
||||
"in_progress",
|
||||
"review",
|
||||
"done"
|
||||
]
|
||||
},
|
||||
"estimate": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"dueDate": {
|
||||
"type": "string",
|
||||
"format": "date"
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "projects",
|
||||
"type": "single"
|
||||
}
|
||||
},
|
||||
"assignee": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "users",
|
||||
"type": "single"
|
||||
}
|
||||
},
|
||||
"reporter": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "users",
|
||||
"type": "single"
|
||||
}
|
||||
},
|
||||
"labels": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-relation": {
|
||||
"collection": "labels",
|
||||
"type": "multiple",
|
||||
"maxItems": 5
|
||||
}
|
||||
},
|
||||
"sprint": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "sprints",
|
||||
"type": "single"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"$id": "labels",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"color"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"color": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"$id": "projects",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"key"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 5
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"color": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"on-hold",
|
||||
"completed",
|
||||
"archived"
|
||||
]
|
||||
},
|
||||
"lead": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "users",
|
||||
"type": "single"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"$id": "sprints",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"startDate",
|
||||
"endDate"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"startDate": {
|
||||
"type": "string",
|
||||
"format": "date"
|
||||
},
|
||||
"endDate": {
|
||||
"type": "string",
|
||||
"format": "date"
|
||||
},
|
||||
"goal": {
|
||||
"type": "string"
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"x-relation": {
|
||||
"collection": "projects",
|
||||
"type": "single"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"$id": "users",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"email"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"format": "email"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"admin",
|
||||
"developer",
|
||||
"designer",
|
||||
"qa",
|
||||
"pm"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue