mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
27 lines
616 B
C#
27 lines
616 B
C#
using Telegram.Bot.Types.ReplyMarkups;
|
|
|
|
namespace West.TelegramBot.ContentStore.Model;
|
|
|
|
public class StoreItem
|
|
{
|
|
public string Id;
|
|
public readonly string Name;
|
|
public readonly double Price;
|
|
public readonly int Order;
|
|
|
|
public StoreItem(string id, string name, double price, int order = 0)
|
|
{
|
|
Id = id;
|
|
Name = name;
|
|
Price = price;
|
|
Order = order;
|
|
}
|
|
|
|
public InlineKeyboardButton ToButton(long userId)
|
|
{
|
|
return new InlineKeyboardButton($"{Name} ({Price})")
|
|
{
|
|
CallbackData = $"store|{userId}|purchase|{Id}"
|
|
};
|
|
}
|
|
} |