Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2027c13
commit 57ee9a5
Showing
17 changed files
with
407 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { DataTypes, Model, Sequelize } from 'sequelize'; | ||
|
||
type SwapType = { | ||
id: string; | ||
}; | ||
|
||
class MarkedSwap extends Model implements SwapType { | ||
public id!: string; | ||
|
||
public createdAt!: Date; | ||
public updatedAt!: Date; | ||
|
||
public static load = (sequelize: Sequelize): void => { | ||
MarkedSwap.init( | ||
{ | ||
id: { | ||
type: new DataTypes.STRING(255), | ||
primaryKey: true, | ||
allowNull: false, | ||
}, | ||
}, | ||
{ | ||
sequelize, | ||
tableName: 'markedSwaps', | ||
}, | ||
); | ||
}; | ||
} | ||
|
||
export default MarkedSwap; |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import MarkedSwap from '../models/MarkedSwap'; | ||
|
||
class MarkedSwapRepository { | ||
public static addMarkedSwap = (id: string) => { | ||
return MarkedSwap.create({ | ||
id, | ||
}); | ||
}; | ||
} | ||
|
||
export default MarkedSwapRepository; |
Oops, something went wrong.