You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
924 B
32 lines
924 B
const { Model } = require('flitter-orm')
|
|
|
|
class ApplicationModel extends Model {
|
|
static get schema() {
|
|
return {
|
|
name: String,
|
|
identifier: String,
|
|
description: String,
|
|
active: { type: Boolean, default: true },
|
|
saml_service_provider_ids: [String],
|
|
ldap_client_ids: [String],
|
|
oauth_client_ids: [String],
|
|
openid_client_ids: [String],
|
|
}
|
|
}
|
|
|
|
async to_api() {
|
|
return {
|
|
id: this.id,
|
|
name: this.name,
|
|
identifier: this.identifier,
|
|
description: this.description,
|
|
saml_service_provider_ids: this.saml_service_provider_ids,
|
|
ldap_client_ids: this.ldap_client_ids,
|
|
oauth_client_ids: this.oauth_client_ids,
|
|
openid_client_ids: this.openid_client_ids,
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = exports = ApplicationModel
|