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

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.