o
    q;]h                     @   s   d dl Z d dlmZ d dlmZ d dlmZ d dlZd dlm	Z	 d dl
mZ d dlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ G dd	 d	eZdS )
    N)BaseCommand)ContentFile)slugify)BytesIO)settings)CourseCourseEligibility	CourseFee	FeeDetail	HostelFeeSemesterSubjectCareerProspectAdmissionStepDirectAdmission	RecruiterWhyJoinCourseHighlightCourseImageTestimonialc                   @   sh   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dd Z
dd Zdd Zdd Zdd ZdS )Commandz9Creates comprehensive content for all Engineering coursesc                 O   s   | j | jd tjjg ddd}|D ]H}| j d|j d | 	| | 
| | | | | | | | | | | | | | | | j | jd|j  q| j | jd d S )	Nz2Starting to create content for Engineering courses)zCivil Engineeringz'Electronics & Communication Engineeringz$Electrical & Electronics EngineeringzMechanical Engineering)category__inidz
--- Creating content for: z ---u   ✓ Completed content for u?   
🎉 Successfully created content for all Engineering courses!)stdoutwritestyleSUCCESSr   objectsfilterorder_bytitle_create_semesters_and_subjects_create_career_prospects_create_admission_steps_create_direct_admission_create_fee_details_create_hostel_fee_create_recruiters_create_why_join_create_testimonials)selfargsoptionsengineering_coursescourse r/   K/var/www/apihucms/courses/management/commands/create_engineering_content.pyhandle   s&   	








zCommand.handlec              	   C   s   d|j v rd}nd|j v rd}nd|j v rd}n
d|jv r d}nd}td|d D ]2}tjj||d	d
| id\}}| ||}|D ]}tjj||d |d	 |d |d dd qCq)dS )z2Create semesters and subjects based on course typez4 Years   z3 Years   z2 Years   Ph.D   namez	Semester )r.   numberdefaultscodecreditsdescription)r7   r;   r<   )semesterr:   r9   N)durationr    ranger   r   get_or_create_get_subjects_for_semesterr   )r*   r.   num_semesterssem_numr=   createdsubjectssubject_datar/   r/   r0   r!   A   s6   




z&Command._create_semesters_and_subjectsc              
   C   s  ddddddddd	dd
ddddddddddddddgddddddddddddddddddddgd }d!|j v rd"d#dd$dd%d&dd'dd(d)dd*dd+d,dd-dgd.d/dd0dd1d2dd3dd4d5dd6dd7d8dd9dgd:d;dd<dd=d>dd?dd@dAddBdgdCdDddEddFdGddHddIdJddKdgdL}|| n4dM|j v r	dNdOddPddQdRddSddTdUddVddWdXddYdgdZd[dd\dd]d^dd_dd`daddbddcddddedgdfdgddhddidjddkddldmddndgdodpddqddrdsddtddudvddwdgdL}|| ndx|j v rpdydzdd{dd|d}dd~dddOddddddddgdddddddddddddddddddddgdddddddddddddddgdddddddddddddddgdL}|| nfd|j v rddddddd#ddddd&ddddddddgddddddddddddddddddddgdddddddddddddddgdddddddddddddddgdL}|| ||g S )z.Get subjects based on course type and semesterMA101zEngineering Mathematics Ir4   z?Calculus, differential equations, linear algebra, and matrices.)r:   r7   r;   r<   PH101zEngineering Physics   z=Mechanics, thermodynamics, waves, optics, and modern physics.CH101zEngineering ChemistryzBAtomic structure, chemical bonding, thermodynamics, and materials.HU101zCommunication Skills   z@English proficiency, technical writing, and presentation skills.ME101zEngineering GraphicszBTechnical drawing, orthographic projections, and CAD fundamentals.MA102zEngineering Mathematics IIzGAdvanced calculus, vector calculus, and partial differential equations.PH102zApplied PhysicszEElectromagnetic theory, quantum mechanics, and semiconductor physics.CS101zComputer Programmingz>Programming fundamentals using C language and problem solving.HU102zProfessional EthicszCEngineering ethics, professional responsibility, and social impact.)r6   rL   CivilCE301zStrength of MaterialszEStress, strain, bending moment, shear force, and deflection analysis.CE302zFluid MechanicszCFluid properties, hydrostatics, fluid flow, and Bernoulli equation.CE303zBuilding MaterialszHProperties of cement, concrete, steel, and other construction materials.CE304	SurveyingzOPrinciples of surveying, leveling, theodolite, and modern surveying techniques.CE401zStructural AnalysiszKAnalysis of determinate and indeterminate structures using various methods.CE402zGeotechnical EngineeringzDSoil mechanics, foundation engineering, and earth pressure analysis.CE403zConcrete Technologyz>Concrete mix design, properties, testing, and quality control.CE404zTransportation EngineeringzFHighway engineering, traffic engineering, and transportation planning.CE501zDesign of Steel StructureszBDesign of steel beams, columns, connections, and steel structures.CE502zDesign of Concrete Structuresz;RCC design principles, beams, slabs, columns, and footings.CE503zWater Resources Engineeringz<Hydrology, irrigation engineering, and water supply systems.CE601zEnvironmental EngineeringzKWater treatment, wastewater treatment, and environmental pollution control.CE602zProject ManagementzHConstruction planning, scheduling, cost estimation, and project control.CE603zEarthquake EngineeringzGSeismic analysis, earthquake-resistant design, and structural dynamics.)rI   r4      r3   Electronics & CommunicationEC301zElectronic DeviceszDSemiconductor physics, diodes, transistors, and FET characteristics.EC302zNetwork AnalysiszBCircuit analysis techniques, network theorems, and AC/DC circuits.EC303zDigital ElectronicszDBoolean algebra, logic gates, combinational and sequential circuits.EC304zSignals and SystemszLTime and frequency domain analysis, Fourier transforms, and system analysis.EC401zAnalog CircuitszJAmplifier design, operational amplifiers, and analog circuit applications.EC402MicroprocessorszD8085/8086 microprocessor architecture, programming, and interfacing.EC403zCommunication SystemszLAnalog and digital communication, modulation techniques, and noise analysis.EC404zControl Systemsz;System modeling, stability analysis, and controller design.EC501zVLSI Designz;IC fabrication, digital VLSI design, and layout techniques.EC502zDigital Signal ProcessingzFDiscrete signals, Z-transforms, digital filters, and DSP applications.EC503zEmbedded SystemszJMicrocontroller programming, real-time systems, and embedded applications.EC601zWireless Communicationz?Mobile communication, cellular systems, and wireless protocols.EC602zOptical Communicationz9Fiber optic communication systems and optical networking.EC603zAntenna Theoryz;Antenna principles, radiation patterns, and antenna design.
ElectricalEE301zElectrical Machines Iz:DC machines, transformers, and their performance analysis.EE302zCircuit Analysisz8AC/DC circuit analysis, network theorems, and resonance.EE303zFSemiconductor devices, diodes, transistors, and their characteristics.EE304zElectrical Measurementsz=Measurement techniques, instruments, and measurement systems.EE401zElectrical Machines IIz?Induction machines, synchronous machines, and special machines.EE402zPower Electronicsz7Power semiconductor devices, converters, and inverters.EE403z;System modeling, stability analysis, and automatic control.EE404zElectromagnetic FieldszFMaxwell equations, electromagnetic wave propagation, and applications.EE501zPower Systems IzBPower generation, transmission lines, and power system components.EE502zIndustrial Drivesz7Motor drives, speed control, and industrial automation.EE503zRenewable Energy Systemsz5Solar, wind, and other renewable energy technologies.EE601zPower Systems IIz@Power system protection, stability, and smart grid technologies.EE602zHigh Voltage Engineeringz;High voltage phenomena, insulation, and testing techniques.EE603zElectric Vehicle Technologyz<EV systems, battery technology, and charging infrastructure.
MechanicalME301Thermodynamicsz<Laws of thermodynamics, cycles, and thermodynamic processes.ME302z@Stress, strain, bending, torsion, and material failure theories.ME303zBFluid properties, flow analysis, and fluid machinery fundamentals.ME304zManufacturing ProcesseszACasting, forming, machining, and modern manufacturing techniques.ME401zHeat Transferz=Conduction, convection, radiation, and heat exchanger design.ME402zMachine DesignzDDesign of machine elements, gears, bearings, and mechanical systems.ME403zInternal Combustion Enginesz=Engine cycles, combustion, performance, and emission control.ME404zDynamics of Machinesz;Kinematics, dynamics, and vibration analysis of mechanisms.ME501zCAD/CAMz:Computer-aided design, manufacturing, and CNC programming.ME502z Refrigeration & Air Conditioningz7Refrigeration cycles, HVAC systems, and psychrometrics.ME503zIndustrial Engineeringz5Work study, production planning, and quality control.ME601zAutomation & Roboticsz>Industrial automation, robotics, and programmable controllers.ME602zFinite Element Analysisz;FEA principles, modeling, and structural analysis software.ME603zAutomotive Engineeringz=Vehicle systems, chassis design, and automotive technologies.)r    updateget)r*   r.   semester_numfoundation_subjectscivil_subjectsece_subjectseee_subjectsme_subjectsr/   r/   r0   rA   d   s   

z"Command._get_subjects_for_semesterc                 C   s  d|j v r8d|j v r!ddddddd	dd
dddddddg}nddddddddddddddddg}nd|j v rpd|j v rYddddddddd d!d"dd#dd$dg}nd%dd&dd'd(d)dd*dd+dd,dd-dg}nd.|j v rd|j v rd/d0d1dddd2dd3d!d4dd5d6d7dg}ned8dd9dd:dd;dd<d=d>dd?dd@dg}nNdA|j v rd|j v rdBddCddddDddEdFdGddHdIdJdg}n-dKddLddMddNddOddPddQddRdg}ndSddTddUddVddWddXddYddZdg}|D ]}tjj||d[ |d\ |d] d^d_ qd`S )az,Create career prospects based on course typerR   r5   zResearch Scientistu   ₹8-20 LPAzFConduct advanced research in civil engineering and structural systems.)r    salary_ranger<   zProfessor/Academicu   ₹6-18 LPAz?Teaching and research positions in universities and institutes.zR&D Engineeru   ₹10-25 LPAzFResearch and development in construction and infrastructure companies.zConsulting Engineeru   ₹12-30 LPAz>Independent consulting in specialized civil engineering areas.zStructural Engineeru   ₹4-15 LPAz@Design and analysis of buildings, bridges, and other structures.zConstruction Manageru   ₹5-18 LPAz<Manage construction projects and coordinate site activities.zTransportation Engineeru   ₹4-14 LPAzDDesign highways, traffic systems, and transportation infrastructure.zEnvironmental Engineeru   ₹4-16 LPAzFWork on water treatment, waste management, and environmental projects.rc   z Research Scientist (Electronics)zLAdvanced research in VLSI, communication systems, and emerging technologies.z?Teaching and research in universities and technical institutes.zPrincipal Engineeru   ₹15-35 LPAzBLead technical teams in semiconductor and communication companies.zInnovation Consultantz0Technology consulting and innovation management.zElectronics Engineerz3Design and develop electronic circuits and systems.zVLSI Design Engineeru   ₹6-20 LPAz5Design integrated circuits and semiconductor devices.zCommunication Engineerz6Work on wireless communication and networking systems.zEmbedded Systems Engineerz2Develop embedded systems for various applications.rs   zPower Systems Researcheru   ₹10-24 LPAz=Research in smart grids, renewable energy, and power systems.z9Academic positions in electrical engineering departments.zChief Engineerz9Senior technical positions in power and energy companies.zEnergy Consultantu   ₹12-28 LPAz9Consulting in renewable energy and power system projects.zElectrical Engineerz5Design and maintain electrical systems and equipment.zPower Systems Engineerz9Work on power generation, transmission, and distribution.zControl Systems Engineeru   ₹5-17 LPAz0Design automated control systems for industries.zRenewable Energy Engineerz9Develop solar, wind, and other renewable energy projects.r   z Manufacturing Research Scientistz1Research in advanced manufacturing and materials.z0Teaching and research in mechanical engineering.zChief Technology Officeru   ₹20-40 LPAz?Technical leadership in automotive and manufacturing companies.zInnovation Manageru   ₹15-32 LPAz7Lead innovation and technology development initiatives.zMechanical Engineerz4Design and develop mechanical systems and machinery.zManufacturing Engineerz8Optimize manufacturing processes and production systems.zAutomotive Engineerz3Work on vehicle design and automotive technologies.zProject Engineerz:Manage engineering projects and technical implementations.Engineerz<Work in engineering design, development, and implementation.zTechnical Specialistz=Provide technical expertise in specialized engineering areas.zProject Coordinatorz9Coordinate technical projects and engineering activities.zQuality Engineerz?Ensure quality standards in engineering processes and products.r    r   r<   )r   r<   r.   r    r9   N)r    r   r   r@   )r*   r.   	prospectsprospect_datar/   r/   r0   r"      s|   








































	


z Command._create_career_prospectsc                 C   sp  d|j v r!ddddddddd	d
ddddddddddg}n~d|j v rBddddddddddddddddddddg}n]d|j v rcddddd d!ddd"d#ddd$d%ddd&d'ddg}n<d(|j v rd)d*ddd+d,ddd-d.ddd/d0ddd1d2ddg}nd3d4dddd5dddd6ddd7d8ddd9d:ddg}|D ]}tjj||d; |d< d=|d= id> qd?S )@z%Create admission steps for the courseLEzEligibility VerificationzOEnsure completion of diploma in relevant engineering field with required marks.r6   )r    r<   orderzApplication SubmissionzDSubmit online application with diploma certificates and transcripts.rL   zLateral Entry TestzAAppear for lateral entry examination covering diploma curriculum.rI   zMerit List & CounselingzCCheck merit list and participate in counseling for seat allocation.r4   z!Document Verification & AdmissionzJComplete document verification and admission formalities with fee payment.rb   r5   zResearch Proposalz>Prepare and submit research proposal in your area of interest.zEntrance Examinationz6Qualify university research entrance test or NET/GATE.zInterview & PresentationzBPresent research proposal and attend interview with faculty panel.zSupervisor Allocationz8Get assigned research supervisor based on research area.zRegistration & Enrollmentz:Complete registration formalities and begin research work.M.TechzGATE Qualificationz5Qualify GATE examination or university entrance test.zApplication Processz@Submit application with GATE scorecard and academic transcripts.zMerit-based Selectionz7Selection based on GATE score and academic performance.zDocument Verificationz+Verify original documents and certificates.zAdmission Confirmationz.Pay fees and confirm admission to secure seat.Diplomaz10th Marks Verificationz<Check eligibility based on 10th standard marks and subjects.zApplication Formz@Fill online application form with personal and academic details.z
Merit Listz4Check merit list based on 10th standard performance.zCounseling Processz:Attend counseling for course and specialization selection.zAdmission Completionz>Complete admission with document verification and fee payment.zEligibility Checkz;Verify 10+2 completion with PCM subjects and minimum marks.z2Appear for JEE Main or state entrance examination.zCSubmit application with entrance exam scores and 10+2 certificates.zCounseling & Seat Allocationz6Participate in counseling based on entrance exam rank.zAdmission Formalitiesz<Complete document verification, fee payment, and enrollment.r    r   r<   )r.   r    r   r9   N)r    r   r   r@   )r*   r.   steps	step_datar/   r/   r0   r#   7  sT   
























	




zCommand._create_admission_stepsc                 C   s^   d|j v r
d}d}nd|j v rd}d}nd|j v rd}d}nd}d}tjj|||d	d
 dS )z#Create direct admission informationr5   zDirect admission available for candidates with UGC-NET/JRF qualification or outstanding academic record. Industry professionals with significant research experience may also be considered for direct admission.Tr   zDirect admission available for GATE qualified candidates with high scores. Sponsored candidates from industry and government organizations are also eligible for direct admission.HonszDirect admission available for meritorious students with exceptional performance in JEE Main or state entrance examinations. Students with 95+ percentile may qualify for direct admission.zDirect admission available based on merit in qualifying examinations. Students meeting minimum cut-off criteria can apply for direct admission without entrance test.)r<   is_availabler.   r9   N)r    r   r   r@   )r*   r.   r<   r   r/   r/   r0   r$   j  s"   



z Command._create_direct_admissionc                 C   s   z|j }d|jv r4ddddddddddddd	dd
ddddd	ddddddd	ddddddddg}nd|jv rddddddd	dddddddddddddd	ddddddd	ddddddd	dg}nbd|jv rdddddd	dddddddddddddd	ddddddd	ddddddd	ddddddd	dg}n*dddddd	dddddddddddddd	ddddddd	ddddddd	dg}|D ]}tjj||d |d |d |d |d |d  d!d" qW d%S  ty } z| j| j	d#|j d$t
|  W Y d%}~d%S d%}~ww )&zCreate detailed fee structurer5   zRegistration Feeu	   ₹10,000u   ₹0T)fee_head
first_yearsecond_year
third_yearfourth_yearis_one_timez
Course Fee	   ₹25,000FzResearch Feeu	   ₹15,000zLibrary Feeu   ₹5,000z
Thesis Feer   zTuition Feeu   ₹1,60,000zLaboratory Fee	   ₹20,000zExamination FeezB.Techu   ₹1,50,000zDevelopment Feeu	   ₹65,000u   ₹3,000u   ₹2,000r   r   r   r   r   r   )r   r   r   r   r   )
course_feer   r9   z!Could not create fee details for z: N)feesr    r
   r   r@   	Exceptionr   r   r   WARNINGstr)r*   r.   r   fee_detailsfee_dataer/   r/   r0   r%     s\   



4zCommand._create_fee_detailsc                 C   s   t jj|dddddd dS )zCreate hostel fee informationu	   ₹85,000r   r   zHostel fees include accommodation, meals, laundry, and basic utilities. AC rooms available with additional charges. Security deposit is fully refundable upon checkout with no damages.)fee_per_yearac_room_additionalsecurity_depositnotesr   N)r   r   r@   )r*   r.   r/   r/   r0   r&     s   
zCommand._create_hostel_feec              
   C   s   d|j v r
g d}n"d|j v rg d}nd|j v rg d}nd|j v r(g d}ng d	}|D ]}tjj||d
d| dd did q.dS )zCreate recruiter informationrR   )
zL&TzTata ProjectszShapoorji PallonjizGodrej PropertiesDLFIRCONNHPCzLarsen & ToubrozHindustan ConstructionzReliance Infrastructurerc   )
IntelQualcommBroadcomSamsungTSMCMediaTekzTexas InstrumentszAnalog DevicesInfineonSTMicroelectronicsrs   )
SiemensABBzSchneider ElectricGEEmerson	HoneywellzCrompton GreavesBHELz
Tata PowerzReliance Energyr   )
Tata MotorsMahindraz
Bajaj AutozHero MotoCorpzMaruti SuzukiHyundaiFordBoschCumminsCaterpillar)
TCSInfosysWipro	Cognizant	AccentureIBM	MicrosoftAmazonGoogler   logozcourses/recruiters/ _z.png)r.   r7   r9   N)r    r   r   r@   lowerreplace)r*   r.   
recruitersrecruiter_namer/   r/   r0   r'     s    







zCommand._create_recruitersc                 C   s  d|j v rdddddddddd	d
dg}nZd|j v r0ddddddddddddg}nBd|j v rHddddddddddddg}n*d|j v r`dddd d!dd"d#dd$d%dg}nd&d'dd(d)dd*d+dd,d-dg}|D ]}tjj||d. d/|d/ id0 qtd1S )2zCreate why join reasonsrR   zInfrastructure DevelopmentzbBe part of building the nation's infrastructure including smart cities and sustainable structures.)r    r<   zDiverse Career OptionszkMultiple specializations including structural, environmental, transportation, and geotechnical engineering.zGovernment Opportunitiesz]Excellent opportunities in government sectors like PWD, Railways, and municipal corporations.zGlobal ProjectszIWork on international construction and infrastructure projects worldwide.rc   zTechnology InnovationzIWork on cutting-edge technologies like 5G, IoT, and semiconductor design.zHigh Growth IndustryzTElectronics and communication industry offers excellent growth and career prospects.zResearch OpportunitieszNExtensive research opportunities in VLSI, embedded systems, and communication.zGlobal DemandzHHigh demand for ECE professionals in international technology companies.rs   zEnergy Sector GrowthzFGrowing opportunities in renewable energy and smart grid technologies.zIndustrial AutomationzELead the industry 4.0 revolution with automation and control systems.zPower SystemszJCritical role in power generation, transmission, and distribution systems.zSustainable FuturezEContribute to sustainable development through green energy solutions.r   zVersatile EngineeringzJMost versatile engineering branch with applications across all industries.zManufacturing InnovationzHLead innovation in advanced manufacturing and Industry 4.0 technologies.zAutomotive FuturezPExciting opportunities in electric vehicles and autonomous vehicle technologies.zGlobal IndustryzGMechanical engineers are in demand across all countries and industries.zCore EngineeringzIStrong foundation in engineering principles applicable across industries.zInnovation FocuszCDevelop innovative solutions for real-world engineering challenges.zIndustry ReadyzECurriculum designed to meet current and future industry requirements.zResearch Excellencez?Access to advanced research facilities and experienced faculty.r    r<   r   N)r    r   r   r@   )r*   r.   reasonsreason_datar/   r/   r0   r(     sH   




zCommand._create_why_joinc              	   C   s   dddd|j  ddddd	d
d|j  ddddddd|j  dddg}|D ]}tjj||d |d |d |d |d dd q(dS )zCreate student testimonialszAmit Kumar SinghzSenior EngineerzL&T ConstructionzThe z program provided me with excellent technical foundation and practical skills. The faculty guidance and industry exposure helped me secure a great position in a leading engineering company.zcourses/testimonials/amit.jpg)r7   positioncompanycontentphotozPriyanka SharmazProject Managerr   zSI am grateful for the comprehensive curriculum and hands-on learning experience in zP. The program prepared me well for leadership roles in the engineering industry.z!courses/testimonials/priyanka.jpgzRajesh GuptazDesign Engineerr   z program exceeded my expectations. The combination of theoretical knowledge and practical projects gave me a competitive advantage in my career.zcourses/testimonials/rajesh.jpgr7   r   r   r   r   )r   r   )r.   r7   r   r   r9   N)r    r   r   r@   )r*   r.   testimonialstestimonial_datar/   r/   r0   r)     s<   zCommand._create_testimonialsN)__name__
__module____qualname__helpr1   r!   rA   r"   r#   r$   r%   r&   r'   r(   r)   r/   r/   r/   r0   r      s    /# Q37-r   )osdjango.core.management.baser   django.core.files.baser   django.utils.textr   requestsior   django.confr   courses.modelsr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r/   r/   r/   r0   <module>   s    D