Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Hao-Hsiang Song
/
topics-auction
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e925419d
authored
Nov 29, 2018
by
Bright Sukumpanumet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Boolean canBuyNow, shippingCost, quantity
parent
4eec918d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
1 deletions
src/main/java/edu/uchicago/mpcs/topics/auction/Item.java
src/main/java/edu/uchicago/mpcs/topics/auction/Item.java
View file @
e925419d
...
...
@@ -24,6 +24,9 @@ public class Item
private
Long
categoryId
;
private
double
currentPrice
;
private
double
buyNowPrice
;
private
Long
quantity
;
private
Double
shippingCost
;
private
Boolean
canBuyNow
;
private
Date
startTime
;
//Start the auction when the current time matches the start time defined by the user
private
Date
endTime
;
//Allowing auction window to be set by the bidder, and begin countdown to the end of the bidding window once auction begins
...
...
@@ -43,7 +46,8 @@ public class Item
{
}
public
Item
(
String
title
,
String
description
,
Long
categoryId
,
double
currentPrice
,
double
buyNowPrice
,
String
photoUrl
,
Long
userId
)
public
Item
(
String
title
,
String
description
,
Long
categoryId
,
double
currentPrice
,
double
buyNowPrice
,
String
photoUrl
,
Long
userId
,
Boolean
canBuyNow
)
{
this
.
title
=
title
;
this
.
description
=
description
;
...
...
@@ -52,6 +56,7 @@ public class Item
this
.
buyNowPrice
=
buyNowPrice
;
this
.
photoUrl
=
photoUrl
;
this
.
userId
=
userId
;
this
.
canBuyNow
=
canBuyNow
;
}
public
Long
getItemId
()
...
...
@@ -157,4 +162,54 @@ public class Item
{
this
.
status
=
status
;
}
public
Long
getQuantity
()
{
return
quantity
;
}
public
void
setQuantity
(
Long
quantity
)
{
this
.
quantity
=
quantity
;
}
public
Double
getShippingCost
()
{
return
shippingCost
;
}
public
void
setShippingCost
(
Double
shippingCost
)
{
this
.
shippingCost
=
shippingCost
;
}
public
Boolean
getCanBuyNow
()
{
return
canBuyNow
;
}
public
void
setCanBuyNow
(
Boolean
canBuyNow
)
{
this
.
canBuyNow
=
canBuyNow
;
}
public
Date
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
Date
startTime
)
{
this
.
startTime
=
startTime
;
}
public
Date
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment