transfer_national.ts 830 字节
/* jshint indent: 2 */
import * as moment from 'moment';

module.exports = function(sequelize:any, DataTypes:any) {
  return sequelize.define('transfer_national', {
    id: {
      type: DataTypes.BIGINT,
      allowNull: false,
      primaryKey: true
    },
    name: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    link: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    created_at: {
      type: DataTypes.BIGINT,
      allowNull: true,
      get(){
        return moment(this.getDataValue('created_at')).format('YYYY-MM-DD HH:mm:ss');
      }
    },
    updated_at: {
      type: DataTypes.BIGINT,
      allowNull: true,
      get(){
        return moment(this.getDataValue('updated_at')).format('YYYY-MM-DD HH:mm:ss');
      }
    }
  }, {
    tableName: 'transfer_national'
  });
};