2025-06-12 20:58:22 +00:00
|
|
|
from flask_restx import fields, Namespace
|
|
|
|
|
2025-06-23 17:28:43 +00:00
|
|
|
billing_ns = Namespace('billing', description='Product price')
|
2025-06-12 20:58:22 +00:00
|
|
|
|
|
|
|
product_model = billing_ns.model('Product', {
|
|
|
|
'name': fields.String(required=True, description='Name of the product'),
|
|
|
|
'description': fields.String(required=True, description='Description of the product'),
|
|
|
|
'price': fields.Float(required=True, description='Price of the product'),
|
|
|
|
})
|
|
|
|
|
|
|
|
update_price_model = billing_ns.model('UpdatePrice', {
|
|
|
|
'price': fields.Float(required=False, description='New product price'),
|
|
|
|
'description': fields.String(required=False, description='New description of the product'),
|
|
|
|
'price': fields.Float(required=False, description='New price of the product'),
|
|
|
|
})
|