Add choral-membership
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "choral_memberships",
|
||||
"info": {
|
||||
"singularName": "choral-membership",
|
||||
"pluralName": "choral-memberships",
|
||||
"displayName": "ChoralMembership",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"user": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "plugin::users-permissions.user",
|
||||
"inversedBy": "choral_memberships"
|
||||
},
|
||||
"choral": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "api::choral.choral",
|
||||
"inversedBy": "memberships"
|
||||
},
|
||||
"role": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"member",
|
||||
"admin",
|
||||
"owner"
|
||||
]
|
||||
},
|
||||
"permissions": {
|
||||
"type": "component",
|
||||
"repeatable": true,
|
||||
"component": "user.permissions"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* choral-membership controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::choral-membership.choral-membership');
|
||||
7
src/api/choral-membership/routes/choral-membership.ts
Normal file
7
src/api/choral-membership/routes/choral-membership.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* choral-membership router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::choral-membership.choral-membership');
|
||||
7
src/api/choral-membership/services/choral-membership.ts
Normal file
7
src/api/choral-membership/services/choral-membership.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* choral-membership service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::choral-membership.choral-membership');
|
||||
@@ -82,6 +82,12 @@
|
||||
},
|
||||
"website": {
|
||||
"type": "string"
|
||||
},
|
||||
"memberships": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::choral-membership.choral-membership",
|
||||
"mappedBy": "choral"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
"collectionName": "components_user_permissions",
|
||||
"info": {
|
||||
"displayName": "permissions",
|
||||
"icon": "key"
|
||||
"icon": "key",
|
||||
"description": ""
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
@@ -16,13 +17,10 @@
|
||||
"users"
|
||||
]
|
||||
},
|
||||
"active": {
|
||||
"canRead": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"read": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"write": {
|
||||
"canWrite": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,6 +169,12 @@
|
||||
"relation": "oneToMany",
|
||||
"target": "api::choral-permission.choral-permission",
|
||||
"mappedBy": "user"
|
||||
},
|
||||
"choral_memberships": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::choral-membership.choral-membership",
|
||||
"mappedBy": "user"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
6
types/generated/components.d.ts
vendored
6
types/generated/components.d.ts
vendored
@@ -3,16 +3,16 @@ import type { Schema, Struct } from '@strapi/strapi';
|
||||
export interface UserPermissions extends Struct.ComponentSchema {
|
||||
collectionName: 'components_user_permissions';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'permissions';
|
||||
icon: 'key';
|
||||
};
|
||||
attributes: {
|
||||
active: Schema.Attribute.Boolean;
|
||||
canRead: Schema.Attribute.Boolean;
|
||||
canWrite: Schema.Attribute.Boolean;
|
||||
module: Schema.Attribute.Enumeration<
|
||||
['information', 'chat', 'board', 'calendar', 'users']
|
||||
>;
|
||||
read: Schema.Attribute.Boolean;
|
||||
write: Schema.Attribute.Boolean;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
45
types/generated/contentTypes.d.ts
vendored
45
types/generated/contentTypes.d.ts
vendored
@@ -475,6 +475,42 @@ export interface ApiBoardBoard extends Struct.CollectionTypeSchema {
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiChoralMembershipChoralMembership
|
||||
extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'choral_memberships';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'ChoralMembership';
|
||||
pluralName: 'choral-memberships';
|
||||
singularName: 'choral-membership';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: false;
|
||||
};
|
||||
attributes: {
|
||||
choral: Schema.Attribute.Relation<'manyToOne', 'api::choral.choral'>;
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||
localizations: Schema.Attribute.Relation<
|
||||
'oneToMany',
|
||||
'api::choral-membership.choral-membership'
|
||||
> &
|
||||
Schema.Attribute.Private;
|
||||
permissions: Schema.Attribute.Component<'user.permissions', true>;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
role: Schema.Attribute.Enumeration<['member', 'admin', 'owner']>;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
user: Schema.Attribute.Relation<
|
||||
'manyToOne',
|
||||
'plugin::users-permissions.user'
|
||||
>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiChoralPermissionChoralPermission
|
||||
extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'choral_permissions';
|
||||
@@ -543,6 +579,10 @@ export interface ApiChoralChoral extends Struct.CollectionTypeSchema {
|
||||
'api::choral.choral'
|
||||
> &
|
||||
Schema.Attribute.Private;
|
||||
memberships: Schema.Attribute.Relation<
|
||||
'oneToMany',
|
||||
'api::choral-membership.choral-membership'
|
||||
>;
|
||||
name: Schema.Attribute.String;
|
||||
owner: Schema.Attribute.Relation<
|
||||
'oneToOne',
|
||||
@@ -1093,6 +1133,10 @@ export interface PluginUsersPermissionsUser
|
||||
>;
|
||||
blocked: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<false>;
|
||||
board: Schema.Attribute.Relation<'oneToOne', 'api::board.board'>;
|
||||
choral_memberships: Schema.Attribute.Relation<
|
||||
'oneToMany',
|
||||
'api::choral-membership.choral-membership'
|
||||
>;
|
||||
choral_permissions: Schema.Attribute.Relation<
|
||||
'oneToMany',
|
||||
'api::choral-permission.choral-permission'
|
||||
@@ -1167,6 +1211,7 @@ declare module '@strapi/strapi' {
|
||||
'api::board-card.board-card': ApiBoardCardBoardCard;
|
||||
'api::board-list.board-list': ApiBoardListBoardList;
|
||||
'api::board.board': ApiBoardBoard;
|
||||
'api::choral-membership.choral-membership': ApiChoralMembershipChoralMembership;
|
||||
'api::choral-permission.choral-permission': ApiChoralPermissionChoralPermission;
|
||||
'api::choral.choral': ApiChoralChoral;
|
||||
'api::event.event': ApiEventEvent;
|
||||
|
||||
Reference in New Issue
Block a user