84 lines
1.8 KiB
JavaScript
84 lines
1.8 KiB
JavaScript
const { DataTypes } = require('sequelize');
|
||
const sequelize = require('../config/db');
|
||
|
||
const PaymentSetting = sequelize.define('PaymentSetting', {
|
||
id: {
|
||
type: DataTypes.INTEGER,
|
||
primaryKey: true,
|
||
autoIncrement: true,
|
||
comment: 'ID'
|
||
},
|
||
alipayAccount: {
|
||
type: DataTypes.STRING(100),
|
||
allowNull: true,
|
||
comment: '支付宝收款账号'
|
||
},
|
||
alipayName: {
|
||
type: DataTypes.STRING(50),
|
||
allowNull: true,
|
||
defaultValue: '支付宝',
|
||
comment: '支付宝显示名称'
|
||
},
|
||
wechatId: {
|
||
type: DataTypes.STRING(50),
|
||
allowNull: true,
|
||
comment: '客服微信号'
|
||
},
|
||
wechatText: {
|
||
type: DataTypes.STRING(100),
|
||
allowNull: true,
|
||
defaultValue: '请添加客服微信',
|
||
comment: '微信显示文字'
|
||
},
|
||
bankName: {
|
||
type: DataTypes.STRING(100),
|
||
allowNull: true,
|
||
comment: '开户行'
|
||
},
|
||
bankAccount: {
|
||
type: DataTypes.STRING(50),
|
||
allowNull: true,
|
||
comment: '银行账号'
|
||
},
|
||
bankHolder: {
|
||
type: DataTypes.STRING(100),
|
||
allowNull: true,
|
||
comment: '户名'
|
||
},
|
||
servicePhone: {
|
||
type: DataTypes.STRING(20),
|
||
allowNull: true,
|
||
comment: '客服电话'
|
||
},
|
||
serviceTime: {
|
||
type: DataTypes.STRING(50),
|
||
allowNull: true,
|
||
defaultValue: '9:00-18:00',
|
||
comment: '工作时间'
|
||
},
|
||
isDeleted: {
|
||
type: DataTypes.INTEGER,
|
||
allowNull: false,
|
||
defaultValue: 0,
|
||
comment: '删除状态(0:未删除,1:已删除)'
|
||
},
|
||
createTime: {
|
||
type: DataTypes.DATE,
|
||
allowNull: false,
|
||
defaultValue: DataTypes.NOW,
|
||
comment: '创建时间'
|
||
},
|
||
updateTime: {
|
||
type: DataTypes.DATE,
|
||
allowNull: false,
|
||
defaultValue: DataTypes.NOW,
|
||
comment: '更新时间'
|
||
}
|
||
}, {
|
||
tableName: 'payment_settings',
|
||
timestamps: false,
|
||
comment: '支付设置表'
|
||
});
|
||
|
||
module.exports = PaymentSetting;
|