Skip to content

Commit

Permalink
Merge pull request #25 from Chia-Network/feat/models-cleanup
Browse files Browse the repository at this point in the history
Feat/models cleanup
  • Loading branch information
MichaelTaylor3D authored Dec 5, 2021
2 parents ecd5805 + e282581 commit 188be5b
Show file tree
Hide file tree
Showing 24 changed files with 389 additions and 454 deletions.
28 changes: 0 additions & 28 deletions models/cobenefit.js

This file was deleted.

37 changes: 0 additions & 37 deletions models/index.js

This file was deleted.

29 changes: 0 additions & 29 deletions models/party.js

This file was deleted.

47 changes: 0 additions & 47 deletions models/project.js

This file was deleted.

29 changes: 0 additions & 29 deletions models/projectlocation.js

This file was deleted.

31 changes: 0 additions & 31 deletions models/projectrating.js

This file was deleted.

35 changes: 0 additions & 35 deletions models/qualification.js

This file was deleted.

30 changes: 0 additions & 30 deletions models/relatedproject.js

This file was deleted.

40 changes: 0 additions & 40 deletions models/unit.js

This file was deleted.

32 changes: 0 additions & 32 deletions models/vintage.js

This file was deleted.

32 changes: 28 additions & 4 deletions src/models/co-benefits/co-benefits.model.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
'use strict';
import Sequelize from 'sequelize';
const { DataTypes, Model } = Sequelize;
import { sequelize } from '../database';

class CoBenefits {
static list(page = 0, limit = 10) {
return stub;
class CoBenefit extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
}

}

export { CoBenefits };
CoBenefit.init({
id: {
type: Sequelize.NUMBER,
primaryKey: true,
},
benefit: Sequelize.STRING,
owner: Sequelize.STRING,
projectId: Sequelize.NUMBER,
createdAt: Sequelize.DATE,
updatedAt: Sequelize.DATE,
}, {
sequelize,
modelName: 'CoBenefits',
});

export { CoBenefit };
Loading

0 comments on commit 188be5b

Please sign in to comment.