# coding=utf-8

from django.db import models


class Subject(models.Model):
    name = models.CharField(max_length=100, verbose_name=u"名称")
    notes = models.CharField(max_length=500, verbose_name=u"备注", blank=True, null=True)
    delete = models.BooleanField(verbose_name=u'删除', default=False)

    class Meta:
        db_table = "base_subject"
        ordering = ['-id']
        verbose_name = u"科目章节设置"
        default_permissions = ()


class Chapter(models.Model):
    subject = models.ForeignKey(Subject, verbose_name=u"科目", on_delete=models.PROTECT)
    name = models.CharField(max_length=100, verbose_name=u"名称")
    notes = models.CharField(max_length=500, verbose_name=u"备注", blank=True, null=True)
    delete = models.BooleanField(verbose_name=u'删除', default=False)

    class Meta:
        db_table = "base_chapter"
        ordering = ['-id']
        verbose_name = u"章节"
        default_permissions = ()
