-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from Chia-Network/feat/models-cleanup
Feat/models cleanup
- Loading branch information
Showing
24 changed files
with
389 additions
and
454 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }; |
Oops, something went wrong.