diff --git a/.gitapp/.gitkeep b/.gitapp/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.gitapp/manifest.json b/.gitapp/manifest.json new file mode 100644 index 0000000..2dedec8 --- /dev/null +++ b/.gitapp/manifest.json @@ -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 + } +} \ No newline at end of file diff --git a/.gitapp/operations/.gitkeep b/.gitapp/operations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.gitapp/schemas/.gitkeep b/.gitapp/schemas/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.gitapp/schemas/cast.json b/.gitapp/schemas/cast.json new file mode 100644 index 0000000..fda2370 --- /dev/null +++ b/.gitapp/schemas/cast.json @@ -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" + } + } + } +} \ No newline at end of file diff --git a/.gitapp/schemas/genres.json b/.gitapp/schemas/genres.json new file mode 100644 index 0000000..23db17d --- /dev/null +++ b/.gitapp/schemas/genres.json @@ -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" + } + } +} \ No newline at end of file diff --git a/.gitapp/schemas/movies.json b/.gitapp/schemas/movies.json new file mode 100644 index 0000000..1ef381e --- /dev/null +++ b/.gitapp/schemas/movies.json @@ -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 + } + } + } +} \ No newline at end of file diff --git a/.gitapp/schemas/people.json b/.gitapp/schemas/people.json new file mode 100644 index 0000000..dea5090 --- /dev/null +++ b/.gitapp/schemas/people.json @@ -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" + } + } +} \ No newline at end of file diff --git a/.gitapp/schemas/reviews.json b/.gitapp/schemas/reviews.json new file mode 100644 index 0000000..ae74010 --- /dev/null +++ b/.gitapp/schemas/reviews.json @@ -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" + } + } + } +} \ No newline at end of file diff --git a/collections/cast/.gitkeep b/collections/cast/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/collections/genres/.gitkeep b/collections/genres/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/collections/movies/.gitkeep b/collections/movies/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/collections/people/.gitkeep b/collections/people/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/collections/reviews/.gitkeep b/collections/reviews/.gitkeep new file mode 100644 index 0000000..e69de29