module models // структуры объявляются в принципе как в гошке, заисключением того что видимо взято из С происходит деление на публичные и приватные // поэтому для того чтобы реализовать инкапсуляцию, если указать ключевое слово pub - будет все доступно pub struct Button { pub mut: text string @[json: 'Text'] state string @[json: 'State'] } pub struct Question { pub mut: title string @[json: 'Title'] description string @[json: 'Description'] buttons []Button @[json: 'Buttons'] } 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 } [table: 'question'] pub struct QuizQuestion { pub mut: id i64 [primary; sql: serial] quiz_id i64 [sql: 'quiz_id'] title string [sql: 'title'] description string [sql: 'description'] question_type string [sql: 'questiontype'] content string [sql: 'content'] required bool [sql: 'required'] deleted bool [sql: 'deleted'] }