'use strict'; module.exports = dc => { const DataTypes = dc.ORM; const sequelize = dc.orm; const UserBillingProfile = sequelize.define('userBillingProfile', { userId: { type: DataTypes.BIGINT, allowNull: false, primaryKey: true, field: 'user_id', comment: 'User id', }, policyCode: { type: DataTypes.STRING(64), allowNull: false, field: 'policy_code', comment: 'Bound billing policy code', }, activatedAt: { type: DataTypes.DATE, allowNull: false, defaultValue: sequelize.literal('CURRENT_TIMESTAMP'), field: 'activated_at', comment: 'Policy activated at', }, createdAt: { type: DataTypes.DATE, allowNull: false, defaultValue: sequelize.literal('CURRENT_TIMESTAMP'), field: 'created_at', comment: 'Created at', }, updatedAt: { type: DataTypes.DATE, allowNull: false, defaultValue: sequelize.literal('CURRENT_TIMESTAMP'), field: 'updated_at', comment: 'Updated at', }, }, { tableName: 'user_billing_profile', comment: 'User billing profile table', timestamps: false, indexes: [], }); dc.models.UserBillingProfile = UserBillingProfile; return UserBillingProfile; };