diff --git a/hwe/sammo/Auction.php b/hwe/sammo/Auction.php
index 62ce874e..c3ca625e 100644
--- a/hwe/sammo/Auction.php
+++ b/hwe/sammo/Auction.php
@@ -69,7 +69,7 @@ class Auction
{
$db = DB::db();
$rawHighestBid = $db->queryFirstRow(
- 'SELECT * FROM ng_auction WHERE auction_id = %i ORDER BY `amount` DESC LIMIT 1',
+ 'SELECT * FROM ng_auction_bid WHERE auction_id = %i ORDER BY `amount` DESC LIMIT 1',
$this->info->id
);
if (!$rawHighestBid) {
@@ -83,7 +83,7 @@ class Auction
{
$db = DB::db();
$rawMyPrevBid = $db->queryFirstRow(
- 'SELECT * FROM ng_auction WHERE general_id = %i AND auction_id = %i ORDER BY `amount` DESC LIMIT 1',
+ 'SELECT * FROM ng_auction_bid WHERE general_id = %i AND auction_id = %i ORDER BY `amount` DESC LIMIT 1',
$this->general->getID(),
$this->info->id
);
@@ -216,7 +216,7 @@ class Auction
}
$rawMyPrevBid = $db->queryFirstRow(
- 'SELECT * FROM ng_auction WHERE general_id = %i AND auction_id = %i ORDER BY `amount` DESC LIMIT 1',
+ 'SELECT * FROM ng_auction_bid WHERE general_id = %i AND auction_id = %i ORDER BY `amount` DESC LIMIT 1',
$general->getID(),
$auctionInfo->id
);
@@ -247,7 +247,7 @@ class Auction
$tryExtendCloseDate,
)
);
- $db->insert('ng_auction', $newBid->toArray());
+ $db->insert('ng_auction_bid', $newBid->toArray());
if ($db->affectedRows() == 0) {
return '입찰에 실패했습니다: DB 오류';
}
@@ -339,7 +339,7 @@ class Auction
)
);
- $db->insert('ng_auction', $newBid->toArray());
+ $db->insert('ng_auction_bid', $newBid->toArray());
if ($db->affectedRows() == 0) {
return '입찰에 실패했습니다: DB 오류';
}
diff --git a/hwe/scss/auction.scss b/hwe/scss/auction.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/hwe/sql/reset.sql b/hwe/sql/reset.sql
index 4fdbf35b..c6464e56 100644
--- a/hwe/sql/reset.sql
+++ b/hwe/sql/reset.sql
@@ -68,4 +68,4 @@ DROP TABLE IF EXISTS ng_betting;
DROP TABLE IF EXISTS vote;
DROP TABLE IF EXISTS vote_comment;
-DROP TABLE IF EXISTS `ng_auction`;
\ No newline at end of file
+DROP TABLE IF EXISTS `ng_auction_bid`;
\ No newline at end of file
diff --git a/hwe/sql/schema.sql b/hwe/sql/schema.sql
index 1bba1110..00a1897c 100644
--- a/hwe/sql/schema.sql
+++ b/hwe/sql/schema.sql
@@ -706,4 +706,21 @@ CREATE TABLE `ng_auction` (
CONSTRAINT `aux` CHECK (json_valid(`aux`))
)
COLLATE='utf8mb4_general_ci'
+ENGINE = Aria;
+
+CREATE TABLE `ng_auction_bid` (
+ `no` INT(11) NOT NULL AUTO_INCREMENT,
+ `auction_id` INT(11) NOT NULL,
+ `owner` INT(11) NULL DEFAULT NULL,
+ `general_id` INT(11) NOT NULL,
+ `amount` INT(11) NOT NULL,
+ `date` DATETIME NOT NULL,
+ `aux` LONGTEXT NOT NULL COLLATE 'utf8mb4_bin',
+ PRIMARY KEY (`no`),
+ UNIQUE INDEX `by_general` (`general_id`, `auction_id`, `amount`),
+ UNIQUE INDEX `by_owner` (`owner`, `auction_id`, `amount`),
+ INDEX `by_amount` (`auction_id`, `amount`, `date`),
+ CONSTRAINT `aux` CHECK (json_valid(`aux`))
+)
+COLLATE='utf8mb4_general_ci'
ENGINE = Aria;
\ No newline at end of file
diff --git a/hwe/ts/PageAuction.vue b/hwe/ts/PageAuction.vue
new file mode 100644
index 00000000..1f53efe3
--- /dev/null
+++ b/hwe/ts/PageAuction.vue
@@ -0,0 +1,11 @@
+
+