mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
@@ -0,0 +1,26 @@
|
||||
/***********************************************************************************************************************************************************************
|
||||
* File Name: plan_prices.mdl.js
|
||||
* Type of Program: Model
|
||||
* Description: Admin-managed localized price overrides for tier plans.
|
||||
* One row per (plan_id, currency) pair. When a user's preferred_currency
|
||||
* matches a row here, the override price is shown instead of the base price.
|
||||
* Author: Kenneth Obsequio (@lash0000)
|
||||
* Date Created: Jun. 29, 2026
|
||||
***********************************************************************************************************************************************************************/
|
||||
'use strict';
|
||||
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../../config/db.config');
|
||||
|
||||
const mdl_PlanPrices = sequelize.define('PlanPrice', {
|
||||
price_id: { type: DataTypes.BIGINT, primaryKey: true, autoIncrement: true },
|
||||
plan_id: { type: DataTypes.BIGINT, allowNull: false },
|
||||
currency: { type: DataTypes.CHAR(3), allowNull: false, label: 'Currency' },
|
||||
price: { type: DataTypes.DECIMAL(10, 2), allowNull: false, label: 'Price' },
|
||||
}, {
|
||||
tableName: 'plan_prices',
|
||||
timestamps: true,
|
||||
paranoid: false,
|
||||
});
|
||||
|
||||
module.exports = mdl_PlanPrices;
|
||||
Reference in New Issue
Block a user