Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
钟尚武
physical
Commits
cc145eae
Commit
cc145eae
authored
Nov 29, 2018
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifyt
parent
19cd61a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
16 deletions
+27
-16
topic.py
trans2es/models/topic.py
+1
-1
user.py
trans2es/models/user.py
+0
-15
user_extra.py
trans2es/models/user_extra.py
+26
-0
No files found.
trans2es/models/topic.py
View file @
cc145eae
...
...
@@ -11,7 +11,7 @@ import datetime
from
.pick_topic
import
PickTopic
from
.tag
import
TopicTag
from
.user
import
UserExtra
from
.user
_extra
import
UserExtra
from
.group
import
Group
...
...
trans2es/models/user.py
View file @
cc145eae
...
...
@@ -115,18 +115,3 @@ class User(models.Model):
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
None
class
UserExtra
(
models
.
Model
):
class
Meta
:
verbose_name
=
u"推荐用户表"
db_table
=
"user_extra"
id
=
models
.
IntegerField
(
verbose_name
=
"主键ID"
,
primary_key
=
True
)
user_id
=
models
.
IntegerField
(
verbose_name
=
u"用户ID"
)
is_shadow
=
models
.
BooleanField
(
verbose_name
=
u"是否是马甲账户"
)
is_online
=
models
.
BooleanField
(
verbose_name
=
u"是否上线"
)
is_recommend
=
models
.
BooleanField
(
verbose_name
=
u"是否推荐"
)
has_answered
=
models
.
BooleanField
(
verbose_name
=
u""
)
is_deleted
=
models
.
BooleanField
(
verbose_name
=
u""
)
create_time
=
models
.
DateTimeField
(
verbose_name
=
u'创建时间'
,
default
=
datetime
.
datetime
.
fromtimestamp
(
0
))
update_time
=
models
.
DateTimeField
(
verbose_name
=
u'更新时间'
,
default
=
datetime
.
datetime
.
fromtimestamp
(
0
))
trans2es/models/user_extra.py
0 → 100644
View file @
cc145eae
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from
django.conf
import
settings
from
django.core.management.base
import
BaseCommand
,
CommandError
import
traceback
import
logging
from
libs.es
import
ESPerform
from
django.db
import
models
import
datetime
class
UserExtra
(
models
.
Model
):
class
Meta
:
verbose_name
=
u"推荐用户表"
db_table
=
"user_extra"
id
=
models
.
IntegerField
(
verbose_name
=
"主键ID"
,
primary_key
=
True
)
user_id
=
models
.
IntegerField
(
verbose_name
=
u"用户ID"
)
is_shadow
=
models
.
BooleanField
(
verbose_name
=
u"是否是马甲账户"
)
is_online
=
models
.
BooleanField
(
verbose_name
=
u"是否上线"
)
is_recommend
=
models
.
BooleanField
(
verbose_name
=
u"是否推荐"
)
has_answered
=
models
.
BooleanField
(
verbose_name
=
u""
)
is_deleted
=
models
.
BooleanField
(
verbose_name
=
u""
)
create_time
=
models
.
DateTimeField
(
verbose_name
=
u'创建时间'
,
default
=
datetime
.
datetime
.
fromtimestamp
(
0
))
update_time
=
models
.
DateTimeField
(
verbose_name
=
u'更新时间'
,
default
=
datetime
.
datetime
.
fromtimestamp
(
0
))
\ No newline at end of file
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