Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
fund_report
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
fund_report
Commits
7240d7cb
Commit
7240d7cb
authored
Nov 19, 2020
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复model 基类base
parent
68e3f7f9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
121 deletions
+5
-121
base.py
app/model/base.py
+3
-1
tamp_product_models.py
app/model/tamp_product_models.py
+1
-1
tamp_user_models.py
app/model/tamp_user_models.py
+1
-119
No files found.
app/model/base.py
View file @
7240d7cb
...
...
@@ -7,8 +7,10 @@
# @Software : PyCharm
# -----------------------------------------------------------------------------
from
sqlalchemy.ext.declarative
import
declarative_base
Base
=
declarative_base
()
metadata
=
Base
.
metadata
class
BaseModel
():
"""."""
...
...
app/model/tamp_product_models.py
View file @
7240d7cb
# coding: utf-8
from
sqlalchemy
import
Column
,
DECIMAL
,
Date
,
DateTime
,
String
,
TIMESTAMP
,
Text
,
text
from
sqlalchemy.dialects.mysql
import
INTEGER
,
MEDIUMTEXT
,
TINYINT
from
app.model.base
import
Base
,
BaseModel
from
app.model.base
import
Base
,
BaseModel
,
metadata
...
...
app/model/tamp_user_models.py
View file @
7240d7cb
...
...
@@ -2,7 +2,7 @@
from
sqlalchemy
import
Column
,
DECIMAL
,
Date
,
DateTime
,
ForeignKeyConstraint
,
Index
,
LargeBinary
,
String
,
TIMESTAMP
,
Table
,
Text
,
text
from
sqlalchemy.dialects.mysql
import
BIGINT
,
INTEGER
,
MEDIUMTEXT
,
SMALLINT
,
VARCHAR
from
sqlalchemy.orm
import
relationship
from
app.model.base
import
Base
,
BaseModel
from
app.model.base
import
Base
,
BaseModel
,
metadata
class
Account
(
Base
,
BaseModel
):
...
...
@@ -969,47 +969,6 @@ class CurriculumRel(Base, BaseModel):
delete_tag
=
Column
(
INTEGER
(
1
),
nullable
=
False
,
comment
=
'删除标识'
)
class
CurriculumRe
(
Base
,
BaseModel
):
__tablename__
=
'curriculum_res'
__table_args__
=
{
'comment'
:
'课程资源'
}
id
=
Column
(
String
(
64
),
primary_key
=
True
,
comment
=
'主键id'
)
title
=
Column
(
String
(
50
),
nullable
=
False
,
comment
=
'课程名称'
)
audio
=
Column
(
String
(
128
),
comment
=
'课程音视频'
)
audio_type
=
Column
(
INTEGER
(
1
),
comment
=
'音频类型'
)
teacher_id
=
Column
(
String
(
64
),
comment
=
'讲师id'
)
teacher_name
=
Column
(
String
(
128
),
comment
=
'讲师姓名'
)
content
=
Column
(
MEDIUMTEXT
,
comment
=
'文稿内容'
)
duration
=
Column
(
INTEGER
(
11
),
comment
=
'时长'
)
file_size
=
Column
(
INTEGER
(
11
),
comment
=
'文件大小KB'
)
org_id
=
Column
(
String
(
64
),
index
=
True
,
comment
=
'组织id'
)
room_pwd
=
Column
(
String
(
50
),
comment
=
'房间密码'
)
create_by
=
Column
(
String
(
64
),
nullable
=
False
,
comment
=
'创建人'
)
create_time
=
Column
(
DateTime
,
nullable
=
False
,
comment
=
'创建时间'
)
update_by
=
Column
(
String
(
64
),
comment
=
'更新人'
)
update_time
=
Column
(
DateTime
,
comment
=
'更新时间'
)
delete_tag
=
Column
(
INTEGER
(
1
),
nullable
=
False
,
comment
=
'删除标识'
)
read_num
=
Column
(
INTEGER
(
11
),
server_default
=
text
(
"'0'"
),
comment
=
'阅读数'
)
read_base_num
=
Column
(
INTEGER
(
11
),
server_default
=
text
(
"'0'"
),
comment
=
'阅读基础数'
)
status
=
Column
(
INTEGER
(
1
),
nullable
=
False
,
server_default
=
text
(
"'0'"
),
comment
=
'状态'
)
sort
=
Column
(
INTEGER
(
11
),
nullable
=
False
,
server_default
=
text
(
"'0'"
),
comment
=
'排序'
)
info
=
Column
(
String
(
255
),
server_default
=
text
(
"''"
),
comment
=
'简介'
)
cover
=
Column
(
String
(
255
),
nullable
=
False
,
server_default
=
text
(
"''"
),
comment
=
'封面'
)
t_curriculum_share_config
=
Table
(
'curriculum_share_config'
,
metadata
,
Column
(
'id'
,
String
(
64
),
nullable
=
False
,
comment
=
'主键'
),
Column
(
'title'
,
String
(
50
),
nullable
=
False
,
comment
=
'分享标题'
),
Column
(
'content'
,
String
(
100
),
nullable
=
False
,
comment
=
'分享内容'
),
Column
(
'cover'
,
String
(
100
),
nullable
=
False
,
comment
=
'封面'
),
Column
(
'rel_id'
,
String
(
64
),
nullable
=
False
,
comment
=
'关联id'
),
Column
(
'create_time'
,
DateTime
,
nullable
=
False
,
comment
=
'创建内容'
),
Column
(
'update_time'
,
DateTime
,
nullable
=
False
,
comment
=
'更新时间'
),
Column
(
'create_by'
,
String
(
64
),
nullable
=
False
,
comment
=
'创建人'
),
comment
=
'课程分享配置'
)
class
CurriculumSubject
(
Base
,
BaseModel
):
__tablename__
=
'curriculum_subject'
...
...
@@ -1077,56 +1036,6 @@ class CurriculumTeacher(Base, BaseModel):
ct_user_id
=
Column
(
String
(
64
),
comment
=
'关联用户'
)
t_customer_ifa_rel
=
Table
(
'customer_ifa_rel'
,
metadata
,
Column
(
'id'
,
String
(
64
),
nullable
=
False
,
comment
=
'主键'
),
Column
(
'user_id'
,
String
(
64
),
nullable
=
False
,
comment
=
'理财师id'
),
Column
(
'customer_id'
,
String
(
64
),
nullable
=
False
,
comment
=
'客户id'
),
Column
(
'create_time'
,
DateTime
,
nullable
=
False
,
comment
=
'创建时间'
),
Column
(
'create_by'
,
String
(
64
),
nullable
=
False
,
comment
=
'创建人'
),
Column
(
'update_time'
,
DateTime
,
comment
=
'更时间'
),
Column
(
'update_by'
,
String
(
64
),
comment
=
' 更新人'
),
Column
(
'delete_id'
,
INTEGER
(
1
),
nullable
=
False
,
server_default
=
text
(
"'0'"
),
comment
=
'删除标识'
),
comment
=
'客户理财师关联表'
)
t_customer_info
=
Table
(
'customer_info'
,
metadata
,
Column
(
'id'
,
String
(
64
),
nullable
=
False
,
comment
=
'主键'
),
Column
(
'customer_name'
,
String
(
50
),
server_default
=
text
(
"''"
),
comment
=
'客户姓名'
),
Column
(
'create_time'
,
DateTime
,
comment
=
'创建时间'
),
Column
(
'create_by'
,
String
(
64
),
server_default
=
text
(
"''"
),
comment
=
'创建人'
),
Column
(
'update_time'
,
DateTime
,
comment
=
'更新时间'
),
Column
(
'update_by'
,
String
(
64
),
comment
=
'更新人'
),
Column
(
'delete_tag'
,
INTEGER
(
1
),
server_default
=
text
(
"'0'"
),
comment
=
'删除标识'
),
comment
=
'客户表'
)
t_customer_order
=
Table
(
'customer_order'
,
metadata
,
Column
(
'id'
,
String
(
64
),
nullable
=
False
,
comment
=
'主键id'
),
Column
(
'user_id'
,
String
(
64
),
server_default
=
text
(
"''"
),
comment
=
'理财师id'
),
Column
(
'customer_id'
,
String
(
64
),
server_default
=
text
(
"''"
),
comment
=
'客户id'
),
Column
(
'folio_name'
,
VARCHAR
(
64
),
server_default
=
text
(
"'default'"
),
comment
=
'组合名称,默认default,可以单用户多组合'
),
Column
(
'fund_id'
,
String
(
64
),
server_default
=
text
(
"''"
),
comment
=
'产品id'
),
Column
(
'order_type'
,
INTEGER
(
1
),
comment
=
'1:申购 2:赎回'
),
Column
(
'pay_date'
,
Date
,
comment
=
'打款日期'
),
Column
(
'subscription_fee'
,
DECIMAL
(
22
,
6
),
comment
=
'申购费'
),
Column
(
'confirm_share_date'
,
Date
,
comment
=
'份额确认日期'
),
Column
(
'confirm_share'
,
DECIMAL
(
22
,
6
),
comment
=
'确认份额'
),
Column
(
'confirm_amount'
,
DECIMAL
(
22
,
6
),
comment
=
'确认金额'
),
Column
(
'nav'
,
DECIMAL
(
22
,
6
),
comment
=
'净值'
),
Column
(
'remark'
,
String
(
255
),
comment
=
'备注'
),
Column
(
'create_time'
,
DateTime
,
comment
=
'创建时间'
),
Column
(
'create_by'
,
String
(
64
),
comment
=
'创建时间'
),
Column
(
'update_time'
,
DateTime
,
comment
=
'更新时间'
),
Column
(
'update_by'
,
String
(
64
),
comment
=
'更新人'
),
comment
=
'客户订单'
)
class
DaySelection
(
Base
,
BaseModel
):
__tablename__
=
'day_selection'
...
...
@@ -2246,21 +2155,6 @@ class SystemNotice(Base, BaseModel):
delete_tag
=
Column
(
INTEGER
(
1
),
comment
=
'删除标识'
)
t_system_switch
=
Table
(
'system_switch'
,
metadata
,
Column
(
'id'
,
String
(
64
),
nullable
=
False
,
server_default
=
text
(
"''"
),
comment
=
'唯一主键'
),
Column
(
'ss_name'
,
String
(
64
),
comment
=
'名称'
),
Column
(
'ss_key'
,
String
(
64
),
comment
=
'key'
),
Column
(
'ss_value'
,
String
(
64
),
comment
=
'value'
),
Column
(
'ss_desc'
,
String
(
256
),
comment
=
'描述'
),
Column
(
'createtime'
,
DateTime
,
comment
=
'创建时间'
),
Column
(
'createby'
,
String
(
64
),
comment
=
'创建人'
),
Column
(
'updatetime'
,
DateTime
,
comment
=
'修改时间'
),
Column
(
'updateby'
,
String
(
64
),
comment
=
'修改人'
),
Column
(
'deletetag'
,
String
(
3
),
comment
=
'删除标识'
)
)
class
Tag
(
Base
,
BaseModel
):
__tablename__
=
'tag'
...
...
@@ -2288,18 +2182,6 @@ class TagCategory(Base, BaseModel):
delete_tag
=
Column
(
INTEGER
(
1
),
comment
=
'删除标识'
)
t_tag_rel
=
Table
(
'tag_rel'
,
metadata
,
Column
(
'id'
,
String
(
64
),
nullable
=
False
,
comment
=
'主键id'
),
Column
(
'tag_id'
,
String
(
64
),
nullable
=
False
,
index
=
True
,
comment
=
'标签id'
),
Column
(
'rel_id'
,
String
(
64
),
nullable
=
False
,
index
=
True
,
comment
=
'关联id'
),
Column
(
'rel_type'
,
INTEGER
(
1
),
nullable
=
False
,
comment
=
'关联类型'
),
Column
(
'tag_category_id'
,
String
(
64
),
nullable
=
False
,
comment
=
'标签分类'
),
Column
(
'tag_category_name'
,
String
(
64
),
nullable
=
False
,
comment
=
'标签分类'
),
Column
(
'create_time'
,
DateTime
,
nullable
=
False
,
comment
=
'创建时间'
)
)
class
TaskSchedule
(
Base
,
BaseModel
):
__tablename__
=
'task_schedule'
__table_args__
=
(
...
...
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