diff options
| author | Bobby <[email protected]> | 2022-05-03 16:19:23 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2022-05-03 16:19:23 -0400 |
| commit | cce1d920245f7ee128bde6d2e978138cbbdc6e46 (patch) | |
| tree | fb511ea1d13aa022ae431163415284e55e27c1b5 /interface/models/mandal_master.model.js | |
| parent | 45ed5c37a3ec4155616334b7e09a2c1679b3fb52 (diff) | |
| download | Welfare-Schemes-DMQL-cce1d920245f7ee128bde6d2e978138cbbdc6e46.tar.xz Welfare-Schemes-DMQL-cce1d920245f7ee128bde6d2e978138cbbdc6e46.zip | |
added models
Diffstat (limited to 'interface/models/mandal_master.model.js')
| -rw-r--r-- | interface/models/mandal_master.model.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/interface/models/mandal_master.model.js b/interface/models/mandal_master.model.js new file mode 100644 index 0000000..7b7d16f --- /dev/null +++ b/interface/models/mandal_master.model.js @@ -0,0 +1,25 @@ +module.exports = (Sequelize, sequelize) => { + const MandalMaster = sequelize.define("mandal_master", { + mandal_id: { + type: Sequelize.INTEGER, + allowNull: false, + primaryKey: true, + autoIncrement: true, + }, + mandal_name: { + type: Sequelize.STRING(155), + allowNull: false, + }, + district_id: { + type: Sequelize.INTEGER, + allowNull: false, + // FOREIGN KEY (district_id) REFERENCES public.district_master(district_id) ON DELETE CASCADE; + references: { + model: "district_master", + key: "district_id", + onDelete: "CASCADE", + }, + }, + }); + return MandalMaster; +}; |
