2024-08-13 14:44:10 +08:00
|
|
|
from flask_restful import fields
|
|
|
|
|
|
|
|
from libs.helper import TimestampField
|
|
|
|
|
|
|
|
conversation_variable_fields = {
|
2024-08-15 12:54:05 +08:00
|
|
|
"id": fields.String,
|
|
|
|
"name": fields.String,
|
|
|
|
"value_type": fields.String(attribute="value_type.value"),
|
|
|
|
"value": fields.String,
|
|
|
|
"description": fields.String,
|
|
|
|
"created_at": TimestampField,
|
|
|
|
"updated_at": TimestampField,
|
2024-08-13 14:44:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
paginated_conversation_variable_fields = {
|
2024-08-15 12:54:05 +08:00
|
|
|
"page": fields.Integer,
|
|
|
|
"limit": fields.Integer,
|
|
|
|
"total": fields.Integer,
|
|
|
|
"has_more": fields.Boolean,
|
|
|
|
"data": fields.List(fields.Nested(conversation_variable_fields), attribute="data"),
|
2024-08-13 14:44:10 +08:00
|
|
|
}
|