from django.db import models
from django.conf import settings
from apps.tenant.models import Tenant

class OperationHelp(models.Model):

    title = models.CharField(verbose_name=u'标题', max_length=100)
    content = models.CharField(verbose_name=u'内容',max_length=500)
    create_user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=u"创建人", on_delete=models.PROTECT,
                                    editable=False)
    create_time = models.DateTimeField(verbose_name='创建时间', auto_now_add=True)
    enable = models.BooleanField(verbose_name=u"在用", default=True)
    tenant = models.ForeignKey(Tenant, verbose_name=u'企业', editable=False, on_delete=models.PROTECT, null=True)

    class Meta:
        db_table = 'operation_help'
        ordering = ['-id', 'tenant']
        verbose_name = u'运维帮助'
