You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
423 B
14 lines
423 B
|
3 years ago
|
import uuid
|
||
|
|
|
||
|
|
from django.db import models
|
||
|
|
|
||
|
|
|
||
|
|
class BaseModel(models.Model):
|
||
|
|
"""基础模型 Usages: abstract class for Model """
|
||
|
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||
|
|
create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间')
|
||
|
|
update_time = models.DateTimeField(auto_now=True, verbose_name='更新时间')
|
||
|
|
|
||
|
|
class Meta:
|
||
|
|
abstract = True
|