25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
388 B

  1. from flask_sqlalchemy import SQLAlchemy
  2. from flask_marshmallow import Marshmallow
  3. from marshmallow import fields
  4. from Config.DB.Models import Users
  5. ma = Marshmallow()
  6. class UsersSchema(ma.SQLAlchemyAutoSchema):
  7. admin = fields.Nested('self', attribute='Admin', many=False, default=None)
  8. class Meta:
  9. model = Users
  10. exclude = ['password', 'notification_token']