refactor: define user groups in an extra file

This commit is contained in:
Jovan Krunić
2021-07-21 14:39:51 +02:00
parent 148fd77f4d
commit 5377d026f3
2 changed files with 24 additions and 10 deletions

View File

@@ -0,0 +1,21 @@
/*
* Copyright (C) 2021 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* Types of data consumers
*/
export type SCUserGroup =
'students'
| 'employees'
| 'guests';

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019 StApps * Copyright (C) 2019-2021 StApps
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free * under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3. * Software Foundation, version 3.
@@ -22,6 +22,7 @@ import {
} from './abstract/creative-work'; } from './abstract/creative-work';
import {SCThingMeta, SCThingType} from './abstract/thing'; import {SCThingMeta, SCThingType} from './abstract/thing';
import {SCThingThatCanBeOfferedTranslatableProperties} from './abstract/thing-that-can-be-offered'; import {SCThingThatCanBeOfferedTranslatableProperties} from './abstract/thing-that-can-be-offered';
import {SCUserGroup} from './abstract/user-groups';
import {SCOrganizationWithoutReferences} from './organization'; import {SCOrganizationWithoutReferences} from './organization';
/** /**
@@ -39,7 +40,7 @@ export interface SCMessageWithoutReferences
* *
* @filterable * @filterable
*/ */
audiences: SCMessageAudience[]; audiences: SCUserGroup[];
/** /**
* When the message was created * When the message was created
@@ -90,14 +91,6 @@ export interface SCMessage
type: SCThingType.Message; type: SCThingType.Message;
} }
/**
* Audiences for messages
*/
export type SCMessageAudience =
'students'
| 'employees'
| 'guests';
/** /**
* Translatable properties of a message * Translatable properties of a message
*/ */