2013-02-09 23:30:33 +08:00
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
|
2013-05-29 21:47:21 +08:00
|
|
|
class Comment(models.Model):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2013-02-09 23:30:33 +08:00
|
|
|
class Book(models.Model):
|
|
|
|
title = models.CharField(max_length=100, db_index=True)
|
2013-05-29 21:47:21 +08:00
|
|
|
comments = models.ManyToManyField(Comment)
|
2014-09-04 23:32:51 +08:00
|
|
|
counter = models.PositiveIntegerField()
|