# -*- coding: utf-8 -*-

from djadmin import ExportExcelModelAdmin, ReadonlyModelAdmin
from django.contrib import admin

from courses.models import CourseInfo, CourseVideoInfo


class CourseInfoAdmin(ExportExcelModelAdmin, admin.ModelAdmin):
    list_display = ('course_id', 'course_name', 'course_time', 'course_cover', 'status', 'created_at', 'updated_at')
    list_filter = ('status', )


class CourseVideoInfoAdmin(ExportExcelModelAdmin, admin.ModelAdmin):
    list_display = ('course', 'course_video_id', 'course_video_type', 'course_video_name', 'course_video_desc', 'course_video_time', 'course_video_cover', 'course_video_position', 'status', 'created_at', 'updated_at')
    list_filter = ('course', 'status')


admin.site.register(CourseInfo, CourseInfoAdmin)
admin.site.register(CourseVideoInfo, CourseVideoInfoAdmin)
