feat: implement business pricing service and money utilities
- Added `businessPricing.service.js` to handle business customer pricing logic. - Introduced `money.js` for money parsing, formatting, and calculations. - Created `pricing.service.js` to manage variant quoting and promotion application. - Updated validation schemas in `catalogue.schemas.js` and `inventoryMerchandising.schemas.js` for new pricing and inventory features. - Implemented cron job for inventory reservation expiry in `inventoryReservationExpiry.cron.js`. - Created database migrations for catalogue and inventory structures. - Added unit tests for catalogue localization, validation, and inventory merchandising functionalities.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
module.exports=(s,D)=>{const M=s.define("VariantBusinessPrice",{id:{type:D.STRING,primaryKey:true},variant_id:{type:D.STRING,allowNull:false},business_tier_id:D.STRING,business_customer_id:D.STRING,currency:{type:D.STRING(3),allowNull:false},price:{type:D.DECIMAL(15,2),allowNull:false},minimum_quantity:{type:D.INTEGER,allowNull:false,defaultValue:1},status:{type:D.ENUM("ACTIVE","INACTIVE"),allowNull:false,defaultValue:"ACTIVE"},starts_at:D.DATE,ends_at:D.DATE},{tableName:"variant_business_prices",timestamps:true});M.associate=db=>M.hasMany(db.BusinessPriceTier,{foreignKey:"business_price_id",as:"tiers"});return M;};
|
||||
Reference in New Issue
Block a user