init commit

This commit is contained in:
Asya Vee
2025-08-26 16:49:54 +04:00
parent b10285d08b
commit d577f6c608
94 changed files with 27785 additions and 526 deletions

0
apps/admin/README.md Normal file
View File

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 645 B

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 367 B

View File

Before

Width:  |  Height:  |  Size: 750 B

After

Width:  |  Height:  |  Size: 750 B

View File

@@ -1,36 +0,0 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/create-next-app).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load Inter, a custom Google Font.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.

View File

@@ -0,0 +1,12 @@
{
"name": "pocketbase",
"version": "1.0.0",
"description": "",
"main": "./pocketbase",
"scripts": {
"dev": "./pocketbase serve"
},
"keywords": [],
"author": "",
"license": "ISC"
}

Binary file not shown.

Binary file not shown.

23076
apps/pocketbase/pb_data/types.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,132 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3578368839",
"max": 0,
"min": 0,
"name": "display_name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1843675174",
"max": 0,
"min": 0,
"name": "description",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "bool2221444213",
"name": "requires_payment",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"hidden": false,
"id": "number2149298318",
"max": null,
"min": null,
"name": "default_duration",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "number3657818954",
"max": null,
"min": null,
"name": "max_participants",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_2329784423",
"indexes": [],
"listRule": null,
"name": "bookingTypes",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2329784423");
return app.delete(collection);
})

View File

@@ -0,0 +1,31 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2329784423")
// add field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "select1542800728",
"maxSelect": 1,
"name": "field",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"coworking_wheel",
"coworking_table",
"personal_workshop",
"group_workshop"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2329784423")
// remove field
collection.fields.removeById("select1542800728")
return app.save(collection)
})

View File

@@ -0,0 +1,78 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2329784423")
// update field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "active",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// update field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "select1542800728",
"maxSelect": 1,
"name": "name",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"coworking_wheel",
"coworking_table",
"personal_workshop",
"group_workshop"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2329784423")
// update field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// update field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "select1542800728",
"maxSelect": 1,
"name": "field",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"coworking_wheel",
"coworking_table",
"personal_workshop",
"group_workshop"
]
}))
return app.save(collection)
})

View File

@@ -0,0 +1,148 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2329784423");
return app.delete(collection);
}, (app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "active",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3578368839",
"max": 0,
"min": 0,
"name": "display_name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1843675174",
"max": 0,
"min": 0,
"name": "description",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "bool2221444213",
"name": "requires_payment",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"hidden": false,
"id": "number2149298318",
"max": null,
"min": null,
"name": "default_duration",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "number3657818954",
"max": null,
"min": null,
"name": "max_participants",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "select1542800728",
"maxSelect": 1,
"name": "name",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"coworking_wheel",
"coworking_table",
"personal_workshop",
"group_workshop"
]
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_2329784423",
"indexes": [],
"listRule": null,
"name": "bookingTypes",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
})

View File

@@ -0,0 +1,57 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_2329784423",
"indexes": [],
"listRule": null,
"name": "bookingTypes",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2329784423");
return app.delete(collection);
})

View File

@@ -0,0 +1,132 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3578368839",
"max": 0,
"min": 0,
"name": "display_name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "bool2221444213",
"name": "requires_payment",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"hidden": false,
"id": "number2149298318",
"max": null,
"min": 30,
"name": "default_duration",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1843675174",
"max": 0,
"min": 0,
"name": "description",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "number3657818954",
"max": null,
"min": 1,
"name": "max_participants",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_43114331",
"indexes": [],
"listRule": null,
"name": "bookingTypesNew",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331");
return app.delete(collection);
})

View File

@@ -0,0 +1,57 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2329784423");
return app.delete(collection);
}, (app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_2329784423",
"indexes": [],
"listRule": null,
"name": "bookingTypes",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
})

View File

@@ -0,0 +1,20 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// update collection data
unmarshal({
"name": "bookingTypes"
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// update collection data
unmarshal({
"name": "bookingTypesNew"
}, collection)
return app.save(collection)
})

View File

@@ -0,0 +1,119 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "select2363381545",
"maxSelect": 1,
"name": "type",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"wheel",
"workstation"
]
},
{
"hidden": false,
"id": "number3051925876",
"max": null,
"min": 1,
"name": "capacity",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"cascadeDelete": false,
"collectionId": "pbc_43114331",
"hidden": false,
"id": "relation3360453765",
"maxSelect": 999,
"minSelect": 0,
"name": "booking_types",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "bool458715613",
"name": "is_active",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_2337082678",
"indexes": [],
"listRule": null,
"name": "resources",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678");
return app.delete(collection);
})

View File

@@ -0,0 +1,119 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678");
return app.delete(collection);
}, (app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "select2363381545",
"maxSelect": 1,
"name": "type",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"wheel",
"workstation"
]
},
{
"hidden": false,
"id": "number3051925876",
"max": null,
"min": 1,
"name": "capacity",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"cascadeDelete": false,
"collectionId": "pbc_43114331",
"hidden": false,
"id": "relation3360453765",
"maxSelect": 999,
"minSelect": 0,
"name": "booking_types",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "bool458715613",
"name": "is_active",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_2337082678",
"indexes": [],
"listRule": null,
"name": "resources",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
})

View File

@@ -0,0 +1,106 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "select2363381545",
"maxSelect": 1,
"name": "type",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"wheel",
"workstation"
]
},
{
"hidden": false,
"id": "number3051925876",
"max": null,
"min": 1,
"name": "capacity",
"onlyInt": false,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "bool458715613",
"name": "is_active",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_2337082678",
"indexes": [],
"listRule": null,
"name": "resources",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678");
return app.delete(collection);
})

View File

@@ -0,0 +1,195 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"cascadeDelete": false,
"collectionId": "pbc_43114331",
"hidden": false,
"id": "relation2488235367",
"maxSelect": 1,
"minSelect": 0,
"name": "booking_type",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"cascadeDelete": false,
"collectionId": "pbc_2337082678",
"hidden": false,
"id": "relation3163681814",
"maxSelect": 1,
"minSelect": 0,
"name": "resource",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text179493489",
"max": 0,
"min": 0,
"name": "customer_name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text18589324",
"max": 0,
"min": 0,
"name": "notes",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "date1345189255",
"max": "",
"min": "",
"name": "start_time",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"hidden": false,
"id": "date1096160257",
"max": "",
"min": "",
"name": "end_time",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"hidden": false,
"id": "number3045082519",
"max": null,
"min": null,
"name": "participants_count",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"exceptDomains": null,
"hidden": false,
"id": "email698812751",
"name": "customer_email",
"onlyDomains": null,
"presentable": false,
"required": false,
"system": false,
"type": "email"
},
{
"hidden": false,
"id": "select2063623452",
"maxSelect": 1,
"name": "status",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"confirmed",
"cancelled"
]
},
{
"hidden": false,
"id": "select1580793482",
"maxSelect": 1,
"name": "payment_status",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"pending",
"confirmed",
"rejected",
"cancelled"
]
},
{
"hidden": false,
"id": "bool2690508641",
"name": "payment_required",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_986407980",
"indexes": [],
"listRule": null,
"name": "bookings",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980");
return app.delete(collection);
})

View File

@@ -0,0 +1,42 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// update field
collection.fields.addAt(4, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text18589324",
"max": 0,
"min": 0,
"name": "internal_notes",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// update field
collection.fields.addAt(4, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text18589324",
"max": 0,
"min": 0,
"name": "notes",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
})

View File

@@ -0,0 +1,57 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_3174063690",
"indexes": [],
"listRule": null,
"name": "transactions",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690");
return app.delete(collection);
})

View File

@@ -0,0 +1,198 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// add field
collection.fields.addAt(1, new Field({
"cascadeDelete": false,
"collectionId": "pbc_986407980",
"hidden": false,
"id": "relation3758943710",
"maxSelect": 1,
"minSelect": 0,
"name": "booking",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
// add field
collection.fields.addAt(2, new Field({
"hidden": false,
"id": "select2363381545",
"maxSelect": 1,
"name": "type",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"payment",
"refund",
"adjustment",
"chargeback"
]
}))
// add field
collection.fields.addAt(3, new Field({
"hidden": false,
"id": "number2392944706",
"max": null,
"min": null,
"name": "amount",
"onlyInt": false,
"presentable": false,
"required": true,
"system": false,
"type": "number"
}))
// add field
collection.fields.addAt(4, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1843675174",
"max": 0,
"min": 0,
"name": "description",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// add field
collection.fields.addAt(5, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1569282101",
"max": 0,
"min": 0,
"name": "gateway_transaction_id",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// add field
collection.fields.addAt(6, new Field({
"hidden": false,
"id": "select2063623452",
"maxSelect": 1,
"name": "status",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"failed",
"pending",
"completed",
"cancelled",
"disputed"
]
}))
// add field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "json1638207474",
"maxSize": 0,
"name": "processor_response",
"presentable": false,
"required": false,
"system": false,
"type": "json"
}))
// add field
collection.fields.addAt(8, new Field({
"cascadeDelete": false,
"collectionId": "pbc_3174063690",
"hidden": false,
"id": "relation2235098619",
"maxSelect": 1,
"minSelect": 0,
"name": "original_transaction",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
// add field
collection.fields.addAt(9, new Field({
"hidden": false,
"id": "select1389085300",
"maxSelect": 1,
"name": "refund_reason",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"customer_request",
"cancellation_policy",
"dispute"
]
}))
// add field
collection.fields.addAt(10, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text3725765462",
"max": 0,
"min": 0,
"name": "created_by",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// remove field
collection.fields.removeById("relation3758943710")
// remove field
collection.fields.removeById("select2363381545")
// remove field
collection.fields.removeById("number2392944706")
// remove field
collection.fields.removeById("text1843675174")
// remove field
collection.fields.removeById("text1569282101")
// remove field
collection.fields.removeById("select2063623452")
// remove field
collection.fields.removeById("json1638207474")
// remove field
collection.fields.removeById("relation2235098619")
// remove field
collection.fields.removeById("select1389085300")
// remove field
collection.fields.removeById("text3725765462")
return app.save(collection)
})

View File

@@ -0,0 +1,195 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690");
return app.delete(collection);
}, (app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"cascadeDelete": false,
"collectionId": "pbc_986407980",
"hidden": false,
"id": "relation3758943710",
"maxSelect": 1,
"minSelect": 0,
"name": "booking",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "select2363381545",
"maxSelect": 1,
"name": "type",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"payment",
"refund",
"adjustment",
"chargeback"
]
},
{
"hidden": false,
"id": "number2392944706",
"max": null,
"min": null,
"name": "amount",
"onlyInt": false,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1843675174",
"max": 0,
"min": 0,
"name": "description",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1569282101",
"max": 0,
"min": 0,
"name": "gateway_transaction_id",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "select2063623452",
"maxSelect": 1,
"name": "status",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"failed",
"pending",
"completed",
"cancelled",
"disputed"
]
},
{
"hidden": false,
"id": "json1638207474",
"maxSize": 0,
"name": "processor_response",
"presentable": false,
"required": false,
"system": false,
"type": "json"
},
{
"cascadeDelete": false,
"collectionId": "pbc_3174063690",
"hidden": false,
"id": "relation2235098619",
"maxSelect": 1,
"minSelect": 0,
"name": "original_transaction",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "select1389085300",
"maxSelect": 1,
"name": "refund_reason",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"customer_request",
"cancellation_policy",
"dispute"
]
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3725765462",
"max": 0,
"min": 0,
"name": "created_by",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_3174063690",
"indexes": [],
"listRule": null,
"name": "transactions",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
})

View File

@@ -0,0 +1,195 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980");
return app.delete(collection);
}, (app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"cascadeDelete": false,
"collectionId": "pbc_43114331",
"hidden": false,
"id": "relation2488235367",
"maxSelect": 1,
"minSelect": 0,
"name": "booking_type",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"cascadeDelete": false,
"collectionId": "pbc_2337082678",
"hidden": false,
"id": "relation3163681814",
"maxSelect": 1,
"minSelect": 0,
"name": "resource",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text179493489",
"max": 0,
"min": 0,
"name": "customer_name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text18589324",
"max": 0,
"min": 0,
"name": "internal_notes",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "date1345189255",
"max": "",
"min": "",
"name": "start_time",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"hidden": false,
"id": "date1096160257",
"max": "",
"min": "",
"name": "end_time",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"hidden": false,
"id": "number3045082519",
"max": null,
"min": null,
"name": "participants_count",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"exceptDomains": null,
"hidden": false,
"id": "email698812751",
"name": "customer_email",
"onlyDomains": null,
"presentable": false,
"required": false,
"system": false,
"type": "email"
},
{
"hidden": false,
"id": "select2063623452",
"maxSelect": 1,
"name": "status",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"confirmed",
"cancelled"
]
},
{
"hidden": false,
"id": "select1580793482",
"maxSelect": 1,
"name": "payment_status",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"pending",
"confirmed",
"rejected",
"cancelled"
]
},
{
"hidden": false,
"id": "bool2690508641",
"name": "payment_required",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_986407980",
"indexes": [],
"listRule": null,
"name": "bookings",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
})

View File

@@ -0,0 +1,132 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331");
return app.delete(collection);
}, (app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3578368839",
"max": 0,
"min": 0,
"name": "display_name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "bool2221444213",
"name": "requires_payment",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"hidden": false,
"id": "number2149298318",
"max": null,
"min": 30,
"name": "default_duration",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1843675174",
"max": 0,
"min": 0,
"name": "description",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "number3657818954",
"max": null,
"min": 1,
"name": "max_participants",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_43114331",
"indexes": [],
"listRule": null,
"name": "bookingTypes",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
})

View File

@@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// add field
collection.fields.addAt(7, new Field({
"cascadeDelete": false,
"collectionId": "pbc_2337082678",
"hidden": false,
"id": "relation4016499630",
"maxSelect": 1,
"minSelect": 0,
"name": "resources",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// remove field
collection.fields.removeById("relation4016499630")
return app.save(collection)
})

View File

@@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// remove field
collection.fields.removeById("relation4016499630")
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// add field
collection.fields.addAt(7, new Field({
"cascadeDelete": false,
"collectionId": "pbc_2337082678",
"hidden": false,
"id": "relation4016499630",
"maxSelect": 1,
"minSelect": 0,
"name": "resources",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
})

View File

@@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678")
// add field
collection.fields.addAt(5, new Field({
"cascadeDelete": false,
"collectionId": "pbc_43114331",
"hidden": false,
"id": "relation3360453765",
"maxSelect": 999,
"minSelect": 0,
"name": "booking_types",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678")
// remove field
collection.fields.removeById("relation3360453765")
return app.save(collection)
})

View File

@@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// remove field
collection.fields.removeById("relation3163681814")
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// add field
collection.fields.addAt(2, new Field({
"cascadeDelete": false,
"collectionId": "pbc_2337082678",
"hidden": false,
"id": "relation3163681814",
"maxSelect": 1,
"minSelect": 0,
"name": "resource",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
})

View File

@@ -0,0 +1,99 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// add field
collection.fields.addAt(11, new Field({
"autogeneratePattern": "[a-z0-9]{30}",
"hidden": false,
"id": "text1296925602",
"max": 0,
"min": 0,
"name": "cancellation_token",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
// update field
collection.fields.addAt(8, new Field({
"hidden": false,
"id": "select2063623452",
"maxSelect": 1,
"name": "status",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"confirmed",
"cancelled",
"completed"
]
}))
// update field
collection.fields.addAt(9, new Field({
"hidden": false,
"id": "select1580793482",
"maxSelect": 1,
"name": "payment_status",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"not_required",
"paid",
"refunded",
"partially_refunded",
"pending"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// remove field
collection.fields.removeById("text1296925602")
// update field
collection.fields.addAt(8, new Field({
"hidden": false,
"id": "select2063623452",
"maxSelect": 1,
"name": "status",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"confirmed",
"cancelled"
]
}))
// update field
collection.fields.addAt(9, new Field({
"hidden": false,
"id": "select1580793482",
"maxSelect": 1,
"name": "payment_status",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"pending",
"confirmed",
"rejected",
"cancelled"
]
}))
return app.save(collection)
})

View File

@@ -0,0 +1,29 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678")
// remove field
collection.fields.removeById("text1579384326")
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678")
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
return app.save(collection)
})

View File

@@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678")
// remove field
collection.fields.removeById("relation3360453765")
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678")
// add field
collection.fields.addAt(4, new Field({
"cascadeDelete": false,
"collectionId": "pbc_43114331",
"hidden": false,
"id": "relation3360453765",
"maxSelect": 999,
"minSelect": 0,
"name": "booking_types",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
})

View File

@@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// add field
collection.fields.addAt(7, new Field({
"cascadeDelete": false,
"collectionId": "pbc_2337082678",
"hidden": false,
"id": "relation4016499630",
"maxSelect": 1,
"minSelect": 0,
"name": "resources",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// remove field
collection.fields.removeById("relation4016499630")
return app.save(collection)
})

View File

@@ -0,0 +1,42 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "select2363381545",
"maxSelect": 1,
"name": "type",
"presentable": true,
"required": false,
"system": false,
"type": "select",
"values": [
"wheel",
"workstation"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "select2363381545",
"maxSelect": 1,
"name": "type",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"wheel",
"workstation"
]
}))
return app.save(collection)
})

View File

@@ -0,0 +1,124 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"cascadeDelete": false,
"collectionId": "pbc_43114331",
"hidden": false,
"id": "relation3360453765",
"maxSelect": 999,
"minSelect": 0,
"name": "booking_types",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "date1345189255",
"max": "",
"min": "",
"name": "start_time",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"hidden": false,
"id": "date1096160257",
"max": "",
"min": "",
"name": "end_time",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"hidden": false,
"id": "date205214228",
"max": "",
"min": "",
"name": "is_reccuring",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"hidden": false,
"id": "number3301820327",
"max": null,
"min": null,
"name": "max_capacity",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "bool458715613",
"name": "is_active",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_586073990",
"indexes": [],
"listRule": null,
"name": "TimeSlot",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990");
return app.delete(collection);
})

View File

@@ -0,0 +1,29 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// add field
collection.fields.addAt(7, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text4105598805",
"max": 0,
"min": 0,
"name": "recurrence_pattern",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// remove field
collection.fields.removeById("text4105598805")
return app.save(collection)
})

View File

@@ -0,0 +1,20 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// update collection data
unmarshal({
"name": "timeSlots"
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// update collection data
unmarshal({
"name": "TimeSlot"
}, collection)
return app.save(collection)
})

View File

@@ -0,0 +1,44 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// remove field
collection.fields.removeById("text4105598805")
// add field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "json4105598805",
"maxSize": 0,
"name": "recurrence_pattern",
"presentable": false,
"required": false,
"system": false,
"type": "json"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// add field
collection.fields.addAt(7, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text4105598805",
"max": 0,
"min": 0,
"name": "recurrence_pattern",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// remove field
collection.fields.removeById("json4105598805")
return app.save(collection)
})

View File

@@ -0,0 +1,27 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// remove field
collection.fields.removeById("number3657818954")
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// add field
collection.fields.addAt(6, new Field({
"hidden": false,
"id": "number3657818954",
"max": null,
"min": 1,
"name": "max_participants",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
}))
return app.save(collection)
})

View File

@@ -0,0 +1,102 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"hidden": false,
"id": "bool458715613",
"name": "is_active",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"cascadeDelete": false,
"collectionId": "_pb_users_auth_",
"hidden": false,
"id": "relation2375276105",
"maxSelect": 1,
"minSelect": 0,
"name": "user",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "date4260335480",
"max": "",
"min": "",
"name": "valid_until",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"hidden": false,
"id": "number3051925876",
"max": null,
"min": null,
"name": "capacity",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_3980638064",
"indexes": [],
"listRule": null,
"name": "subscriptions",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3980638064");
return app.delete(collection);
})

View File

@@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// add field
collection.fields.addAt(12, new Field({
"cascadeDelete": false,
"collectionId": "pbc_3980638064",
"hidden": false,
"id": "relation2687644723",
"maxSelect": 1,
"minSelect": 0,
"name": "use_subscription",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// remove field
collection.fields.removeById("relation2687644723")
return app.save(collection)
})

View File

@@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// add field
collection.fields.addAt(11, new Field({
"cascadeDelete": false,
"collectionId": "pbc_3980638064",
"hidden": false,
"id": "relation2747688147",
"maxSelect": 1,
"minSelect": 0,
"name": "subscription",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// remove field
collection.fields.removeById("relation2747688147")
return app.save(collection)
})

View File

@@ -0,0 +1,27 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// remove field
collection.fields.removeById("number3301820327")
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// add field
collection.fields.addAt(5, new Field({
"hidden": false,
"id": "number3301820327",
"max": null,
"min": null,
"name": "max_capacity",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
})

View File

@@ -0,0 +1,27 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// add field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "number3301820327",
"max": null,
"min": null,
"name": "max_capacity",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// remove field
collection.fields.removeById("number3301820327")
return app.save(collection)
})

View File

@@ -0,0 +1,90 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// update field
collection.fields.addAt(2, new Field({
"hidden": false,
"id": "date1345189255",
"max": "",
"min": "",
"name": "start_time",
"presentable": false,
"required": true,
"system": false,
"type": "date"
}))
// update field
collection.fields.addAt(3, new Field({
"hidden": false,
"id": "date1096160257",
"max": "",
"min": "",
"name": "end_time",
"presentable": false,
"required": true,
"system": false,
"type": "date"
}))
// update field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "number3301820327",
"max": null,
"min": 1,
"name": "max_capacity",
"onlyInt": false,
"presentable": false,
"required": true,
"system": false,
"type": "number"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// update field
collection.fields.addAt(2, new Field({
"hidden": false,
"id": "date1345189255",
"max": "",
"min": "",
"name": "start_time",
"presentable": false,
"required": false,
"system": false,
"type": "date"
}))
// update field
collection.fields.addAt(3, new Field({
"hidden": false,
"id": "date1096160257",
"max": "",
"min": "",
"name": "end_time",
"presentable": false,
"required": false,
"system": false,
"type": "date"
}))
// update field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "number3301820327",
"max": null,
"min": null,
"name": "max_capacity",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
})

View File

@@ -0,0 +1,40 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// remove field
collection.fields.removeById("date205214228")
// add field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "bool205214228",
"name": "is_reccuring",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// add field
collection.fields.addAt(4, new Field({
"hidden": false,
"id": "date205214228",
"max": "",
"min": "",
"name": "is_reccuring",
"presentable": false,
"required": false,
"system": false,
"type": "date"
}))
// remove field
collection.fields.removeById("bool205214228")
return app.save(collection)
})

View File

@@ -0,0 +1,44 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// add field
collection.fields.addAt(7, new Field({
"hidden": false,
"id": "number3301820327",
"max": null,
"min": null,
"name": "max_capacity",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
// add field
collection.fields.addAt(8, new Field({
"hidden": false,
"id": "number1421793101",
"max": null,
"min": null,
"name": "min_capacity",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// remove field
collection.fields.removeById("number3301820327")
// remove field
collection.fields.removeById("number1421793101")
return app.save(collection)
})

View File

@@ -0,0 +1,24 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// add field
collection.fields.addAt(9, new Field({
"hidden": false,
"id": "bool458715613",
"name": "is_active",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// remove field
collection.fields.removeById("bool458715613")
return app.save(collection)
})

View File

@@ -0,0 +1,27 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// add field
collection.fields.addAt(10, new Field({
"hidden": false,
"id": "number155801959",
"max": null,
"min": null,
"name": "price_per_person",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// remove field
collection.fields.removeById("number155801959")
return app.save(collection)
})

View File

@@ -0,0 +1,27 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// add field
collection.fields.addAt(11, new Field({
"hidden": false,
"id": "number1728702201",
"max": null,
"min": null,
"name": "min_duration",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// remove field
collection.fields.removeById("number1728702201")
return app.save(collection)
})

View File

@@ -0,0 +1,38 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// update field
collection.fields.addAt(4, new Field({
"hidden": false,
"id": "number2149298318",
"max": null,
"min": 30,
"name": "base_duration",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// update field
collection.fields.addAt(4, new Field({
"hidden": false,
"id": "number2149298318",
"max": null,
"min": 30,
"name": "default_duration",
"onlyInt": true,
"presentable": false,
"required": true,
"system": false,
"type": "number"
}))
return app.save(collection)
})

View File

@@ -0,0 +1,61 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678")
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1579384326",
"max": 0,
"min": 0,
"name": "name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
// update field
collection.fields.addAt(2, new Field({
"hidden": false,
"id": "select2363381545",
"maxSelect": 1,
"name": "type",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"wheel",
"workstation"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_2337082678")
// remove field
collection.fields.removeById("text1579384326")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "select2363381545",
"maxSelect": 1,
"name": "type",
"presentable": true,
"required": false,
"system": false,
"type": "select",
"values": [
"wheel",
"workstation"
]
}))
return app.save(collection)
})

View File

@@ -0,0 +1,38 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// update field
collection.fields.addAt(6, new Field({
"hidden": false,
"id": "number1728702201",
"max": null,
"min": 60,
"name": "min_duration",
"onlyInt": false,
"presentable": false,
"required": true,
"system": false,
"type": "number"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_43114331")
// update field
collection.fields.addAt(6, new Field({
"hidden": false,
"id": "number1728702201",
"max": null,
"min": null,
"name": "min_duration",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
})

View File

@@ -0,0 +1,36 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// update field
collection.fields.addAt(7, new Field({
"exceptDomains": null,
"hidden": false,
"id": "email698812751",
"name": "customer_email",
"onlyDomains": null,
"presentable": false,
"required": true,
"system": false,
"type": "email"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// update field
collection.fields.addAt(7, new Field({
"exceptDomains": null,
"hidden": false,
"id": "email698812751",
"name": "customer_email",
"onlyDomains": null,
"presentable": false,
"required": false,
"system": false,
"type": "email"
}))
return app.save(collection)
})

View File

@@ -0,0 +1,179 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// remove field
collection.fields.removeById("select1580793482")
// update field
collection.fields.addAt(2, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text179493489",
"max": 0,
"min": 0,
"name": "customer_name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
}))
// update field
collection.fields.addAt(4, new Field({
"hidden": false,
"id": "date1345189255",
"max": "",
"min": "",
"name": "start_time",
"presentable": false,
"required": true,
"system": false,
"type": "date"
}))
// update field
collection.fields.addAt(5, new Field({
"hidden": false,
"id": "date1096160257",
"max": "",
"min": "",
"name": "end_time",
"presentable": false,
"required": true,
"system": false,
"type": "date"
}))
// update field
collection.fields.addAt(6, new Field({
"hidden": false,
"id": "number3045082519",
"max": null,
"min": 1,
"name": "participants_count",
"onlyInt": false,
"presentable": false,
"required": true,
"system": false,
"type": "number"
}))
// update field
collection.fields.addAt(8, new Field({
"hidden": false,
"id": "select2063623452",
"maxSelect": 1,
"name": "status",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"confirmed",
"cancelled",
"payment_pending",
"fulfilled"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_986407980")
// add field
collection.fields.addAt(9, new Field({
"hidden": false,
"id": "select1580793482",
"maxSelect": 1,
"name": "payment_status",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"not_required",
"paid",
"refunded",
"partially_refunded",
"pending"
]
}))
// update field
collection.fields.addAt(2, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text179493489",
"max": 0,
"min": 0,
"name": "customer_name",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// update field
collection.fields.addAt(4, new Field({
"hidden": false,
"id": "date1345189255",
"max": "",
"min": "",
"name": "start_time",
"presentable": false,
"required": false,
"system": false,
"type": "date"
}))
// update field
collection.fields.addAt(5, new Field({
"hidden": false,
"id": "date1096160257",
"max": "",
"min": "",
"name": "end_time",
"presentable": false,
"required": false,
"system": false,
"type": "date"
}))
// update field
collection.fields.addAt(6, new Field({
"hidden": false,
"id": "number3045082519",
"max": null,
"min": null,
"name": "participants_count",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
// update field
collection.fields.addAt(8, new Field({
"hidden": false,
"id": "select2063623452",
"maxSelect": 1,
"name": "status",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"confirmed",
"cancelled",
"completed"
]
}))
return app.save(collection)
})

View File

@@ -0,0 +1,103 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// remove field
collection.fields.removeById("relation2747688147")
// update field
collection.fields.addAt(5, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1569282101",
"max": 0,
"min": 0,
"name": "order_id",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// update field
collection.fields.addAt(6, new Field({
"hidden": false,
"id": "select2063623452",
"maxSelect": 1,
"name": "order_status",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"created",
"processing",
"completed",
"rejected",
"refund_requested",
"refunded",
"refunded_partially",
"auth_requested",
"blocked",
"partial_completed"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// add field
collection.fields.addAt(11, new Field({
"cascadeDelete": false,
"collectionId": "pbc_3980638064",
"hidden": false,
"id": "relation2747688147",
"maxSelect": 1,
"minSelect": 0,
"name": "subscription",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
// update field
collection.fields.addAt(5, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text1569282101",
"max": 0,
"min": 0,
"name": "gateway_transaction_id",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// update field
collection.fields.addAt(6, new Field({
"hidden": false,
"id": "select2063623452",
"maxSelect": 1,
"name": "status",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"failed",
"pending",
"completed",
"cancelled",
"disputed"
]
}))
return app.save(collection)
})

View File

@@ -0,0 +1,47 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// add field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "select3241110846",
"maxSelect": 1,
"name": "order_type",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"booking",
"subscription"
]
}))
// add field
collection.fields.addAt(12, new Field({
"cascadeDelete": false,
"collectionId": "pbc_3980638064",
"hidden": false,
"id": "relation2747688147",
"maxSelect": 1,
"minSelect": 0,
"name": "subscription",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// remove field
collection.fields.removeById("select3241110846")
// remove field
collection.fields.removeById("relation2747688147")
return app.save(collection)
})

View File

@@ -0,0 +1,42 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "select3241110846",
"maxSelect": 1,
"name": "order_type",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"booking",
"subscription"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "select3241110846",
"maxSelect": 1,
"name": "order_type",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"booking",
"subscription"
]
}))
return app.save(collection)
})

View File

@@ -0,0 +1,40 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// update field
collection.fields.addAt(1, new Field({
"cascadeDelete": false,
"collectionId": "pbc_43114331",
"hidden": false,
"id": "relation3360453765",
"maxSelect": 999,
"minSelect": 0,
"name": "booking_types",
"presentable": false,
"required": true,
"system": false,
"type": "relation"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_586073990")
// update field
collection.fields.addAt(1, new Field({
"cascadeDelete": false,
"collectionId": "pbc_43114331",
"hidden": false,
"id": "relation3360453765",
"maxSelect": 999,
"minSelect": 0,
"name": "booking_types",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}))
return app.save(collection)
})

BIN
apps/pocketbase/pocketbase Executable file

Binary file not shown.

View File

@@ -27,10 +27,4 @@ To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

View File

@@ -1,15 +1,10 @@
@import "tailwindcss";
:root {
--background: #ffffff;
--foreground: #171717;
}
@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}
html,
body {
max-width: 100vw;
@@ -23,28 +18,9 @@ body {
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
a {
color: inherit;
text-decoration: none;
}
.imgDark {
display: none;
}
@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
}
.imgLight {
display: none;
}
.imgDark {
display: unset;
}
}

View File

@@ -1,188 +0,0 @@
.page {
--gray-rgb: 0, 0, 0;
--gray-alpha-200: rgba(var(--gray-rgb), 0.08);
--gray-alpha-100: rgba(var(--gray-rgb), 0.05);
--button-primary-hover: #383838;
--button-secondary-hover: #f2f2f2;
display: grid;
grid-template-rows: 20px 1fr 20px;
align-items: center;
justify-items: center;
min-height: 100svh;
padding: 80px;
gap: 64px;
font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
.page {
--gray-rgb: 255, 255, 255;
--gray-alpha-200: rgba(var(--gray-rgb), 0.145);
--gray-alpha-100: rgba(var(--gray-rgb), 0.06);
--button-primary-hover: #ccc;
--button-secondary-hover: #1a1a1a;
}
}
.main {
display: flex;
flex-direction: column;
gap: 32px;
grid-row-start: 2;
}
.main ol {
font-family: var(--font-geist-mono);
padding-left: 0;
margin: 0;
font-size: 14px;
line-height: 24px;
letter-spacing: -0.01em;
list-style-position: inside;
}
.main li:not(:last-of-type) {
margin-bottom: 8px;
}
.main code {
font-family: inherit;
background: var(--gray-alpha-100);
padding: 2px 4px;
border-radius: 4px;
font-weight: 600;
}
.ctas {
display: flex;
gap: 16px;
}
.ctas a {
appearance: none;
border-radius: 128px;
height: 48px;
padding: 0 20px;
border: none;
font-family: var(--font-geist-sans);
border: 1px solid transparent;
transition: background 0.2s, color 0.2s, border-color 0.2s;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
line-height: 20px;
font-weight: 500;
}
a.primary {
background: var(--foreground);
color: var(--background);
gap: 8px;
}
a.secondary {
border-color: var(--gray-alpha-200);
min-width: 180px;
}
button.secondary {
appearance: none;
border-radius: 128px;
height: 48px;
padding: 0 20px;
border: none;
font-family: var(--font-geist-sans);
border: 1px solid transparent;
transition: background 0.2s, color 0.2s, border-color 0.2s;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
line-height: 20px;
font-weight: 500;
background: transparent;
border-color: var(--gray-alpha-200);
min-width: 180px;
}
.footer {
font-family: var(--font-geist-sans);
grid-row-start: 3;
display: flex;
gap: 24px;
}
.footer a {
display: flex;
align-items: center;
gap: 8px;
}
.footer img {
flex-shrink: 0;
}
/* Enable hover only on non-touch devices */
@media (hover: hover) and (pointer: fine) {
a.primary:hover {
background: var(--button-primary-hover);
border-color: transparent;
}
a.secondary:hover {
background: var(--button-secondary-hover);
border-color: transparent;
}
.footer a:hover {
text-decoration: underline;
text-underline-offset: 4px;
}
}
@media (max-width: 600px) {
.page {
padding: 32px;
padding-bottom: 80px;
}
.main {
align-items: center;
}
.main ol {
text-align: center;
}
.ctas {
flex-direction: column;
}
.ctas a {
font-size: 14px;
height: 40px;
padding: 0 16px;
}
a.secondary {
min-width: auto;
}
.footer {
flex-wrap: wrap;
align-items: center;
justify-content: center;
}
}
@media (prefers-color-scheme: dark) {
.logo {
filter: invert();
}
}

View File

@@ -1,101 +1,21 @@
import Image, { type ImageProps } from "next/image";
import { Button } from "@repo/ui/button";
import styles from "./page.module.css";
type Props = Omit<ImageProps, "src"> & {
srcLight: string;
srcDark: string;
};
const ThemeImage = (props: Props) => {
const { srcLight, srcDark, ...rest } = props;
return (
<>
<Image {...rest} src={srcLight} className="imgLight" />
<Image {...rest} src={srcDark} className="imgDark" />
</>
);
};
import BookingInterface from "../components/BookingForm";
export default function Home() {
return (
<div className={styles.page}>
<main className={styles.main}>
<ThemeImage
className={styles.logo}
srcLight="turborepo-dark.svg"
srcDark="turborepo-light.svg"
alt="Turborepo logo"
width={180}
height={38}
priority
/>
<ol>
<li>
Get started by editing <code>apps/web/app/page.tsx</code>
</li>
<li>Save and see your changes instantly.</li>
</ol>
<div className={styles.ctas}>
<div>
<main>
<BookingInterface />
</main>
<footer className="bg-white text-black py-8 mt-12">
<div className="max-w-2xl mx-auto px-4 text-center">
<p className="text-gray-600 mb-2">Questions? Get in touch</p>
<a
className={styles.primary}
href="https://vercel.com/new/clone?demo-description=Learn+to+implement+a+monorepo+with+a+two+Next.js+sites+that+has+installed+three+local+packages.&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F4K8ZISWAzJ8X1504ca0zmC%2F0b21a1c6246add355e55816278ef54bc%2FBasic.png&demo-title=Monorepo+with+Turborepo&demo-url=https%3A%2F%2Fexamples-basic-web.vercel.sh%2F&from=templates&project-name=Monorepo+with+Turborepo&repository-name=monorepo-turborepo&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fturborepo%2Ftree%2Fmain%2Fexamples%2Fbasic&root-directory=apps%2Fdocs&skippable-integrations=1&teamSlug=vercel&utm_source=create-turbo"
target="_blank"
rel="noopener noreferrer"
href="mailto:vitrify@asyavee.me"
className="text-blue-600 hover:text-blue-800 transition-colors font-medium"
>
<Image
className={styles.logo}
src="/vercel.svg"
alt="Vercel logomark"
width={20}
height={20}
/>
Deploy now
</a>
<a
href="https://turborepo.com/docs?utm_source"
target="_blank"
rel="noopener noreferrer"
className={styles.secondary}
>
Read our docs
vitrify@asyavee.me
</a>
</div>
<Button appName="web" className={styles.secondary}>
Open alert
</Button>
</main>
<footer className={styles.footer}>
<a
href="https://vercel.com/templates?search=turborepo&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/window.svg"
alt="Window icon"
width={16}
height={16}
/>
Examples
</a>
<a
href="https://turborepo.com?utm_source=create-turbo"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/globe.svg"
alt="Globe icon"
width={16}
height={16}
/>
Go to turborepo.com
</a>
</footer>
</div>
);

View File

@@ -0,0 +1,276 @@
'use client'
import React, { useState } from 'react';
import { Calendar, Clock, User, Mail, Users } from 'lucide-react';
const BookingInterface = () => {
const [selectedDate, setSelectedDate] = useState('');
const [selectedTimeSlot, setSelectedTimeSlot] = useState('');
const [selectedBookingType, setSelectedBookingType] = useState('');
const [customerName, setCustomerName] = useState('');
const [customerEmail, setCustomerEmail] = useState('');
const [participantsCount, setParticipantsCount] = useState(1);
// Mock data - will be replaced with API calls
const bookingTypes = [
{ id: '1', name: 'wheel_rental', display_name: 'Wheel Rental', requires_payment: false, price_per_person: 0 },
{ id: '2', name: 'hand_building', display_name: 'Hand Building Coworking', requires_payment: false, price_per_person: 0 },
{ id: '3', name: 'personal_workshop', display_name: 'Personal Workshop', requires_payment: true, price_per_person: 75 },
{ id: '4', name: 'group_workshop', display_name: 'Group Workshop', requires_payment: true, price_per_person: 50 }
];
// Mock available time slots
const timeSlots = [
{ id: '1', start_time: '09:00', end_time: '11:00', available: true },
{ id: '2', start_time: '11:30', end_time: '13:30', available: true },
{ id: '3', start_time: '14:00', end_time: '16:00', available: false },
{ id: '4', start_time: '16:30', end_time: '18:30', available: true },
{ id: '5', start_time: '19:00', end_time: '21:00', available: true }
];
const selectedBookingTypeData = bookingTypes.find(bt => bt.id === selectedBookingType);
const handleSubmit = () => {
console.log({
selectedBookingType,
selectedDate,
selectedTimeSlot,
customerName,
customerEmail,
participantsCount
});
};
const generateCalendarDays = () => {
const today = new Date();
const days = [];
for (let i = 0; i < 14; i++) {
const date = new Date(today);
date.setDate(today.getDate() + i);
days.push({
date: date.toISOString().split('T')[0],
day: date.getDate(),
month: date.toLocaleDateString('en', { month: 'short' }),
dayName: date.toLocaleDateString('en', { weekday: 'short' })
});
}
return days;
};
const calendarDays = generateCalendarDays();
return (
<div className="min-h-screen bg-gray-50 p-4">
<div className="max-w-2xl mx-auto">
{/* Header */}
<div className="text-center mb-8">
<h1 className="text-3xl font-bold text-gray-900 mb-2">Book Your Session</h1>
<p className="text-gray-600">Choose your pottery experience</p>
</div>
<div className="space-y-8">
{/* Booking Type Selection */}
<div className="bg-white rounded-xl p-6 shadow-sm">
<h2 className="text-xl font-semibold text-gray-900 mb-4 flex items-center gap-2">
<Calendar className="w-5 h-5" />
Select Experience
</h2>
<div className="grid gap-3">
{bookingTypes.map((type) => (
<label key={type.id} className="cursor-pointer">
<input
type="radio"
name="bookingType"
value={type.id}
checked={selectedBookingType === type.id}
onChange={(e) => setSelectedBookingType(e.target.value)}
className="sr-only"
/>
<div className={`p-4 rounded-lg border-2 transition-all ${
selectedBookingType === type.id
? 'border-blue-500 bg-blue-50'
: 'border-gray-200 hover:border-gray-300'
}`}>
<div className="flex justify-between items-start">
<div>
<h3 className="font-medium text-gray-900">{type.display_name}</h3>
{type.requires_payment && (
<p className="text-sm text-gray-600 mt-1">
${type.price_per_person} per person
</p>
)}
</div>
{type.requires_payment && (
<span className="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded-full">
Payment Required
</span>
)}
</div>
</div>
</label>
))}
</div>
</div>
{/* Date Selection */}
{selectedBookingType && (
<div className="bg-white rounded-xl p-6 shadow-sm">
<h2 className="text-xl font-semibold text-gray-900 mb-4 flex items-center gap-2">
<Calendar className="w-5 h-5" />
Choose Date
</h2>
<div className="grid grid-cols-7 gap-2 md:gap-3">
{calendarDays.map((day) => (
<button
key={day.date}
type="button"
onClick={() => setSelectedDate(day.date)}
className={`p-3 rounded-lg text-center transition-all ${
selectedDate === day.date
? 'bg-blue-500 text-white'
: 'bg-gray-100 hover:bg-gray-200 text-gray-700'
}`}
>
<div className="text-xs font-medium">{day.dayName}</div>
<div className="text-sm font-semibold">{day.day}</div>
<div className="text-xs">{day.month}</div>
</button>
))}
</div>
</div>
)}
{/* Time Slot Selection */}
{selectedDate && (
<div className="bg-white rounded-xl p-6 shadow-sm">
<h2 className="text-xl font-semibold text-gray-900 mb-4 flex items-center gap-2">
<Clock className="w-5 h-5" />
Available Times
</h2>
<div className="grid grid-cols-2 md:grid-cols-3 gap-3">
{timeSlots.map((slot) => (
<button
key={slot.id}
type="button"
disabled={!slot.available}
onClick={() => setSelectedTimeSlot(slot.id)}
className={`p-3 rounded-lg text-center transition-all ${
!slot.available
? 'bg-gray-100 text-gray-400 cursor-not-allowed'
: selectedTimeSlot === slot.id
? 'bg-blue-500 text-white'
: 'bg-gray-100 hover:bg-gray-200 text-gray-700'
}`}
>
<div className="font-medium">
{slot.start_time} - {slot.end_time}
</div>
</button>
))}
</div>
</div>
)}
{/* Customer Details */}
{selectedTimeSlot && (
<div className="bg-white rounded-xl p-6 shadow-sm">
<h2 className="text-xl font-semibold text-gray-900 mb-4 flex items-center gap-2">
<User className="w-5 h-5" />
Your Details
</h2>
<div className="space-y-4">
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
Full Name *
</label>
<input
type="text"
value={customerName}
onChange={(e) => setCustomerName(e.target.value)}
className="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
placeholder="Enter your full name"
/>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
Email Address *
</label>
<input
type="email"
value={customerEmail}
onChange={(e) => setCustomerEmail(e.target.value)}
className="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
placeholder="Enter your email"
/>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-2 flex items-center gap-2">
<Users className="w-4 h-4" />
Number of Participants
</label>
<select
value={participantsCount}
onChange={(e) => setParticipantsCount(parseInt(e.target.value))}
className="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
>
{[1, 2, 3, 4, 5, 6, 7, 8].map(num => (
<option key={num} value={num}>{num} participant{num > 1 ? 's' : ''}</option>
))}
</select>
</div>
</div>
</div>
)}
{/* Summary & Submit */}
{selectedTimeSlot && customerName && customerEmail && (
<div className="bg-white rounded-xl p-6 shadow-sm">
<h2 className="text-xl font-semibold text-gray-900 mb-4">Booking Summary</h2>
<div className="space-y-3 mb-6">
<div className="flex justify-between">
<span className="text-gray-600">Experience:</span>
<span className="font-medium">{selectedBookingTypeData?.display_name}</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">Date:</span>
<span className="font-medium">{selectedDate}</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">Time:</span>
<span className="font-medium">
{timeSlots.find(s => s.id === selectedTimeSlot)?.start_time} -
{timeSlots.find(s => s.id === selectedTimeSlot)?.end_time}
</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">Participants:</span>
<span className="font-medium">{participantsCount}</span>
</div>
{selectedBookingTypeData?.requires_payment && (
<div className="flex justify-between text-lg font-semibold border-t pt-3">
<span>Total:</span>
<span>${selectedBookingTypeData.price_per_person * participantsCount}</span>
</div>
)}
</div>
<button
onClick={handleSubmit}
className="w-full bg-blue-600 text-white py-4 px-6 rounded-lg font-semibold hover:bg-blue-700 transition-colors"
>
{selectedBookingTypeData?.requires_payment ? 'Continue to Payment' : 'Confirm Booking'}
</button>
</div>
)}
</div>
</div>
</div>
);
};
export default BookingInterface;

144
apps/web/lib/pocketbase.ts Normal file
View File

@@ -0,0 +1,144 @@
import PocketBase from 'pocketbase';
import { BookingType, Resource, TimeSlot, Booking } from '@/types/booking';
// Initialize PocketBase client
export const pb = new PocketBase(process.env.NEXT_PUBLIC_POCKETBASE_URL || 'http://127.0.0.1:8090');
// Disable auto cancellation for SSR
pb.autoCancellation(false);
// API functions for booking system
export const bookingApi = {
// Get all active booking types
async getBookingTypes(): Promise<BookingType[]> {
try {
const records = await pb.collection('bookingTypes').getFullList<BookingType>({
sort: 'created',
expand: 'resources',
});
return records;
} catch (error) {
console.error('Error fetching booking types:', error);
throw error;
}
},
// Get available resources
async getResources(): Promise<Resource[]> {
try {
const records = await pb.collection('resources').getFullList<Resource>({
filter: 'is_active = true',
sort: 'type',
});
return records;
} catch (error) {
console.error('Error fetching resources:', error);
throw error;
}
},
// Get available time slots for a specific booking type and date range
async getAvailableTimeSlots(
bookingTypeId: string,
startDate: Date,
endDate: Date
): Promise<TimeSlot[]> {
try {
const startDateStr = startDate.toISOString().split('T')[0];
const endDateStr = endDate.toISOString().split('T')[0];
const records = await pb.collection('timeSlots').getFullList<TimeSlot>({
filter: `is_active = true && booking_types ~ "${bookingTypeId}" && start_time >= "${startDateStr}" && start_time <= "${endDateStr}"`,
sort: 'start_time',
});
return records;
} catch (error) {
console.error('Error fetching time slots:', error);
throw error;
}
},
// Check if a time slot has availability
async checkTimeSlotAvailability(
timeSlotId: string,
startTime: string,
endTime: string,
participantsCount: number
): Promise<{ available: boolean; currentBookings: number }> {
try {
// Get existing confirmed bookings for this time slot
const existingBookings = await pb.collection('bookings').getFullList<Booking>({
filter: `status = "confirmed" && start_time >= "${startTime}" && end_time <= "${endTime}"`,
});
// Get the time slot to check max capacity
const timeSlot = await pb.collection('timeSlots').getOne<TimeSlot>(timeSlotId);
const currentBookings = existingBookings.reduce((sum, booking) =>
sum + (booking.participants_count || 0), 0
);
const availableSpots = timeSlot.max_capacity - currentBookings;
const available = availableSpots >= participantsCount;
return {
available,
currentBookings,
};
} catch (error) {
console.error('Error checking availability:', error);
throw error;
}
},
// Create a new booking
async createBooking(bookingData: {
booking_type: string;
customer_name: string;
customer_email: string;
start_time: string;
end_time: string;
participants_count: number;
internal_notes?: string;
}): Promise<Booking> {
try {
const record = await pb.collection('bookings').create<Booking>({
...bookingData,
status: 'confirmed',
payment_status: 'not_required', // We'll handle payment logic later
payment_required: false,
});
return record;
} catch (error) {
console.error('Error creating booking:', error);
throw error;
}
},
// Get booking by cancellation token (for cancellation flow)
async getBookingByToken(token: string): Promise<Booking | null> {
try {
const records = await pb.collection('bookings').getFullList<Booking>({
filter: `cancellation_token = "${token}"`,
});
return records[0] || null;
} catch (error) {
console.error('Error fetching booking by token:', error);
return null;
}
},
// Cancel booking
async cancelBooking(bookingId: string): Promise<boolean> {
try {
await pb.collection('bookings').update(bookingId, {
status: 'cancelled',
});
return true;
} catch (error) {
console.error('Error cancelling booking:', error);
return false;
}
},
};

View File

@@ -12,9 +12,14 @@
},
"dependencies": {
"@repo/ui": "workspace:*",
"@tailwindcss/postcss": "^4.1.12",
"lucide-react": "^0.542.0",
"next": "^15.5.0",
"pocketbase": "^0.26.2",
"postcss": "^8.5.6",
"react": "^19.1.0",
"react-dom": "^19.1.0"
"react-dom": "^19.1.0",
"tailwindcss": "^4.1.12"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",

View File

@@ -0,0 +1,6 @@
const config = {
plugins: {
"@tailwindcss/postcss": {},
},
};
export default config;

View File

@@ -0,0 +1,79 @@
// types/booking.ts
export interface BookingType {
id: string;
name: string;
display_name: string;
requires_payment: boolean;
default_duration: number; // in minutes
description?: string;
resources: string; // relation to resources collection
created: string;
updated: string;
}
export interface Resource {
id: string;
type: 'wheel' | 'workstation';
capacity: number;
is_active: boolean;
created: string;
updated: string;
}
export interface TimeSlot {
id: string;
booking_types: string[]; // relation to booking types
start_time: string;
end_time: string;
is_reccuring: boolean;
max_capacity: number;
is_active: boolean;
recurrence_pattern?: {
type: string;
days: number[];
end_date: string;
};
created: string;
updated: string;
}
export interface Booking {
id: string;
booking_type: string; // relation to booking type
customer_name: string;
customer_email: string;
internal_notes?: string;
start_time: string;
end_time: string;
participants_count: number;
status: 'confirmed' | 'cancelled' | 'completed';
payment_status: 'not_required' | 'paid' | 'refunded' | 'partially_refunded' | 'pending';
payment_required: boolean;
cancellation_token: string;
created: string;
updated: string;
}
export interface BookingFormData {
bookingTypeId: string;
customerName: string;
customerEmail: string;
participantsCount: number;
startTime: Date;
endTime: Date;
}
// For the booking flow state
export interface BookingFlowState {
step: 'booking-type' | 'date-time' | 'customer-details' | 'confirmation';
selectedBookingType?: BookingType;
selectedDate?: Date;
selectedTimeSlot?: string; // time slot ID or time string
customerDetails?: {
name: string;
email: string;
participantsCount: number;
notes?: string;
};
}