module.exports=(s,D)=>{const M=s.define("ShippingRate",{id:{type:D.STRING,primaryKey:true},shipping_zone_id:{type:D.STRING,allowNull:false},shipping_method_id:{type:D.STRING,allowNull:false},currency:{type:D.STRING(3),allowNull:false},base_amount:{type:D.DECIMAL(15,2),allowNull:false},free_shipping_threshold:D.DECIMAL(15,2),minimum_subtotal:D.DECIMAL(15,2),maximum_subtotal:D.DECIMAL(15,2),status:{type:D.ENUM("ACTIVE","INACTIVE"),allowNull:false,defaultValue:"ACTIVE"},starts_at:D.DATE,ends_at:D.DATE},{tableName:"shipping_rates",timestamps:true});M.associate=db=>M.belongsTo(db.ShippingMethod,{foreignKey:"shipping_method_id",as:"method"});return M;};