Preview:
import {DataTypes} from 'nodejs-express-utils';
import database from '../core/database';

export type ContactUsType = {
    id?: number;
    body: string;
    status?: string;
};
const tableName = 'contactUs';

export default database.init<ContactUsType>(tableName, {
    id: {
        type: DataTypes.UNSIGNED,
        isEncrypted: false,
        isRequired: false,
    },
    body: {
        type: DataTypes.CHAR,
        isEncrypted: true,
        isRequired: true,
    },
    status: {
        type: DataTypes.CHAR,
        isEncrypted: false,
        isRequired: false,
    },
});
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter