initial commit

This commit is contained in:
felix
2026-09-16 17:16:19 +02:00
commit d120237521
80 changed files with 26582 additions and 0 deletions

12
app/models/account.js Normal file
View File

@@ -0,0 +1,12 @@
import Model, { attr, belongsTo } from '@warp-drive/legacy/model';
export default class Account extends Model {
@attr() voId;
@attr() provider;
@belongsTo('gebruiker', {
async: true,
inverse: null,
})
gebruiker;
}

View File

@@ -0,0 +1,7 @@
import Model, { attr } from '@warp-drive/legacy/model';
export default class BestuurseenheidClassificatieCode extends Model {
@attr() label;
@attr() scopeNote;
@attr() uri;
}

View File

@@ -0,0 +1,15 @@
import Model, { attr, belongsTo } from '@warp-drive/legacy/model';
export default class Bestuurseenheid extends Model {
@attr() naam;
@belongsTo('bestuurseenheid-classificatie-code', {
async: true,
inverse: null,
})
classificatie;
get fullName() {
return `${this.classificatie.get('label')} ${this.naam}`.trim();
}
}

7
app/models/chat-agent.js Normal file
View File

@@ -0,0 +1,7 @@
import Model, { attr } from '@warp-drive/legacy/model';
export default class ChatAgent extends Model {
@attr uri;
@attr name;
@attr description;
}

View File

@@ -0,0 +1,16 @@
import Model, { attr, belongsTo, hasMany } from '@warp-drive/legacy/model';
export default class ChatConversation extends Model {
@attr uri;
@attr title;
@attr('date') created;
@attr('date') lastActivity;
@belongsTo('gebruiker', { async: true, inverse: null }) creator;
@hasMany('chat-message', {
async: false,
inverse: 'conversation',
polymorphic: true,
})
messages;
}

View File

@@ -0,0 +1,8 @@
import Model, { attr } from '@warp-drive/legacy/model';
export default class ChatDocument extends Model {
@attr uri;
@attr name;
@attr mediaType;
@attr url;
}

View File

@@ -0,0 +1,3 @@
import ChatMessage from './chat-message';
export default class ChatInstantMessage extends ChatMessage {}

View File

@@ -0,0 +1,16 @@
import Model, { attr, belongsTo, hasMany } from '@warp-drive/legacy/model';
export default class ChatMessage extends Model {
@attr uri;
@attr content;
@attr('date') created;
@attr maker;
@belongsTo('chat-conversation', {
async: false,
inverse: 'messages',
as: 'chat-message',
})
conversation;
@hasMany('chat-document', { async: false, inverse: null }) attachments;
}

27
app/models/gebruiker.js Normal file
View File

@@ -0,0 +1,27 @@
import Model, { attr, hasMany } from '@warp-drive/legacy/model';
export default class Gebruiker extends Model {
@attr uri;
@attr() voornaam;
@attr() achternaam;
@hasMany('account', {
async: true,
inverse: null,
})
account;
@hasMany('bestuurseenheid', {
async: true,
inverse: null,
})
bestuurseenheden;
get group() {
return this.hasMany('bestuurseenheden').value()[0];
}
get fullName() {
return `${this.voornaam} ${this.achternaam}`.trim();
}
}