Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
inspect_report
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengjinlei
inspect_report
Commits
3903486d
Commit
3903486d
authored
Apr 03, 2020
by
lvshibao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取省市列表
parent
01b2e485
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
models.py
src/inspect_report/models.py
+25
-1
No files found.
src/inspect_report/models.py
View file @
3903486d
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment