<commit_before>import { sequelize, Sequelize } from './index';
import HocSinh_LopHoc from './hocsinh_lophoc-model';
import MonHoc from './monhoc-model';
import HocKy from './hocky-model';

const DiemMH = sequelize.define('AE_DIEM_MON_HOC', {
    maHocSinh: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        notNull: true,
        field: 'MA_HOC_SINH'
    },
    maLopHoc: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        notNull: true,
        field: 'MA_LOP_HOC'
    },
    maMonHoc: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        notNull: true,
        field: 'MA_MON_HOC'
    },
    maHocKy: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        notNull: true,
        field: 'MA_HOC_KI'
    },
    diem_15phut: {
        type: Sequelize.DECIMAL(4, 2),
        notNull: true,
        field: 'DIEM_15_PHUT'
    },
    diem_1tiet: {
        type: Sequelize.DECIMAL(4, 2),
        notNull: true,
        field: 'DIEM_1_TIET'
    },
    diemCuoiKy: {
        type: Sequelize.DECIMAL(4, 2),
        notNull: true,
        field: 'DIEM_CUOI_KI'
    }
});

HocSinh_LopHoc.hasMany(DiemMH, { foreignKey: 'maHocSinh', sourceKey: 'maHocSinh' });
DiemMH.belongsTo(HocSinh_LopHoc, { foreignKey: 'maHocSinh', targetKey: 'maHocSinh' });

HocSinh_LopHoc.hasMany(DiemMH, { foreignKey: 'maLopHoc', sourceKey: 'maLopHoc' });
DiemMH.belongsTo(HocSinh_LopHoc, { foreignKey: 'maLopHoc', targetKey: 'maLopHoc' });

MonHoc.hasMany(DiemMH, { foreignKey: 'maMonHoc', sourceKey: 'monHoc_pkey' });
DiemMH.belongsTo(MonHoc, { foreignKey: 'maMonHoc', targetKey: 'monHoc_pkey' });

HocKy.hasMany(DiemMH, { foreignKey: 'maHocKy', sourceKey: 'hocKy_pkey' });
DiemMH.belongsTo(HocKy, { foreignKey: 'maHocKy', targetKey: 'hocKy_pkey' });

export default DiemMH;<commit_msg>add tongDiem in diemmh-model follow db change<commit_after>import { sequelize, Sequelize } from './index';
import HocSinh_LopHoc from './hocsinh_lophoc-model';
import MonHoc from './monhoc-model';
import HocKy from './hocky-model';

const DiemMH = sequelize.define('AE_DIEM_MON_HOC', {
    maHocSinh: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        notNull: true,
        field: 'MA_HOC_SINH'
    },
    maLopHoc: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        notNull: true,
        field: 'MA_LOP_HOC'
    },
    maMonHoc: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        notNull: true,
        field: 'MA_MON_HOC'
    },
    maHocKy: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        notNull: true,
        field: 'MA_HOC_KI'
    },
    diem_15phut: {
        type: Sequelize.DECIMAL(4, 2),
        notNull: true,
        field: 'DIEM_15_PHUT'
    },
    diem_1tiet: {
        type: Sequelize.DECIMAL(4, 2),
        notNull: true,
        field: 'DIEM_1_TIET'
    },
    diemCuoiKy: {
        type: Sequelize.DECIMAL(4, 2),
        notNull: true,
        field: 'DIEM_CUOI_KI'
    },
    tongDiem: {
        type: Sequelize.DECIMAL(4, 2),
        field: 'TONG_DIEM'
    }
});

HocSinh_LopHoc.hasMany(DiemMH, { foreignKey: 'maHocSinh', sourceKey: 'maHocSinh' });
DiemMH.belongsTo(HocSinh_LopHoc, { foreignKey: 'maHocSinh', targetKey: 'maHocSinh' });

HocSinh_LopHoc.hasMany(DiemMH, { foreignKey: 'maLopHoc', sourceKey: 'maLopHoc' });
DiemMH.belongsTo(HocSinh_LopHoc, { foreignKey: 'maLopHoc', targetKey: 'maLopHoc' });

MonHoc.hasMany(DiemMH, { foreignKey: 'maMonHoc', sourceKey: 'monHoc_pkey' });
DiemMH.belongsTo(MonHoc, { foreignKey: 'maMonHoc', targetKey: 'monHoc_pkey' });

HocKy.hasMany(DiemMH, { foreignKey: 'maHocKy', sourceKey: 'hocKy_pkey' });
DiemMH.belongsTo(HocKy, { foreignKey: 'maHocKy', targetKey: 'hocKy_pkey' });

export default DiemMH;
{'fraction_non_alphanumeric': 0.13794940079893475, 'fraction_numerical': 0.006924101198402131, 'mean_word_length': 3.0257234726688105, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7200730', 'n_tokens_mistral': 1634, 'n_tokens_neox': 1543, 'n_words': 257}