Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_course_order
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
彭熊
tamp_course_order
Commits
d5d4393a
Commit
d5d4393a
authored
Apr 19, 2021
by
etscript
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加model
parent
0a001e07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
tamp_course_models.py
app/model/tamp_course_models.py
+42
-0
No files found.
app/model/tamp_course_models.py
0 → 100644
View file @
d5d4393a
# coding: utf-8
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
sqlalchemy.ext.declarative
import
declarative_base
from
app.model.base
import
Base
,
BaseModel
class
CoursePackage
(
Base
,
BaseModel
):
__tablename__
=
'course_package'
__table_args__
=
{
'comment'
:
'课程包'
}
id
=
Column
(
String
(
64
),
primary_key
=
True
)
main_title
=
Column
(
String
(
64
),
nullable
=
False
,
comment
=
'主标题'
)
two_title
=
Column
(
String
(
64
),
comment
=
'副标题'
)
type
=
Column
(
INTEGER
(
3
),
nullable
=
False
,
server_default
=
text
(
"'0'"
),
comment
=
'1:普通课程包 2:定期更新系列课程'
)
course_type
=
Column
(
INTEGER
(
3
),
nullable
=
False
,
server_default
=
text
(
"'0'"
),
comment
=
'1:目录 2:资源'
)
update_rule
=
Column
(
String
(
64
),
comment
=
'定期更新更新规则描述'
)
res_update_time
=
Column
(
DateTime
,
comment
=
'定期资源最后更新时间'
)
square_img
=
Column
(
String
(
128
),
nullable
=
False
,
comment
=
'方图'
)
bg_status
=
Column
(
INTEGER
(
3
),
nullable
=
False
,
server_default
=
text
(
"'0'"
),
comment
=
'0:没有 1:有 讲师图'
)
bg_img
=
Column
(
String
(
128
),
comment
=
'背景图地址'
)
length_img
=
Column
(
String
(
128
),
nullable
=
False
,
comment
=
'长图'
)
progression_status
=
Column
(
INTEGER
(
3
),
nullable
=
False
,
server_default
=
text
(
"'2'"
),
comment
=
'发刊词状态 1:有发刊词 2:没有发刊词'
)
progression_name
=
Column
(
String
(
64
),
comment
=
'发刊词名称'
)
progression_id
=
Column
(
String
(
64
),
comment
=
'发刊词id'
)
course_sparkle
=
Column
(
Text
,
comment
=
'课程亮点'
)
course_table
=
Column
(
String
(
128
),
comment
=
'课程表'
)
buy_notice
=
Column
(
Text
,
comment
=
'购买须知'
)
audition_setting
=
Column
(
INTEGER
(
3
),
nullable
=
False
,
server_default
=
text
(
"'0'"
),
comment
=
'试听设置 0:无试听 1:有试听'
)
audition_type
=
Column
(
INTEGER
(
3
),
server_default
=
text
(
"'0'"
),
comment
=
'试听类型 1:任意选择课程 2:指定课程'
)
every_select_num
=
Column
(
INTEGER
(
3
),
server_default
=
text
(
"'0'"
),
comment
=
'试听课程数量'
)
total_num
=
Column
(
INTEGER
(
5
),
nullable
=
False
,
server_default
=
text
(
"'0'"
),
comment
=
'总期数'
)
status
=
Column
(
INTEGER
(
3
),
nullable
=
False
,
server_default
=
text
(
"'0'"
),
comment
=
'0:待上架 1:上架 2:下架'
)
sort
=
Column
(
INTEGER
(
5
),
nullable
=
False
,
server_default
=
text
(
"'999'"
),
comment
=
'排序'
)
stu_pv
=
Column
(
INTEGER
(
8
),
comment
=
'学习总人次'
)
stu_uv
=
Column
(
INTEGER
(
8
),
comment
=
'学习总人数'
)
create_time
=
Column
(
DateTime
,
nullable
=
False
,
server_default
=
text
(
"CURRENT_TIMESTAMP"
))
create_by
=
Column
(
String
(
64
),
nullable
=
False
,
server_default
=
text
(
"'admin'"
))
update_time
=
Column
(
DateTime
,
nullable
=
False
,
server_default
=
text
(
"CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"
))
update_by
=
Column
(
String
(
64
),
nullable
=
False
,
server_default
=
text
(
"'admin'"
))
delete_tag
=
Column
(
INTEGER
(
3
),
nullable
=
False
,
server_default
=
text
(
"'0'"
))
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