/* eslint-disable camelcase,no-unused-vars,new-cap,no-undef,comma-dangle */
// This file is generated automatically and contain definition for code insight.
// It ignored by UnityBase server because name start from "_".
// Do not modify this file directly, instead run `ubcli createCodeInsightHelper -u root`

/**
 * Asynchronous task queue persisted into database. Contains jobs for sending e-mail and updating FTS indexes
 *
 * @version 5.23.60
 * @module @unitybase/ubq
 */

/**
 * Mail attachment.
 * Store attachments posted by producers. Consumers read documents from this table and use in corresponding tasks
 *
 * @augments EntityNamespace
 * @mixes mStorage
 */
class ubq_mailAttachment_ns extends EntityNamespace {}

/**
 * @typedef ubqMailAttachmentAttrs
 * @type {object}
 * @property {number} ID
 * @property {string} attachment - Attachment
 * @property {number|ubaUserAttrs} mi_owner
 * @property {Date} mi_createDate
 * @property {number|ubaUserAttrs} mi_createUser
 * @property {Date} mi_modifyDate
 * @property {number|ubaUserAttrs} mi_modifyUser
 */

/**
 * Attributes defined in metadata. Property does not exist in real life and added for IDE
 *
 * @type {ubqMailAttachmentAttrs}
 */
ubq_mailAttachment_ns.attrs = {}

/**
 * Mail attachment.
 * Store attachments posted by producers. Consumers read documents from this table and use in corresponding tasks
 *
 * @type {ubq_mailAttachment_ns}
 */
const ubq_mailAttachment = new ubq_mailAttachment_ns()
/**
 * Messages queue.
 * Store messages posted by producers. Consumers read messages from this table and run corresponding tasks
 *
 * @augments EntityNamespace
 * @mixes mStorage
 */
class ubq_messages_ns extends EntityNamespace {}

/**
 * @typedef ubqMessagesAttrs
 * @type {object}
 * @property {number} ID
 * @property {string} queueCode - Queue code
 * @property {string} msgCmd - Command
 * @property {string} msgData - Message data
 * @property {number} msgPriority - Priority
 * @property {Date} completeDate - Complete date
 * @property {number|ubaUserAttrs} mi_owner
 * @property {Date} mi_createDate
 * @property {number|ubaUserAttrs} mi_createUser
 * @property {Date} mi_modifyDate
 * @property {number|ubaUserAttrs} mi_modifyUser
 */

/**
 * Attributes defined in metadata. Property does not exist in real life and added for IDE
 *
 * @type {ubqMessagesAttrs}
 */
ubq_messages_ns.attrs = {}

/**
 * Messages queue.
 * Store messages posted by producers. Consumers read messages from this table and run corresponding tasks
 *
 * @type {ubq_messages_ns}
 */
const ubq_messages = new ubq_messages_ns()
/**
 * Scheduler run statistic.
 * Statistic for every scheduler item run and result
 *
 * @augments EntityNamespace
 * @mixes mStorage
 */
class ubq_runstat_ns extends EntityNamespace {}

/**
 * @typedef ubqRunstatAttrs
 * @type {object}
 * @property {number} ID
 * @property {string} appName - Application name
 * @property {string} schedulerName - Scheduler name
 * @property {Date} startTime - Time of start scheduler item
 * @property {Date} endTime - Time of end scheduler item
 * @property {string} logText - Log from runned script about all actions
 * @property {number} resultError - Result error code. 0=No error
 * @property {string} resultErrorMsg - Error text message if resultError > 1
 */

/**
 * Attributes defined in metadata. Property does not exist in real life and added for IDE
 *
 * @type {ubqRunstatAttrs}
 */
ubq_runstat_ns.attrs = {}

/**
 * Scheduler run statistic.
 * Statistic for every scheduler item run and result
 *
 * @type {ubq_runstat_ns}
 */
const ubq_runstat = new ubq_runstat_ns()
/**
 * Scheduled jobs.
 * Virtual entity for show configured schedulers. Schedulers are placed in files MODEL_FOLDER/_schedulers.json. To override a existed scheduler do not modify it directly, instead create the scheduler with the same name inside your model
 *
 * @augments EntityNamespace
 */
class ubq_scheduler_ns extends EntityNamespace {}

/**
 * @typedef ubqSchedulerAttrs
 * @type {object}
 * @property {number} ID - ID
 * @property {string} name - Job name
 * @property {string} schedulingCondition - Condition to schedule a job
 * @property {string} cron - Cron record
 * @property {string} description - Description
 * @property {string} command - Command
 * @property {string} module - Module
 * @property {boolean} singleton - Singleton
 * @property {string} runAs - runAs
 * @property {boolean} logSuccessful - Log a Successful execution
 * @property {boolean} overridden - Overridden
 * @property {string} originalModel - OriginalModel
 * @property {string} actualModel - Actual model
 */

/**
 * Attributes defined in metadata. Property does not exist in real life and added for IDE
 *
 * @type {ubqSchedulerAttrs}
 */
ubq_scheduler_ns.attrs = {}

/**
 * Scheduled jobs.
 * Virtual entity for show configured schedulers. Schedulers are placed in files MODEL_FOLDER/_schedulers.json. To override a existed scheduler do not modify it directly, instead create the scheduler with the same name inside your model
 *
 * @type {ubq_scheduler_ns}
 */
const ubq_scheduler = new ubq_scheduler_ns()