mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-05 04:38:37 +08:00
7753ba2d37
Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: Yeuoly <admin@srmxy.cn> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: jyong <jyong@dify.ai> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: jyong <718720800@qq.com>
39 lines
941 B
Python
39 lines
941 B
Python
from flask_restful import fields
|
|
|
|
from libs.helper import TimestampField
|
|
|
|
simple_account_fields = {
|
|
'id': fields.String,
|
|
'name': fields.String,
|
|
'email': fields.String
|
|
}
|
|
|
|
account_fields = {
|
|
'id': fields.String,
|
|
'name': fields.String,
|
|
'avatar': fields.String,
|
|
'email': fields.String,
|
|
'is_password_set': fields.Boolean,
|
|
'interface_language': fields.String,
|
|
'interface_theme': fields.String,
|
|
'timezone': fields.String,
|
|
'last_login_at': TimestampField,
|
|
'last_login_ip': fields.String,
|
|
'created_at': TimestampField
|
|
}
|
|
|
|
account_with_role_fields = {
|
|
'id': fields.String,
|
|
'name': fields.String,
|
|
'avatar': fields.String,
|
|
'email': fields.String,
|
|
'last_login_at': TimestampField,
|
|
'created_at': TimestampField,
|
|
'role': fields.String,
|
|
'status': fields.String,
|
|
}
|
|
|
|
account_with_role_list_fields = {
|
|
'accounts': fields.List(fields.Nested(account_with_role_fields))
|
|
}
|