* chore: 🤖 Rename recording to session-recording * chore: 🤖 Update names for connection models * chore: 🤖 Update channel models to new name * chore: 🤖 Update remaining models after merge conflict
28 lines
747 B
JavaScript
28 lines
747 B
JavaScript
import GeneratedChannelRecordingModel from '../generated/models/channel-recording';
|
|
import { belongsTo } from '@ember-data/model';
|
|
|
|
export const TYPE_CHANNEL_RECORDING_SESSION = 'session';
|
|
export const TYPES_CHANNEL_RECORDING = Object.freeze([
|
|
TYPE_CHANNEL_RECORDING_SESSION,
|
|
]);
|
|
|
|
export default class ChannelRecordingModel extends GeneratedChannelRecordingModel {
|
|
@belongsTo('connection-recording') connection_recording;
|
|
|
|
/**
|
|
* True if the channel type is `session`.
|
|
* @type {boolean}
|
|
*/
|
|
get isSession() {
|
|
return this.type === TYPE_CHANNEL_RECORDING_SESSION;
|
|
}
|
|
|
|
/**
|
|
* True if the channel is an unknown type.
|
|
* @type {boolean}
|
|
*/
|
|
get isUnknown() {
|
|
return !TYPES_CHANNEL_RECORDING.includes(this.type);
|
|
}
|
|
}
|