Move BusinessOpeningHoursInterval to separate file

This commit is contained in:
Akshett Rai Jindal 2024-08-21 10:18:47 +05:30
parent f6c957182f
commit b15d85ec0a
3 changed files with 17 additions and 12 deletions

View file

@ -14,6 +14,7 @@ pub use business_intro::*;
pub use business_location::*; pub use business_location::*;
pub use business_messages_deleted::*; pub use business_messages_deleted::*;
pub use business_opening_hours::*; pub use business_opening_hours::*;
pub use business_opening_hours_interval::*;
pub use callback_game::*; pub use callback_game::*;
pub use callback_query::*; pub use callback_query::*;
pub use chat::*; pub use chat::*;
@ -174,6 +175,7 @@ mod business_intro;
mod business_location; mod business_location;
mod business_messages_deleted; mod business_messages_deleted;
mod business_opening_hours; mod business_opening_hours;
mod business_opening_hours_interval;
mod callback_game; mod callback_game;
mod callback_query; mod callback_query;
mod chat; mod chat;

View file

@ -1,17 +1,6 @@
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] use crate::types::BusinessOpeningHoursInterval;
pub struct BusinessOpeningHoursInterval {
/// The minute's sequence number in a week, starting on Monday, marking the
/// start of the time interval during which the business is open;
/// 0 - 7 * 24* 60
pub opening_minute: u16,
/// The minute's sequence number in a week, starting on Monday, marking the
/// end of the time interval during which the business is open;
/// 0 - 8 * 24* 60
pub closing_minute: u16,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct BusinessOpeningHours { pub struct BusinessOpeningHours {

View file

@ -0,0 +1,14 @@
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct BusinessOpeningHoursInterval {
/// The minute's sequence number in a week, starting on Monday, marking the
/// start of the time interval during which the business is open;
/// 0 - 7 * 24* 60
pub opening_minute: u16,
/// The minute's sequence number in a week, starting on Monday, marking the
/// end of the time interval during which the business is open;
/// 0 - 8 * 24* 60
pub closing_minute: u16,
}