# frozen_string_literal: true # encoding: utf-8 # Options: =begin Date: 2026-08-13 04:11:47 Version: 10.09 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net #MakePartial: True #MakeVirtual: True #MakeInternal: False #MakeDataContractsExtensible: False #AddReturnMarker: True #AddDescriptionAsComments: True #AddDataContractAttributes: False #AddIndexesToDataMembers: False #AddGeneratedCodeAttributes: False #AddResponseStatus: False #AddImplicitVersion: #InitializeCollections: False #ExportValueTypes: False IncludeTypes: CreateInterview.* #ExcludeTypes: #AddNamespaces: #AddDefaultXmlNamespace: http://schemas.servicestack.net/types =end require 'json' require 'servicestack' module EmploymentType FULL_TIME = 'FullTime' PART_TIME = 'PartTime' CASUAL = 'Casual' CONTRACT = 'Contract' end module JobApplicationStatus APPLIED = 'Applied' PHONE_SCREENING = 'PhoneScreening' PHONE_SCREENING_COMPLETED = 'PhoneScreeningCompleted' INTERVIEW = 'Interview' INTERVIEW_COMPLETED = 'InterviewCompleted' OFFER = 'Offer' DISQUALIFIED = 'Disqualified' end module IReturn def response_type() = T def get_type_name() = 'IReturn' end module ICreateDb end class JobApplicationAttachment include ServiceStack::DTO # @return [Integer] attr_accessor :id # @References('JobApplication') # @return [Integer] attr_accessor :job_application_id # @return [String] attr_accessor :file_name # @return [String] attr_accessor :file_path # @return [String] attr_accessor :content_type # @return [Integer] attr_accessor :content_length def self.properties { id: { name: 'id' }, job_application_id: { name: 'jobApplicationId' }, file_name: { name: 'fileName' }, file_path: { name: 'filePath' }, content_type: { name: 'contentType' }, content_length: { name: 'contentLength' }, } end end class AppUser include ServiceStack::DTO # @return [String] attr_accessor :id # @return [String] attr_accessor :first_name # @return [String] attr_accessor :last_name # @return [String] attr_accessor :display_name # @return [String] attr_accessor :profile_url def self.properties { id: { name: 'id' }, first_name: { name: 'firstName' }, last_name: { name: 'lastName' }, display_name: { name: 'displayName' }, profile_url: { name: 'profileUrl' }, } end end class Job < ServiceStack::AuditBase # @return [Integer] attr_accessor :id # @return [String] attr_accessor :title # @return [EmploymentType] attr_accessor :employment_type # @return [String] attr_accessor :company # @return [String] attr_accessor :location # @return [Integer] attr_accessor :salary_range_lower # @return [Integer] attr_accessor :salary_range_upper # @return [String] attr_accessor :description # @return [List] attr_accessor :applications # @return [DateTime] attr_accessor :closing def self.properties { id: { name: 'id' }, title: { name: 'title' }, employment_type: { name: 'employmentType' }, company: { name: 'company' }, location: { name: 'location' }, salary_range_lower: { name: 'salaryRangeLower' }, salary_range_upper: { name: 'salaryRangeUpper' }, description: { name: 'description' }, applications: { name: 'applications', type: [JobApplication] }, closing: { name: 'closing', type: DateTime }, } end end class Contact include ServiceStack::DTO # @return [Integer] attr_accessor :id # @Computed # @return [String] attr_accessor :display_name # @return [String] attr_accessor :profile_url # @return [String] attr_accessor :first_name # @return [String] attr_accessor :last_name # @return [Integer] attr_accessor :salary_expectation # @return [String] attr_accessor :job_type # @return [Integer] attr_accessor :availability_weeks # @return [EmploymentType] attr_accessor :preferred_work_type # @return [String] attr_accessor :preferred_location # @return [String] attr_accessor :email # @return [String] attr_accessor :phone # @return [List] attr_accessor :skills # @return [String] attr_accessor :about # @return [List] attr_accessor :applications def self.properties { id: { name: 'id' }, display_name: { name: 'displayName' }, profile_url: { name: 'profileUrl' }, first_name: { name: 'firstName' }, last_name: { name: 'lastName' }, salary_expectation: { name: 'salaryExpectation' }, job_type: { name: 'jobType' }, availability_weeks: { name: 'availabilityWeeks' }, preferred_work_type: { name: 'preferredWorkType' }, preferred_location: { name: 'preferredLocation' }, email: { name: 'email' }, phone: { name: 'phone' }, skills: { name: 'skills' }, about: { name: 'about' }, applications: { name: 'applications', type: [JobApplication] }, } end end class JobApplicationComment < ServiceStack::AuditBase # @return [Integer] attr_accessor :id # @References('AppUser') # @return [String] attr_accessor :app_user_id # @return [AppUser] attr_accessor :app_user # @References('JobApplication') # @return [Integer] attr_accessor :job_application_id # @return [String] attr_accessor :comment def self.properties { id: { name: 'id' }, app_user_id: { name: 'appUserId' }, app_user: { name: 'appUser', type: AppUser }, job_application_id: { name: 'jobApplicationId' }, comment: { name: 'comment' }, } end end class JobApplicationEvent < ServiceStack::AuditBase # @return [Integer] attr_accessor :id # @References('JobApplication') # @return [Integer] attr_accessor :job_application_id # @References('AppUser') # @return [String] attr_accessor :app_user_id # @return [AppUser] attr_accessor :app_user # @return [String] attr_accessor :description # @return [JobApplicationStatus] attr_accessor :status # @return [DateTime] attr_accessor :event_date def self.properties { id: { name: 'id' }, job_application_id: { name: 'jobApplicationId' }, app_user_id: { name: 'appUserId' }, app_user: { name: 'appUser', type: AppUser }, description: { name: 'description' }, status: { name: 'status' }, event_date: { name: 'eventDate', type: DateTime }, } end end class PhoneScreen < ServiceStack::AuditBase # @return [Integer] attr_accessor :id # @References('AppUser') # @return [String] attr_accessor :app_user_id # @return [AppUser] attr_accessor :app_user # @References('JobApplication') # @return [Integer] attr_accessor :job_application_id # @return [JobApplicationStatus] attr_accessor :application_status # @return [String] attr_accessor :notes def self.properties { id: { name: 'id' }, app_user_id: { name: 'appUserId' }, app_user: { name: 'appUser', type: AppUser }, job_application_id: { name: 'jobApplicationId' }, application_status: { name: 'applicationStatus' }, notes: { name: 'notes' }, } end end class Interview < ServiceStack::AuditBase # @return [Integer] attr_accessor :id # @return [DateTime] attr_accessor :booking_time # @References('JobApplication') # @return [Integer] attr_accessor :job_application_id # @References('AppUser') # @return [String] attr_accessor :app_user_id # @return [AppUser] attr_accessor :app_user # @return [JobApplicationStatus] attr_accessor :application_status # @return [String] attr_accessor :notes def self.properties { id: { name: 'id' }, booking_time: { name: 'bookingTime', type: DateTime }, job_application_id: { name: 'jobApplicationId' }, app_user_id: { name: 'appUserId' }, app_user: { name: 'appUser', type: AppUser }, application_status: { name: 'applicationStatus' }, notes: { name: 'notes' }, } end end class JobOffer < ServiceStack::AuditBase # @return [Integer] attr_accessor :id # @return [Integer] attr_accessor :salary_offer # @return [String] attr_accessor :currency # @References('JobApplication') # @return [Integer] attr_accessor :job_application_id # @References('AppUser') # @return [String] attr_accessor :app_user_id # @return [AppUser] attr_accessor :app_user # @return [String] attr_accessor :notes def self.properties { id: { name: 'id' }, salary_offer: { name: 'salaryOffer' }, currency: { name: 'currency' }, job_application_id: { name: 'jobApplicationId' }, app_user_id: { name: 'appUserId' }, app_user: { name: 'appUser', type: AppUser }, notes: { name: 'notes' }, } end end class JobApplication include ServiceStack::DTO # @return [Integer] attr_accessor :id # @References('Job') # @return [Integer] attr_accessor :job_id # @References('Contact') # @return [Integer] attr_accessor :contact_id # @return [Job] attr_accessor :position # @return [Contact] attr_accessor :applicant # @return [List] attr_accessor :comments # @return [DateTime] attr_accessor :applied_date # @return [JobApplicationStatus] attr_accessor :application_status # @return [List] attr_accessor :attachments # @return [List] attr_accessor :events # @return [PhoneScreen] attr_accessor :phone_screen # @return [Interview] attr_accessor :interview # @return [JobOffer] attr_accessor :job_offer def self.properties { id: { name: 'id' }, job_id: { name: 'jobId' }, contact_id: { name: 'contactId' }, position: { name: 'position', type: Job }, applicant: { name: 'applicant', type: Contact }, comments: { name: 'comments', type: [JobApplicationComment] }, applied_date: { name: 'appliedDate', type: DateTime }, application_status: { name: 'applicationStatus' }, attachments: { name: 'attachments', type: [JobApplicationAttachment] }, events: { name: 'events', type: [JobApplicationEvent] }, phone_screen: { name: 'phoneScreen', type: PhoneScreen }, interview: { name: 'interview', type: Interview }, job_offer: { name: 'jobOffer', type: JobOffer }, } end end # @ValidateRequest(Validator: "IsAuthenticated") class CreateInterview include ServiceStack::DTO # @Validate(Validator: "NotNull") # @return [DateTime] attr_accessor :booking_time # @Validate(Validator: "GreaterThan(0)") # @return [Integer] attr_accessor :job_application_id # @Validate(Validator: "GreaterThan(0)", Message: "An employee to perform interview must be selected.") # @return [String] attr_accessor :app_user_id # @return [JobApplicationStatus] attr_accessor :application_status def self.properties { booking_time: { name: 'bookingTime', type: DateTime }, job_application_id: { name: 'jobApplicationId' }, app_user_id: { name: 'appUserId' }, application_status: { name: 'applicationStatus' }, } end def response_type() = Interview def get_type_name() = 'CreateInterview' def get_method() = 'POST' end