init
This commit is contained in:
2
app/models/__init__.py
Normal file
2
app/models/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding:utf-8 -*-
|
||||
26
app/models/form.py
Normal file
26
app/models/form.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
from sqlalchemy import Column, Integer, String, Float, TIMESTAMP, text, func
|
||||
from app.db.base import Base
|
||||
|
||||
|
||||
class Form(Base):
|
||||
__tablename__ = 'form'
|
||||
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
base_prompt = Column(String(length=1024))
|
||||
prompt = Column(String(length=2048))
|
||||
p_choice = Column(String(length=255))
|
||||
role = Column(String(length=255))
|
||||
name = Column(String(length=1024))
|
||||
uuid = Column(String(length=1024))
|
||||
desc = Column(String(length=2048))
|
||||
price = Column(Float)
|
||||
favorable = Column(String(length=1024))
|
||||
remark = Column(String(length=1024))
|
||||
otherPrompt = Column(String(length=1024))
|
||||
lang = Column(String(length=1024))
|
||||
type = Column(String(length=1024))
|
||||
created_at = Column(TIMESTAMP, server_default=func.now())
|
||||
updated_at = Column(TIMESTAMP, server_default=text('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'))
|
||||
18
app/models/result.py
Normal file
18
app/models/result.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding:utf-8 -*-
|
||||
from sqlalchemy import Column, Integer, String, TIMESTAMP, func, text
|
||||
|
||||
from app.db.base import Base
|
||||
|
||||
|
||||
class Result(Base):
|
||||
__tablename__ = 'result'
|
||||
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
prompt = Column(String())
|
||||
name = Column(String())
|
||||
uuid = Column(String())
|
||||
value = Column(String())
|
||||
lang = Column(String())
|
||||
created_at = Column(TIMESTAMP, server_default=func.now())
|
||||
updated_at = Column(TIMESTAMP, server_default=text('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'))
|
||||
Reference in New Issue
Block a user