darkor

schema logs get

Jun 28th, 2023
755
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.71 KB | None | 0 0
  1. class SubscriptionModel:
  2.     subscription_log_details_model = subscriptions_api.model(
  3.         "SubscriptionsLogDetails",
  4.         {
  5.             "owner": fields.Nested(EMPLOYEE_MODEL, allow_null=True),
  6.             "status": fields.Integer,
  7.             "target_status": fields.Integer,
  8.             "payment_type": fields.Integer,
  9.             "tags": fields.List(fields.String),
  10.  
  11.             "billed": fields.Integer,
  12.             "budget_limit": fields.Float,
  13.             "card_id": fields.String,
  14.             "card_masked_pan": fields.String,
  15.             "approved_by": fields.Nested(EMPLOYEE_MODEL, allow_null=True),
  16.             "category": fields.Integer,
  17.             "reason": fields.String,
  18.  
  19.             "contract_duration": fields.Float,
  20.             "contract_duration_type": fields.Integer,
  21.             "terms_of_service_url": fields.String,
  22.             "contract_file": AwsS3FileFullUrl(attribute="contract_file"),
  23.             "contract_renewal_date": fields.Integer,
  24.             "signing_date": fields.Integer,
  25.             "expected_first_payment": fields.Integer,
  26.             "purchase_order": fields.String,
  27.         }
  28.     )
  29.  
  30.     subscription_log_model = subscriptions_api.model(
  31.         "SubscriptionsLog",
  32.         {
  33.             "id": fields.String,
  34.             "reported_by": fields.Nested(EMPLOYEE_MODEL, allow_null=True),
  35.             "created_at": fields.Integer,
  36.             "details": fields.Nested(subscription_log_details_model, skip_none=True),
  37.         }
  38.     )
  39.  
  40.     subscription_log_list_model = subscriptions_api.model(
  41.         "SubscriptionsLogsList",
  42.         {
  43.             "logs": fields.List(fields.Nested(subscription_log_model)),
  44.             "pagination": PaginationField,
  45.         },
  46.     )
Advertisement
Add Comment
Please, Sign In to add comment