| Total Complexity | 0 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding:utf-8 -*- |
||
| 2 | """ |
||
| 3 | SettingSchema module |
||
| 4 | """ |
||
| 5 | |||
| 6 | from loglan_core import Setting |
||
| 7 | |||
| 8 | from app.api.schemas import ma |
||
| 9 | |||
| 10 | |||
| 11 | class SettingSchema(ma.SQLAlchemyAutoSchema): |
||
| 12 | class Meta: |
||
| 13 | model = Setting |
||
| 14 | exclude = ("created", "updated") |
||
| 15 | |||
| 16 | |||
| 17 | setting_schema_nested = SettingSchema(only=Setting.attributes_basic()) |
||
| 18 | setting_schema_full = SettingSchema(only=Setting.attributes_extended()) |
||
| 19 | |||
| 20 | blue_print_export = (Setting, setting_schema_nested, setting_schema_full) |
||
| 21 |