update profile and models
This commit is contained in:
@@ -0,0 +1,196 @@
|
||||
const Sequelize = require('sequelize');
|
||||
module.exports = function(sequelize, DataTypes) {
|
||||
return sequelize.define('MainCards', {
|
||||
id: {
|
||||
autoIncrement: true,
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
primaryKey: true
|
||||
},
|
||||
name: {
|
||||
type: DataTypes.STRING(100),
|
||||
allowNull: false
|
||||
},
|
||||
title: {
|
||||
type: DataTypes.STRING(100),
|
||||
allowNull: false
|
||||
},
|
||||
short_title: {
|
||||
type: DataTypes.STRING(35),
|
||||
allowNull: false
|
||||
},
|
||||
description: {
|
||||
type: DataTypes.STRING(250),
|
||||
allowNull: false
|
||||
},
|
||||
background_picture: {
|
||||
type: DataTypes.STRING(150),
|
||||
allowNull: false
|
||||
},
|
||||
button1: {
|
||||
type: DataTypes.STRING(35),
|
||||
allowNull: false
|
||||
},
|
||||
button1_text: {
|
||||
type: DataTypes.STRING(35),
|
||||
allowNull: false
|
||||
},
|
||||
button1_action: {
|
||||
type: DataTypes.STRING(15),
|
||||
allowNull: false
|
||||
},
|
||||
status: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 1
|
||||
},
|
||||
added: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: true,
|
||||
defaultValue: Sequelize.Sequelize.fn('now')
|
||||
},
|
||||
can_save: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
},
|
||||
template: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
},
|
||||
card_canexpire: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
},
|
||||
card_expiration: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: true
|
||||
},
|
||||
notify: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
},
|
||||
card_country: {
|
||||
type: DataTypes.STRING(2),
|
||||
allowNull: true
|
||||
},
|
||||
card_action_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true
|
||||
},
|
||||
titleshow: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 1
|
||||
},
|
||||
multiple_answer: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
},
|
||||
use_short_title: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 1
|
||||
},
|
||||
deleted: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: true
|
||||
},
|
||||
list_order: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
},
|
||||
target_key: {
|
||||
type: DataTypes.STRING(10),
|
||||
allowNull: true
|
||||
},
|
||||
target_text: {
|
||||
type: DataTypes.STRING(250),
|
||||
allowNull: true
|
||||
},
|
||||
long_description: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true
|
||||
},
|
||||
card_behavior: {
|
||||
type: DataTypes.STRING(10),
|
||||
allowNull: true
|
||||
},
|
||||
card_type: {
|
||||
type: DataTypes.STRING(2),
|
||||
allowNull: true,
|
||||
defaultValue: ""
|
||||
},
|
||||
card_time: {
|
||||
type: DataTypes.STRING(12),
|
||||
allowNull: true,
|
||||
defaultValue: ""
|
||||
},
|
||||
card_location: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
},
|
||||
members_cards: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
},
|
||||
card_points: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
},
|
||||
card_reciept: {
|
||||
type: DataTypes.STRING(15),
|
||||
allowNull: true
|
||||
},
|
||||
card_logic: {
|
||||
type: DataTypes.STRING(15),
|
||||
allowNull: true,
|
||||
defaultValue: ""
|
||||
},
|
||||
card_order: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 100
|
||||
},
|
||||
background_color: {
|
||||
type: DataTypes.STRING(8),
|
||||
allowNull: true
|
||||
},
|
||||
dynamic_key: {
|
||||
type: DataTypes.STRING(25),
|
||||
allowNull: true
|
||||
},
|
||||
blog_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true
|
||||
},
|
||||
show_area: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
},
|
||||
activity_screen: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
},
|
||||
expiration: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
defaultValue: 0
|
||||
}
|
||||
}, {
|
||||
sequelize,
|
||||
tableName: 'main_cards',
|
||||
schema: 'public',
|
||||
timestamps: false
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user