mirror of
https://github.com/plankanban/planka.git
synced 2025-12-19 01:12:02 +03:00
Add covers for cards
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Model, attr, fk, many } from 'redux-orm';
|
||||
import { Model, attr, fk, many, oneToOne } from 'redux-orm';
|
||||
|
||||
import ActionTypes from '../constants/ActionTypes';
|
||||
import Config from '../constants/Config';
|
||||
@@ -32,6 +32,11 @@ export default class extends Model {
|
||||
as: 'board',
|
||||
relatedName: 'cards',
|
||||
}),
|
||||
coverAttachmentId: oneToOne({
|
||||
to: 'Attachment',
|
||||
as: 'coverAttachment',
|
||||
relatedName: 'coveredCard',
|
||||
}),
|
||||
users: many('User', 'cards'),
|
||||
labels: many('Label', 'cards'),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user