models.py 528 B

1234567891011121314151617
  1. from django.contrib.auth.models import User
  2. from django.db import models
  3. # Create your models here.
  4. class DailyReport(models.Model):
  5. title = models.CharField(max_length=50)
  6. content = models.TextField()
  7. create_at = models.DateTimeField(auto_now=True)
  8. create_by = models.ForeignKey(User, blank=True, null=True, on_delete=models.CASCADE)
  9. class Meta:
  10. app_label = 'workreport'
  11. db_table = 'workreport_daily'
  12. verbose_name = '工作汇报'
  13. verbose_name_plural = '工作汇报表'