Skip to content

Commit

Permalink
Update L2RasterProduct with Granules
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgarde committed Jul 12, 2023
1 parent 213ab71 commit 4094658
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 118 deletions.
4 changes: 4 additions & 0 deletions models/l2-raster-product.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DataTypes, Model} from 'sequelize';
import {v4 as uuidv4} from 'uuid';
import Granule from './granule.js';
import Status from './status.js';
import User from './user.js';

Expand Down Expand Up @@ -57,6 +58,9 @@ export function init(sequelize) {
* Setup model associations
*/
export function associate() {
L2RasterProduct.hasMany(Granule, {
foreignKey: 'productId',
});
L2RasterProduct.hasMany(Status, {
foreignKey: 'productId',
});
Expand Down
Loading

0 comments on commit 4094658

Please sign in to comment.