feat(templates): create schemas for genres, people, movies, cast, reviews

This commit is contained in:
GitApp 2025-12-19 15:50:26 +00:00
parent 121894f125
commit 5517a5a554
14 changed files with 219 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": "genres",
"file": "schemas/genres.json",
"glob": "collections/genres/*.json"
},
{
"id": "people",
"file": "schemas/people.json",
"glob": "collections/people/*.json"
},
{
"id": "movies",
"file": "schemas/movies.json",
"glob": "collections/movies/*.json"
},
{
"id": "cast",
"file": "schemas/cast.json",
"glob": "collections/cast/*.json"
},
{
"id": "reviews",
"file": "schemas/reviews.json",
"glob": "collections/reviews/*.json"
}
],
"operations": [],
"policies": {
"roles": [
"viewer",
"editor"
],
"acl": null
},
"lfs": {
"enabled": false
}
}

View File

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

31
.gitapp/schemas/cast.json Normal file
View File

@ -0,0 +1,31 @@
{
"$id": "cast",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"character"
],
"properties": {
"character": {
"type": "string"
},
"billing": {
"type": "integer",
"minimum": 1
},
"movie": {
"type": "string",
"x-relation": {
"collection": "movies",
"type": "single"
}
},
"actor": {
"type": "string",
"x-relation": {
"collection": "people",
"type": "single"
}
}
}
}

View File

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

View File

@ -0,0 +1,56 @@
{
"$id": "movies",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"title",
"year"
],
"properties": {
"title": {
"type": "string",
"minLength": 1
},
"year": {
"type": "integer",
"minimum": 1900,
"maximum": 2030
},
"runtime": {
"type": "integer",
"minimum": 1
},
"plot": {
"type": "string"
},
"poster": {
"type": "string"
},
"rating": {
"type": "number",
"minimum": 0,
"maximum": 10
},
"budget": {
"type": "string"
},
"director": {
"type": "string",
"x-relation": {
"collection": "people",
"type": "single"
}
},
"genres": {
"type": "array",
"items": {
"type": "string"
},
"x-relation": {
"collection": "genres",
"type": "multiple",
"maxItems": 5
}
}
}
}

View File

@ -0,0 +1,27 @@
{
"$id": "people",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"bio": {
"type": "string"
},
"birthDate": {
"type": "string",
"format": "date"
},
"photo": {
"type": "string"
},
"knownFor": {
"type": "string"
}
}
}

View File

@ -0,0 +1,37 @@
{
"$id": "reviews",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"rating",
"content"
],
"properties": {
"rating": {
"type": "number",
"minimum": 1,
"maximum": 10
},
"content": {
"type": "string"
},
"date": {
"type": "string",
"format": "date-time"
},
"movie": {
"type": "string",
"x-relation": {
"collection": "movies",
"type": "single"
}
},
"author": {
"type": "string",
"x-relation": {
"collection": "people",
"type": "single"
}
}
}
}

View File

View File

View File

View File

View File