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
alpha
physical
Commits
07073ad2
Commit
07073ad2
authored
Nov 24, 2018
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
94839792
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
2 deletions
+5
-2
user.json
trans2es/mapping/user.json
+1
-0
user.py
trans2es/models/user.py
+2
-1
user_follow.py
trans2es/models/user_follow.py
+1
-1
user_transfer.py
trans2es/utils/user_transfer.py
+1
-0
No files found.
trans2es/mapping/user.json
View file @
07073ad2
{
{
"dynamic"
:
"strict"
,
"dynamic"
:
"strict"
,
"properties"
:
{
"properties"
:
{
"id"
:{
"type"
:
"long"
},
"user_id"
:{
"type"
:
"long"
},
"user_id"
:{
"type"
:
"long"
},
"nick_name"
:{
"type"
:
"text"
},
//昵称
"nick_name"
:{
"type"
:
"text"
},
//昵称
"profile_pic"
:{
"type"
:
"text"
},
//头像
"profile_pic"
:{
"type"
:
"text"
},
//头像
...
...
trans2es/models/user.py
View file @
07073ad2
...
@@ -17,7 +17,8 @@ class User(models.Model):
...
@@ -17,7 +17,8 @@ class User(models.Model):
db_table
=
'account_user'
db_table
=
'account_user'
app_label
=
'api'
app_label
=
'api'
user_id
=
models
.
BigIntegerField
(
verbose_name
=
u'用户唯一id'
,
unique
=
True
)
id
=
models
.
IntegerField
(
verbose_name
=
"主键ID"
,
primary_key
=
True
)
user_id
=
models
.
BigIntegerField
(
verbose_name
=
u'用户id'
,
unique
=
True
)
nick_name
=
models
.
CharField
(
verbose_name
=
u'昵称'
,
max_length
=
255
,
default
=
''
)
nick_name
=
models
.
CharField
(
verbose_name
=
u'昵称'
,
max_length
=
255
,
default
=
''
)
profile_pic
=
models
.
CharField
(
verbose_name
=
u'头像'
,
max_length
=
300
)
profile_pic
=
models
.
CharField
(
verbose_name
=
u'头像'
,
max_length
=
300
)
gender
=
models
.
SmallIntegerField
(
verbose_name
=
u'性别'
)
gender
=
models
.
SmallIntegerField
(
verbose_name
=
u'性别'
)
...
...
trans2es/models/user_follow.py
View file @
07073ad2
...
@@ -17,7 +17,7 @@ class UserFollow(models.Model):
...
@@ -17,7 +17,7 @@ class UserFollow(models.Model):
db_table
=
'user_follow'
db_table
=
'user_follow'
app_label
=
'api'
app_label
=
'api'
user
=
models
.
ForeignKey
(
User
,
related_name
=
'userfollow'
,
on_delete
=
models
.
CASCADE
)
user
=
models
.
ForeignKey
(
User
,
related_name
=
'userfollow'
,
to_field
=
"user_id"
,
on_delete
=
models
.
CASCADE
)
follow_id
=
models
.
IntegerField
(
verbose_name
=
"关注的用户ID"
)
follow_id
=
models
.
IntegerField
(
verbose_name
=
"关注的用户ID"
)
is_online
=
models
.
BooleanField
(
verbose_name
=
"是否上线"
)
is_online
=
models
.
BooleanField
(
verbose_name
=
"是否上线"
)
is_deleted
=
models
.
BooleanField
(
verbose_name
=
"是否删除"
)
is_deleted
=
models
.
BooleanField
(
verbose_name
=
"是否删除"
)
...
...
trans2es/utils/user_transfer.py
View file @
07073ad2
...
@@ -13,6 +13,7 @@ class UserTransfer(object):
...
@@ -13,6 +13,7 @@ class UserTransfer(object):
try
:
try
:
res
=
dict
()
res
=
dict
()
res
[
"id"
]
=
instance
.
id
res
[
"user_id"
]
=
instance
.
user_id
res
[
"user_id"
]
=
instance
.
user_id
res
[
"nick_name"
]
=
instance
.
nick_name
res
[
"nick_name"
]
=
instance
.
nick_name
res
[
"profile_pic"
]
=
instance
.
profile_pic
res
[
"profile_pic"
]
=
instance
.
profile_pic
...
...
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