feat(templates): create schemas for cuisines, tags, users, recipes, ingredients

This commit is contained in:
GitApp 2025-12-19 15:50:32 +00:00
parent e82e39165d
commit d69b4a063b
14 changed files with 208 additions and 0 deletions

0
.gitapp/.gitkeep Normal file
View File

47
.gitapp/manifest.json Normal file
View File

@ -0,0 +1,47 @@
{
"name": "pocketbase-lite",
"version": "0.1.0",
"paths": {
"data": "collections/",
"media": "media/",
"indexes": ".gitapp/indexes/"
},
"schemas": [
{
"id": "cuisines",
"file": "schemas/cuisines.json",
"glob": "collections/cuisines/*.json"
},
{
"id": "tags",
"file": "schemas/tags.json",
"glob": "collections/tags/*.json"
},
{
"id": "users",
"file": "schemas/users.json",
"glob": "collections/users/*.json"
},
{
"id": "recipes",
"file": "schemas/recipes.json",
"glob": "collections/recipes/*.json"
},
{
"id": "ingredients",
"file": "schemas/ingredients.json",
"glob": "collections/ingredients/*.json"
}
],
"operations": [],
"policies": {
"roles": [
"viewer",
"editor"
],
"acl": null
},
"lfs": {
"enabled": false
}
}

View File

0
.gitapp/schemas/.gitkeep Normal file
View File

View File

@ -0,0 +1,24 @@
{
"$id": "cuisines",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"name",
"region"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"region": {
"type": "string"
},
"description": {
"type": "string"
},
"flag": {
"type": "string"
}
}
}

View File

@ -0,0 +1,31 @@
{
"$id": "ingredients",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"name",
"quantity"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"quantity": {
"type": "string"
},
"unit": {
"type": "string"
},
"notes": {
"type": "string"
},
"recipe": {
"type": "string",
"x-relation": {
"collection": "recipes",
"type": "single"
}
}
}
}

View File

@ -0,0 +1,69 @@
{
"$id": "recipes",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"title",
"description"
],
"properties": {
"title": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"prepTime": {
"type": "integer",
"minimum": 0
},
"cookTime": {
"type": "integer",
"minimum": 0
},
"servings": {
"type": "integer",
"minimum": 1
},
"image": {
"type": "string"
},
"instructions": {
"type": "string"
},
"difficulty": {
"type": "string",
"enum": [
"easy",
"medium",
"hard"
]
},
"author": {
"type": "string",
"x-relation": {
"collection": "users",
"type": "single"
}
},
"cuisine": {
"type": "string",
"x-relation": {
"collection": "cuisines",
"type": "single"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"x-relation": {
"collection": "tags",
"type": "multiple",
"maxItems": 10
}
}
}
}

17
.gitapp/schemas/tags.json Normal file
View File

@ -0,0 +1,17 @@
{
"$id": "tags",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"color": {
"type": "string"
}
}
}

View File

@ -0,0 +1,20 @@
{
"$id": "users",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"bio": {
"type": "string"
},
"avatar": {
"type": "string"
}
}
}

View File

View File

View File

View File

View File