17 lines
399 B
Python
17 lines
399 B
Python
from django.db import models
|
|
|
|
from common.utils.codeManger import generate_ulid
|
|
|
|
|
|
class BaseModel(models.Model):
|
|
id = models.CharField(
|
|
max_length=26,
|
|
primary_key=True,
|
|
default=generate_ulid,
|
|
editable=False
|
|
)
|
|
created_at = models.DateTimeField(auto_now_add=True)
|
|
updated_at = models.DateTimeField(auto_now=True)
|
|
|
|
class Meta:
|
|
abstract = True |