telegram/models/models.v

16 lines
694 B
V
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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']
}