Last active
January 26, 2021 03:55
-
-
Save thanakijwanavit/30445bca62b4e553231f6ae5e881a504 to your computer and use it in GitHub Desktop.
productSchemaFor villaMasterSchema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dataclasses_json import dataclass_json, Undefined, CatchAll | |
| from dataclasses_jsonschema import JsonSchemaMixin | |
| from dataclasses import dataclass | |
| from typing import List | |
| @dataclass_json(undefined=Undefined.INCLUDE) | |
| @dataclass | |
| class Product(JsonSchemaMixin): | |
| iprcode: int | |
| cprcode: int | |
| # data: CatchAll | |
| @dataclass_json | |
| @dataclass | |
| class ValueUpdate(JsonSchemaMixin): | |
| items: List[Product] | |
| def product(): | |
| return Product |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment