Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DR-16676-add-models-for-all-resources] add missing models and proper… #69

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/models/ad-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ export default {
attributes: {
name: '',
sort: 0,
'search-landingpages': {
jsonApi: 'hasOne',
type: 'search-landingpage',
},
},
};
12 changes: 12 additions & 0 deletions src/models/address.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default {
name: 'address',
attributes: {
street: '',
zipcode: '',
city: '',
state: null,
country: '',
lat: 0,
lng: 0,
},
};
7 changes: 7 additions & 0 deletions src/models/admin-notification.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
name: 'admin-notification',
attributes: {},
options: {
collectionPath: 'notifications/admin',
},
};
9 changes: 9 additions & 0 deletions src/models/admin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
name: 'admin',
attributes: {
uuid: '',
email: '',
domain_id: '',
type: '',
},
};
6 changes: 6 additions & 0 deletions src/models/benefit-category.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
name: 'benefit-category',
attributes: {
name: '',
},
};
5 changes: 5 additions & 0 deletions src/models/benefit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ export default {
attributes: {
sort: 0,
name: '',
category_id: '',
title: '',
'benefit-category': {
jsonApi: 'hasOne',
type: 'benefit-category',
},
},
};
8 changes: 8 additions & 0 deletions src/models/category.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@ export default {
attributes: {
name: '',
sort: 0,
'search-landingpages': {
jsonApi: 'hasOne',
type: 'search-landingpage',
},
subcategories: {
jsonApi: 'hasMany',
type: 'subcategory',
},
},
};
16 changes: 16 additions & 0 deletions src/models/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default {
name: 'client',
id: '',
attributes: {
name: '',
address: {
street: '',
zipcode: '',
city: '',
state: '',
country: '',
lat: 0,
lng: 0,
},
},
};
49 changes: 33 additions & 16 deletions src/models/company.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,41 @@ export default {
name: 'company',
id: '',
attributes: {
domain_id: '',
name: '',
description: null,
domain_id: '',
description: '',
publication_count: 0,
address: null,
address: {
street: '',
zipcode: '',
city: '',
state: '',
country: '',
lat: 0,
lng: 0,
},
contact: {},
logo_list_url: null,
logo_profile_url: null,
logo_profile_fb_url: null,
employer_branding_profile_url: null,
phone: null,
fax: null,
website_url: null,
facebook_url: null,
staffing_services: '',
external_hrtool: false,
collective_account: false,
employees: null,
header_url: null,
header_image_id: null,
banner_exclusive_url: null,
banner_region_url: null,
banner_instructor_url: null,
logo_profile_fb_url: null,
company_is_public: false,
phone: '',
fax: '',
website_url: '',
facebook_url: '',
staffing_services: '',
external_hrtool: false,
collective_account: false,
employees: 0,
show_employees: false,
company_is_public: true,
use_new_jobmanagement: false,
create_time: '',
'active-flatrates': {
jsonApi: 'hasMany',
type: 'active-flatrate',
Expand All @@ -46,7 +59,7 @@ export default {
},
employers: {
jsonApi: 'hasMany',
type: 'user',
type: 'employer',
},
industry: {
jsonApi: 'hasOne',
Expand All @@ -64,21 +77,25 @@ export default {
jsonApi: 'hasOne',
type: 'company',
},
primaryDomain: {
'primary-domain': {
jsonApi: 'hasOne',
type: 'domain',
},
publications: {
jsonApi: 'hasMany',
type: 'publication',
},
socialMediaLinks: {
'social-media-links': {
jsonApi: 'hasMany',
type: 'social-media-link',
},
subscriptions: {
jsonApi: 'hasMany',
type: 'subscription',
},
'gallery-pictures': {
jsonApi: 'hasMany',
type: 'gallery-picture',
},
},
};
18 changes: 18 additions & 0 deletions src/models/description-video.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default {
name: 'description-video',
attributes: {
video_id: '',
title: '',
description: '',
embed_url: '',
service: '',
show_in_profile: false,
is_favorite: false,
sort: 0,
thumbnail_url: '',
company: {
jsonApi: 'hasOne',
type: 'company',
},
},
};
12 changes: 12 additions & 0 deletions src/models/employer-notification-settings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default {
name: 'notifications-employer',
attributes: {
user_uuid: '',
company_id: '',
type: '',
schedule: '',
},
options: {
collectionPath: 'settings',
},
};
12 changes: 12 additions & 0 deletions src/models/employer-notification.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default {
name: 'employer-notification',
attributes: {
user_uuid: '',
company_id: '',
type: '',
schedule: '',
},
options: {
collectionPath: 'notifications/employer',
},
};
28 changes: 28 additions & 0 deletions src/models/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import activeFlatrate from './active-flatrate';
import address from './address';
import adTypeModel from './ad-type';
import admin from './admin';
import adminNotification from './admin-notification';
import applicationModel from './application';
import benefitModel from './benefit';
import categoryModel from './category';
Expand All @@ -14,6 +17,8 @@ import professionModel from './profession';
import featureModel from './feature';
import industryModel from './industry';
import jobAdModel from './job-ad';
import jobAdEmploymentTypeModel from './job-ad-employment-type';
import jobAdWorkingTimeModel from './job-ad-working-time';
import jobPublicationModel from './job-publication';
import jobModel from './job';
import jobTypeModel from './job-type';
Expand All @@ -30,34 +35,57 @@ import topJobModel from './top-job';
import userModel from './user';
import workExperienceModel from './work-experience';
import workingTimesModel from './working-times';
import client from './client';
import descriptionVideo from './description-video';
import employerNotificationSettings from './employer-notification-settings';
import employerNotification from './employer-notification';
import location from './location';
import notificationsAdmin from './notifications-admin';
import searchJobResult from './search-job-result';
import searchJob from './search-job';
import searchPublicationResult from './search-publication-result';

export default [
activeFlatrate,
address,
adTypeModel,
admin,
adminNotification,
applicationModel,
benefitModel,
categoryModel,
client,
companyModel,
contactModel,
contractTypeModel,
customLandingpageModel,
domainModel,
descriptionVideo,
educationModel,
employmentTypeModel,
employerNotificationSettings,
employerNotification,
professionModel,
featureModel,
industryModel,
jobAdModel,
jobAdEmploymentTypeModel,
jobAdWorkingTimeModel,
jobPublicationModel,
jobModel,
jobTypeModel,
location,
mediaModel,
notificationsAdmin,
pictureModel,
publicationModel,
qualificationModel,
regionLandingpageModel,
searchAgentModel,
searchCompanyModel,
searchJob,
searchJobResult,
searchPublicationResult,
socialMediaLinkModel,
subCategoryModel,
topJobModel,
Expand Down
4 changes: 4 additions & 0 deletions src/models/industry.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ export default {
attributes: {
name: '',
sort: 0,
searchLandingpages: {
jsonApi: 'hasMany',
type: 'searchLandingpages',
},
},
};
10 changes: 10 additions & 0 deletions src/models/job-ad-employment-type.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default {
name: 'job-ad-employment-type',
attributes: {
title: '',
structured_data_key: '',
},
options: {
collectionPath: 'job-ads/employment-types',
},
};
10 changes: 10 additions & 0 deletions src/models/job-ad-working-time.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default {
name: 'job-ad-working-time',
attributes: {
title: '',
structured_data_key: '',
},
options: {
collectionPath: 'job-ads/working-times',
},
};
Loading