Commit 3903486d authored by lvshibao's avatar lvshibao

获取省市列表

parent 01b2e485
from django.db import models from django.db import models
# Create your models here. # Create your models here.
from django.db.models import Func from django.db.models import Func
...@@ -135,6 +134,31 @@ class CheckSession(models.Model): ...@@ -135,6 +134,31 @@ class CheckSession(models.Model):
return type(table_name, (Class,), attrs) return type(table_name, (Class,), attrs)
class ScheduleTaskOptions(models.Model):
name = models.CharField('地市名', max_length=190)
type = models.IntegerField('任务分类', default=1)
templateId = models.IntegerField('模板id', default=1)
keywordLibraryId = models.IntegerField('关键词id', default=1)
associateDataQuery = models.TextField()
keywords = models.CharField('关键词', max_length=190)
createdAt = models.DateTimeField('创建时间')
updatedAt = models.DateTimeField('更新时间')
status = models.IntegerField('状态', default=1)
scoreItemIds = models.CharField(max_length=2000)
subjectCategoryIds = models.CharField(max_length=190)
def __str__(self):
return self.name
class Meta:
db_table = 'schedule_task_options'
# 获取name_list
# names = ScheduleTaskOptions.objects.filter().all().values_list('name').distinct()
# name_list = [name[0] for name in names]
class Round(Func): class Round(Func):
function = 'ROUND' function = 'ROUND'
arity = 2 arity = 2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment