added HistorySync model
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from . import models
|
||||
|
||||
# Register your models here.
|
||||
|
||||
admin.site.register(models.HistorySync)
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class HistorySync(models.Model):
|
||||
"""
|
||||
Keeps an historic record of the importation of products for a company
|
||||
"""
|
||||
|
||||
company = models.ForeignKey('companies.Company', on_delete=models.DO_NOTHING, null=True)
|
||||
rss_url = models.URLField('URL del feed', null=True, blank=True)
|
||||
sync_date = models.DateTimeField('Fecha de lanzamiento', null=True)
|
||||
result = models.TextField('Resultado', null=True, blank=True)
|
||||
quantity = models.PositiveIntegerField('Productos importados', null=True)
|
||||
|
||||
# internal
|
||||
created = models.DateTimeField('date of creation', auto_now_add=True)
|
||||
updated = models.DateTimeField('date last update', auto_now=True)
|
||||
creator = models.ForeignKey('core.CustomUser', on_delete=models.DO_NOTHING, null=True, related_name='historysync')
|
||||
|
||||
Reference in New Issue
Block a user