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
8596d80e
Commit
8596d80e
authored
Nov 20, 2020
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据库model添加Table模式取数据
parent
eab84693
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
388 additions
and
386 deletions
+388
-386
base.py
app/model/base.py
+4
-1
tamp_product_models.py
app/model/tamp_product_models.py
+176
-110
tamp_user_models.py
app/model/tamp_user_models.py
+208
-275
No files found.
app/model/base.py
View file @
8596d80e
...
@@ -6,16 +6,19 @@
...
@@ -6,16 +6,19 @@
# @Email : acepengxiong@163.com
# @Email : acepengxiong@163.com
# @Software : PyCharm
# @Software : PyCharm
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
from
sqlalchemy.ext.declarative
import
declarative_base
from
sqlalchemy.ext.declarative
import
declarative_base
,
declared_attr
Base
=
declarative_base
()
Base
=
declarative_base
()
metadata
=
Base
.
metadata
metadata
=
Base
.
metadata
class
BaseModel
():
class
BaseModel
():
"""."""
"""."""
__abstract__
=
True
def
__init__
(
self
):
def
__init__
(
self
):
pass
pass
def
to_dict
(
self
):
def
to_dict
(
self
):
return
{
c
.
name
:
getattr
(
self
,
c
.
name
)
for
c
in
self
.
__table__
.
columns
}
return
{
c
.
name
:
getattr
(
self
,
c
.
name
)
for
c
in
self
.
__table__
.
columns
}
app/model/tamp_product_models.py
View file @
8596d80e
This diff is collapsed.
Click to expand it.
app/model/tamp_user_models.py
View file @
8596d80e
This diff is collapsed.
Click to expand it.
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