Changed Backend to Supabase

This commit is contained in:
2023-11-26 17:15:55 +01:00
parent 8b76434b41
commit cb3d48d42c
22 changed files with 1420 additions and 346 deletions

View File

@@ -4,7 +4,8 @@
"info": {
"singularName": "tenant",
"pluralName": "tenants",
"displayName": "Tenants"
"displayName": "Tenants",
"description": ""
},
"options": {
"draftAndPublish": true
@@ -16,6 +17,15 @@
},
"short": {
"type": "string"
},
"users": {
"type": "relation",
"relation": "oneToMany",
"target": "plugin::users-permissions.user",
"mappedBy": "tenant"
},
"modules": {
"type": "json"
}
}
}

View File

@@ -9,8 +9,7 @@
"displayName": "User"
},
"options": {
"draftAndPublish": false,
"timestamps": true
"draftAndPublish": false
},
"attributes": {
"username": {
@@ -65,6 +64,12 @@
"target": "plugin::users-permissions.role",
"inversedBy": "users",
"configurable": false
},
"tenant": {
"type": "relation",
"relation": "manyToOne",
"target": "api::tenant.tenant",
"inversedBy": "users"
}
}
}

View File

@@ -631,7 +631,6 @@ export interface PluginUsersPermissionsUser extends Schema.CollectionType {
};
options: {
draftAndPublish: false;
timestamps: true;
};
attributes: {
username: Attribute.String &
@@ -660,6 +659,11 @@ export interface PluginUsersPermissionsUser extends Schema.CollectionType {
'manyToOne',
'plugin::users-permissions.role'
>;
tenant: Attribute.Relation<
'plugin::users-permissions.user',
'manyToOne',
'api::tenant.tenant'
>;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
createdBy: Attribute.Relation<
@@ -999,6 +1003,7 @@ export interface ApiTenantTenant extends Schema.CollectionType {
singularName: 'tenant';
pluralName: 'tenants';
displayName: 'Tenants';
description: '';
};
options: {
draftAndPublish: true;
@@ -1006,6 +1011,12 @@ export interface ApiTenantTenant extends Schema.CollectionType {
attributes: {
name: Attribute.String;
short: Attribute.String;
users: Attribute.Relation<
'api::tenant.tenant',
'oneToMany',
'plugin::users-permissions.user'
>;
modules: Attribute.JSON;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;