2021-08-07 17:03:06 +00:00
|
|
|
//
|
|
|
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License. You may
|
|
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
//
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
|
|
|
import { plugin } from '@anticrm/platform'
|
|
|
|
import type { Plugin, Asset } from '@anticrm/platform'
|
2021-09-26 09:16:55 +00:00
|
|
|
import type { Space, SpaceWithStates, Doc, Ref, State, Bag, Class } from '@anticrm/core'
|
2021-08-07 17:03:06 +00:00
|
|
|
import type { Person } from '@anticrm/contact'
|
2021-08-31 14:54:47 +00:00
|
|
|
import type { Attachment } from '@anticrm/chunter'
|
2021-08-07 17:03:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2021-09-22 08:41:03 +00:00
|
|
|
export interface Vacancy extends SpaceWithStates {}
|
2021-08-07 17:03:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface Candidates extends Space {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2021-08-31 14:54:47 +00:00
|
|
|
export interface Candidate extends Person {
|
2021-09-12 14:47:49 +00:00
|
|
|
title?: string
|
2021-09-15 17:03:34 +00:00
|
|
|
attachments: Bag<Attachment>
|
2021-08-31 14:54:47 +00:00
|
|
|
}
|
2021-08-07 17:03:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export interface Applicant extends Doc {
|
|
|
|
candidate: Ref<Candidate>
|
2021-09-05 12:03:33 +00:00
|
|
|
state: Ref<State>
|
2021-08-07 17:03:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
export const recruitId = 'recruit' as Plugin
|
|
|
|
|
|
|
|
export default plugin(recruitId, {
|
2021-09-26 09:16:55 +00:00
|
|
|
class: {
|
|
|
|
Applicant: '' as Ref<Class<Applicant>>
|
|
|
|
},
|
2021-08-07 17:03:06 +00:00
|
|
|
icon: {
|
|
|
|
RecruitApplication: '' as Asset,
|
|
|
|
Vacancy: '' as Asset
|
|
|
|
}
|
|
|
|
})
|