RecordInfoModel.js 1.5 KB
var  sequelize = require('../config');
var Sequelize = require('sequelize');
var uuid = require('../util/UuidUtil')


var  recordInfo = sequelize.define('3m_record_info', {
    id: {
        type: Sequelize.STRING(32),
        defaultValue:uuid.db32(),
        allowNull: false,
        unique: true,
        primaryKey: true,
        field: "id"
    },
    appId: {
        allowNull: false,        
        type:Sequelize.STRING(50),
        field: "app_id"
    },
    channel: {
        allowNull: false,        
        type:Sequelize.STRING(50),
        field: "channel"
    },
    channelKey:{
        type:Sequelize.STRING(50),
        field: "channel_key"
    },
    uid:{
        type:Sequelize.STRING(50),
        field: "uid"
    },
    userId:{
        type:Sequelize.STRING(50),
        field: "user_id"
    },
    userRole:{
        type:Sequelize.STRING(50),
        field: "user_role"
    },
    userName:{
        type:Sequelize.STRING(50),
        field: "user_name"
    },
    timestamp:{
        type:Sequelize.STRING(50),
        field: "timestamp"
    },
    recordTimestamp:{
        type:Sequelize.STRING(50),
        field: "recordTimestamp"
    },
    createTime:{
        type:Sequelize.STRING(50),
        field: "create_time"
    },
    status:{
        type:Sequelize.INTEGER(1),
        field:'status',
    },
    type:{
        type:Sequelize.INTEGER(1),
        field:'type',
    }
   
    
}, {
        timestamps: false,
        freezeTableName: true
    });

module.exports = recordInfo;