2019-11-22 09:42:05 +00:00
|
|
|
module.exports = Self => {
|
2020-04-03 15:52:47 +00:00
|
|
|
require('../methods/worker-dms/downloadFile')(Self);
|
2019-11-22 09:42:05 +00:00
|
|
|
require('../methods/worker-dms/removeFile')(Self);
|
2020-04-03 15:52:47 +00:00
|
|
|
require('../methods/worker-dms/filter')(Self);
|
2023-05-29 13:21:37 +00:00
|
|
|
require('../methods/worker-dms/docuware')(Self);
|
2020-04-03 15:52:47 +00:00
|
|
|
|
|
|
|
Self.isMine = async function(ctx, dmsId) {
|
|
|
|
const myUserId = ctx.req.accessToken.userId;
|
|
|
|
let workerDms = await Self.findOne({
|
|
|
|
where: {
|
|
|
|
workerFk: myUserId,
|
|
|
|
dmsFk: dmsId
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return workerDms !== null;
|
|
|
|
};
|
2019-11-22 09:42:05 +00:00
|
|
|
};
|