o
    1@]hxT                     @   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 d dl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Testimonial)Collegec                   @   s0   e Zd ZdZdd Zdd Zdd Zdd	 Zd
S )CommandzGSeeds the database with courses for Roorkee College of Business Studiesc                    s.   j  jd ztjjdd} j  jd|j  W n tjy6    j  j	d Y d S w t
jt
jtjddd  f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'dd(dd)d*d+d,d-dd.d/d0d,d1dd2d3d4d,d5dd6d7d8d,d9dg}|D ]y}t|d: }g d;}|t|d: t|  }	d<|	 }
||
d=| }tjj||d: |d> |d? |d@ |dA ddB\}}|r||_|  |r j  jdC|j  n j  jdD|j   ||  ||  || qd S )ENz)Starting to seed Business Studies coursesz#roorkee-college-of-business-studies)slugzFound college: zEBusiness Studies college not found. Please ensure the college exists.zcourses/bannersT)exist_okc              
      s   z)t | }|jdkr| d}t|j|d}|W S  j jd|   W d S  t	yK } z j j
dt|  W Y d }~d S d }~ww )N   z.jpg)namezFailed to download image from zError downloading image: )requestsgetstatus_coder   contentstdoutwritestyleWARNING	ExceptionERRORstr)url
field_nameresponsefilenameimage_contenteself F/var/www/apihucms/courses/management/commands/seed_business_courses.pysave_image_from_url"   s   


z+Command.handle.<locals>.save_image_from_urlB.Comz{Bachelor of Commerce program providing comprehensive knowledge in accounting, finance, taxation, and business fundamentals.a  The Bachelor of Commerce (B.Com) is a comprehensive undergraduate program designed to provide students with a strong foundation in commerce, accounting, finance, economics, and business management. The curriculum covers areas such as financial accounting, cost accounting, taxation, business law, economics, and statistics. Students will develop analytical and problem-solving skills essential for careers in accounting, finance, banking, and business management.z3 Years (6 Semesters)zCommerce & Finance)titleshort_descriptionoverviewdurationcategoryBBAzpBachelor of Business Administration focusing on management principles, leadership skills, and business strategy.a  The Bachelor of Business Administration (BBA) program is designed to develop future business leaders with comprehensive knowledge of management principles, organizational behavior, marketing, finance, and strategic planning. Students will learn about business operations, entrepreneurship, project management, and leadership skills through case studies, internships, and practical projects. The program prepares graduates for management roles in various industries.zBusiness AdministrationzBachelors in Hotel ManagementznComprehensive program in hospitality management covering hotel operations, food service, and tourism industry.a  The Bachelor in Hotel Management program provides comprehensive training in hospitality industry operations, including hotel management, food and beverage service, housekeeping, front office operations, and hospitality marketing. Students will gain practical experience through industry internships and learn about customer service excellence, revenue management, and hospitality technology. The program prepares graduates for management roles in hotels, resorts, restaurants, and tourism companies.zHospitality Managementz$Bachelors in Hospital AdministrationzdSpecialized program in healthcare management focusing on hospital operations and healthcare systems.a  The Bachelor in Hospital Administration program combines healthcare knowledge with management principles to prepare professionals for administrative roles in healthcare organizations. Students will learn about healthcare systems, hospital operations, medical record management, healthcare finance, quality assurance, and healthcare laws. The program includes practical training in hospitals and healthcare facilities to provide real-world experience.zHealthcare Managementz
BA EnglishzbBachelor of Arts in English focusing on literature, language skills, and communication excellence.a  The Bachelor of Arts in English program provides comprehensive study of English literature, language, linguistics, and communication skills. Students will explore classical and contemporary literature, develop critical thinking and analytical skills, and enhance their written and oral communication abilities. The program prepares graduates for careers in education, journalism, content writing, publishing, and corporate communication.zLiberal ArtszBA EconomicszdBachelor of Arts in Economics covering microeconomics, macroeconomics, and economic policy analysis.a  The Bachelor of Arts in Economics program provides comprehensive understanding of economic principles, theories, and their practical applications. Students will study microeconomics, macroeconomics, econometrics, international economics, and economic policy. The curriculum emphasizes analytical thinking, quantitative methods, and economic research. Graduates are prepared for careers in banking, government, research organizations, and corporate planning.	EconomicszBA Tourism & ManagementzVComprehensive program combining tourism industry knowledge with management principles.a  The Bachelor of Arts in Tourism & Management program provides specialized knowledge of the tourism industry combined with management principles. Students will learn about tourism planning, destination management, travel operations, tourism marketing, and sustainable tourism practices. The program includes practical training through industry internships and prepares graduates for careers in travel agencies, tour operators, hotels, and tourism boards.zTourism Managementz
MBA Globalz]Global MBA program with international business focus and cross-cultural management expertise.a  The MBA Global program is designed for professionals seeking to develop international business expertise and global leadership skills. The curriculum covers international finance, global marketing, cross-cultural management, international trade, and global supply chain management. Students will gain exposure to global business practices through case studies, international projects, and industry interactions. The program prepares graduates for senior management roles in multinational corporations.z2 Years (4 Semesters)zInternational BusinesszMBA in Pharma ManagementzWSpecialized MBA focusing on pharmaceutical industry management and healthcare business.a  The MBA in Pharma Management is a specialized program designed for the pharmaceutical and healthcare industry. Students will learn about pharmaceutical marketing, regulatory affairs, drug development processes, healthcare policy, and pharma supply chain management. The curriculum combines business management principles with industry-specific knowledge. Graduates are prepared for management roles in pharmaceutical companies, healthcare organizations, and regulatory bodies.zPharmaceutical ManagementzMBA ExecutivezbExecutive MBA program for working professionals with focus on strategic leadership and management.a  The MBA Executive program is designed for experienced working professionals who want to advance their careers while continuing their professional responsibilities. The curriculum focuses on strategic management, leadership development, organizational transformation, and advanced business analytics. Classes are scheduled to accommodate working professionals, and the program emphasizes practical application of concepts to real-world business challenges.zExecutive Managementz3MBA (with IIM Certification) (Finance/HR/Marketing)zZMBA program with IIM certification offering specializations in Finance, HR, and Marketing.a  The MBA program with IIM Certification offers specialized tracks in Finance, Human Resources, and Marketing. This prestigious program combines rigorous academic curriculum with industry best practices. Students will benefit from IIM faculty expertise, advanced case study methodology, and industry mentorship. The program includes specialization-specific projects, internships, and certification from Indian Institute of Management, preparing graduates for leadership roles in their chosen specialization.z!Management with IIM Certificationr3   )zbusiness,office,professionalzfinance,accounting,moneyzmanagement,leadership,strategyzhospitality,hotel,servicezhealthcare,hospital,medicalztourism,travel,destinationzeconomics,market,analysisz&https://source.unsplash.com/1200x600/?banner_r4   r5   r6   r7   )r   defaultszCreated course: zUpdated course: )r    r!   r"   SUCCESSr   objectsr   r   DoesNotExistr%   osmakedirspathjoinr   
MEDIA_ROOTr   hashlenr   update_or_createbanner_imagesaver3   _create_course_eligibility_create_course_fees_create_course_highlights)r.   argsoptionsbusiness_colleger1   courses_datacourse_datar   banner_themestheme
banner_urlrG   coursecreatedr/   r-   r0   handle   s    
T

zCommand.handlec                 C   s   d|j v rd}d|j v rd}d}n&d}d}n!d|j v s*d	|j v s*d
|j v s*d|j v r1d}d}d}nd}d}d}tjj||||dd dS )z*Create eligibility criteria for the courseMBAzABachelor's degree in any discipline from a recognized university.	ExecutivezHMinimum 50% aggregate with 3+ years work experience (45% for SC/ST/OBC).zECAT/MAT/XAT/CMAT or University Entrance Test with personal interview.z8Minimum 50% aggregate in graduation (45% for SC/ST/OBC).zZCAT/MAT/XAT/CMAT or University Entrance Test with group discussion and personal interview.BAr2   r8   Bachelorz>10+2 (Senior Secondary) from a recognized board in any stream.z2Minimum 50% aggregate in 10+2 (45% for SC/ST/OBC).z2Merit-based admission or university entrance test.z010+2 (Senior Secondary) from a recognized board.z.Merit-based admission or entrance examination.)academic_qualificationminimum_marksentrance_examrT   r;   N)r3   r   r=   rF   )r.   rT   rP   academic_qualr\   r]   r/   r/   r0   rI      s*   

(
z"Command._create_course_eligibilityc                 C   s   d|j v rd|j v rd}d}n,d|j v rd}d}n"d}d	}nd
|j v s(d|j v r-d}d}nd|j v r7d}d}nd}d}tjj|||dd dS )z#Create fee structure for the courserW   IIM Certificationu   ₹3,50,000 per yearz$12,000 per yearrX   u   ₹2,80,000 per yearz$10,000 per yearu   ₹2,20,000 per yearz$8,000 per yearHospital AdministrationHotel Managementu   ₹1,40,000 per yearz$5,000 per yearr8   u   ₹1,20,000 per yearz$4,500 per yearu   ₹90,000 per yearz$3,500 per year)domesticinternationalr^   N)r3   r	   r=   rF   )r.   rT   rP   domestic_feeinternational_feer/   r/   r0   rJ      s.   




zCommand._create_course_feesc                 C   s  g }d|j v rVd|j v r#ddddddddd	d
ddddddg}nd|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}njd'|j v rrd(d)d*dd+d,d-dd.d/d0dd1d2d3dg}nNd4|j v rd5d6d7dd8d9d:dd;d<d=dd>d?d@dg}n2dA|j v rdBdCdDddEdFdGddHdIdJddKdLdMdg}ndNdOdPddQdRdSddTdUdddVdWddg}|D ]}tjj||dX |dY |dZ d[d\ q| j| jd] d^S )_zCreate course highlightsrW   r`   z>Prestigious certification from Indian Institute of Management.certificate)r3   descriptioniconzSpecialization Tracksz6Choose from Finance, HR, or Marketing specializations.routezIndustry Mentorshipz8Direct mentorship from industry leaders and IIM faculty.zuser-tiezCase Study Methodz<Advanced case study methodology and real business scenarios.	briefcaserX   zWorking Professional Focusz<Designed for experienced professionals without career break.z
user-clockzWeekend Classesz3Flexible schedule with weekend and evening classes.calendarzLeadership Developmentz@Focus on strategic leadership and organizational transformation.userszNetworking Opportunitiesz4Connect with senior professionals across industries.	handshakezGlobal Perspectivez6International business focus with global case studies.globezIndustry Projectsz+Real-world projects with leading companies.zproject-diagramzPlacement Supportz.100% placement assistance with top recruiters.zSpecialization Optionsz)Multiple specialization tracks available.zgraduation-caprb   zIndustry Trainingz:Extensive practical training in 5-star hotels and resorts.hotelzGlobal Exposurez/International internship and exchange programs.planezProfessional Skillsz5Hands-on training in all aspects of hotel operations.toolszIndustry Connectionsz/Strong network with leading hospitality brands.znetwork-wiredra   zHealthcare FocuszASpecialized training in healthcare management and administration.hospitalzMedical Knowledgez:Understanding of medical processes and healthcare systems.stethoscopezHospital InternshipszBPractical training in leading hospitals and healthcare facilities.zuser-mdzCareer Growthz>High demand for healthcare administrators in growing industry.z
chart-lineTourismzTourism Industry Focusz=Comprehensive understanding of travel and tourism operations.z
map-markedzDestination Managementz9Learn about tourism planning and destination development.mapzPractical Trainingz4Internships with travel agencies and tour operators.suitcasezCultural Awarenessz:Understanding of diverse cultures and sustainable tourism.z
globe-asiazStrong Foundationz=Comprehensive foundation in business and commerce principles.buildingzPractical Learningz2Case studies, projects, and industry interactions.z	book-openzCareer Flexibilityz;Multiple career paths in business, finance, and management.zIndustry Readyz:Curriculum designed to meet current industry requirements.r3   rh   ri   )rh   ri   )rT   r3   r;   z1Successfully seeded all Business Studies courses!N)r3   r   r=   rF   r    r!   r"   r<   )r.   rT   rP   highlights_datahighlight_datar/   r/   r0   rK      sf   

































	z!Command._create_course_highlightsN)__name__
__module____qualname__helprV   rI   rJ   rK   r/   r/   r/   r0   r      s      r   )r?   django.core.management.baser   django.core.files.baser   django.utils.textr   r   ior   django.confr   courses.modelsr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   colleges.modelsr   r   r/   r/   r/   r0   <module>   s    D