2024-08-01 14:23:54 +00:00
|
|
|
|
module models
|
|
|
|
|
// структуры объявляются в принципе как в гошке, заисключением того что видимо взято из С происходит деление на публичные и приватные
|
|
|
|
|
// поэтому для того чтобы реализовать инкапсуляцию, если указать ключевое слово pub - будет все доступно
|
|
|
|
|
|
|
|
|
|
pub struct Button {
|
|
|
|
|
pub mut:
|
2024-08-08 19:57:58 +00:00
|
|
|
|
text string @[json: 'Text']
|
|
|
|
|
state string @[json: 'State']
|
2024-08-01 14:23:54 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub struct Question {
|
|
|
|
|
pub mut:
|
2024-08-08 19:57:58 +00:00
|
|
|
|
title string @[json: 'Title']
|
|
|
|
|
description string @[json: 'Description']
|
|
|
|
|
buttons []Button @[json: 'Buttons']
|
2024-08-15 14:24:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub struct TelegramIntegration {
|
|
|
|
|
pub mut:
|
|
|
|
|
id i64
|
|
|
|
|
account_id string
|
|
|
|
|
quiz_id string
|
|
|
|
|
bot_token string
|
|
|
|
|
repeatable bool
|
|
|
|
|
name string
|
|
|
|
|
description string
|
|
|
|
|
deleted bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub struct RespondentState {
|
|
|
|
|
pub mut:
|
|
|
|
|
id i64
|
|
|
|
|
telegram_id i64
|
|
|
|
|
quiz_id i64
|
|
|
|
|
state string
|
|
|
|
|
lang string
|
|
|
|
|
contact string
|
|
|
|
|
finish bool
|
|
|
|
|
}
|