Open X0RBYT3 opened 3 years ago
Since I went with an integer for the currency column I used an integer for the 'fren' value. Here's the table:
CREATE TABLE `flobot_user_frens`
(
`id` varchar(18) NOT NULL UNIQUE,
`fren_id` varchar(18) NOT NULL UNIQUE,
`value` int NOT NULL,
PRIMARY KEY (`id`)
);
It might be a better idea to seperate the value and other attributes of the 'frens' into a seperate table that contains just 'fren' data. But I'm not sure what attributes should be saved.
Fren system will be a rough clone of Nadeko's existing 'Waifu' system.
Users will be able to purchase other users as 'frens', a 'fren' may only be attributed to one user at a time, and if another user wishes to have that person as a 'fren', then they can purchase them for current value + 10%.
'fren' value can be further increased by their owner by purchasing them gifts, which will be a dict of
{"item_name" : value: float}
.Users then can also choose 1 'bestie', who will receive a 5% discount on purchasing them and purchasing them gifts.
Users and their frens, Fren's and their gifts and value and users and their besties should all be stored inside the SQL