17 lines
292 B
JavaScript
17 lines
292 B
JavaScript
import { Record } from 'immutable';
|
|
|
|
export default class Auction extends Record({
|
|
id: null,
|
|
bidCount: 0,
|
|
isBidding: false,
|
|
isWinning: false,
|
|
itemPrice: 0,
|
|
}) {}
|
|
|
|
Auction.fromJS = (data = {}) => {
|
|
return new Auction({
|
|
id: data._id,
|
|
...data,
|
|
});
|
|
};
|