Add this line into your server.cfg
This line determines who can access the main panel to manage, create, or send redeem codes.
add_ace group.admin createredeem.openmenu allow
CREATE TABLE `g_redeem_code` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`redeem_code` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
`createdBy` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
`createdAt` DATETIME NOT NULL DEFAULT current_timestamp(),
`updatedAt` DATETIME NULL DEFAULT NULL ON UPDATE current_timestamp(),
`expiryDate` DATETIME NULL DEFAULT NULL,
`creatorIdentifier` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
`usage_limit` INT(11) NULL DEFAULT NULL,
`remainingUses` INT(11) NULL DEFAULT '0',
`expired` TINYINT(1) NULL DEFAULT '0',
`enable` TINYINT(1) NULL DEFAULT '1',
`claimed_redeem` TINYINT(1) NULL DEFAULT '0',
`items` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
`type` VARCHAR(50) NULL DEFAULT 'redeem' COLLATE 'utf8mb4_general_ci',
`receiver_identifier` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
`receiver_name` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `redeem_code` (`redeem_code`) USING BTREE,
CONSTRAINT `items` CHECK (json_valid(`items`))
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=1
;
CREATE TABLE `g_redeem_log` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`identifier` VARCHAR(46) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
`redeem_code` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
`name` CHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
PRIMARY KEY (`id`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=1
;