Base
This commit is contained in:
17
user/user_auth_system/user_management/models/source.py
Normal file
17
user/user_auth_system/user_management/models/source.py
Normal file
@ -0,0 +1,17 @@
|
||||
from django.db import models
|
||||
from .user import CustomUser
|
||||
from .tag import Tag
|
||||
|
||||
class Source(models.Model):
|
||||
title = models.CharField(max_length=200)
|
||||
url = models.URLField()
|
||||
archived_url = models.URLField()
|
||||
description = models.TextField()
|
||||
category = models.CharField(max_length=50)
|
||||
tags = models.ManyToManyField(Tag, related_name='sources')
|
||||
added_by = models.ForeignKey(CustomUser, on_delete=models.SET_NULL, null=True)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
Reference in New Issue
Block a user