Initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#ifndef GENRE_DTO_H
|
||||
#define GENRE_DTO_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
class GenreDTO {
|
||||
private:
|
||||
QString genreName_; // Genre name
|
||||
qint32 genreId_; // Unique ID for the genre
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
explicit GenreDTO() = default;
|
||||
explicit GenreDTO(const QString &genreName, qint32 genreId)
|
||||
: genreId_(genreId), genreName_(genreName) {}
|
||||
|
||||
// Setters (inline methods)
|
||||
inline void setGenreId(qint32 genreId) { genreId_ = genreId; }
|
||||
inline void setGenreName(const QString &genreName) { genreName_ = genreName; }
|
||||
|
||||
// Getters (inline methods)
|
||||
inline qint32 genreId() const { return genreId_; }
|
||||
inline QString genreName() const { return genreName_; }
|
||||
};
|
||||
|
||||
#endif // GENRE_DTO_H
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef HALL_DTO_H
|
||||
#define HALL_DTO_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
class HallDTO {
|
||||
private:
|
||||
QString hallName_; // Hall name
|
||||
qint32 capacity_; // Hall capacity
|
||||
qint32 hallId_; // Unique ID for the hall
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
explicit HallDTO() = default;
|
||||
explicit HallDTO(const QString &hallName, qint32 capacity, qint32 hallId)
|
||||
: hallName_(hallName), capacity_(capacity), hallId_(hallId) {}
|
||||
|
||||
// Setters (inline methods)
|
||||
inline void setHallName(const QString &hallName) { hallName_ = hallName; }
|
||||
inline void setCapacity(qint32 capacity) { capacity_ = capacity; }
|
||||
inline void setHallId(qint32 hallId) { hallId_ = hallId; }
|
||||
|
||||
// Getters (inline methods)
|
||||
inline QString hallName() const { return hallName_; }
|
||||
inline qint32 capacity() const { return capacity_; }
|
||||
inline qint32 hallId() const { return hallId_; }
|
||||
};
|
||||
|
||||
#endif // HALL_DTO_H
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef MOVIE_DTO_H
|
||||
#define MOVIE_DTO_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
class MovieDTO {
|
||||
private:
|
||||
QString title_; // Movie title
|
||||
qint32 duration_; // Movie duration in minutes
|
||||
qint32 genreId_; // Genre ID
|
||||
qint32 movieId_; // Unique ID for the movie
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
explicit MovieDTO() = default;
|
||||
explicit MovieDTO(const QString &title, qint32 duration, qint32 genreId,
|
||||
qint32 movieId)
|
||||
: title_(title), duration_(duration), genreId_(genreId),
|
||||
movieId_(movieId) {}
|
||||
|
||||
// Setters (inline methods)
|
||||
inline void setTitle(const QString &title) { title_ = title; }
|
||||
inline void setDuration(qint32 duration) { duration_ = duration; }
|
||||
inline void setGenreId(qint32 genreId) { genreId_ = genreId; }
|
||||
inline void setMovieId(qint32 movieId) { movieId_ = movieId; }
|
||||
|
||||
// Getters (inline methods)
|
||||
inline QString title() const { return title_; }
|
||||
inline qint32 duration() const { return duration_; }
|
||||
inline qint32 genreId() const { return genreId_; }
|
||||
inline qint32 movieId() const { return movieId_; }
|
||||
};
|
||||
|
||||
#endif // MOVIE_DTO_H
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#ifndef REFUND_DTO_H
|
||||
#define REFUND_DTO_H
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
class RefundDTO {
|
||||
private:
|
||||
QDateTime refundAt_; // Refund date and time
|
||||
double refundAmount_; // Refund amount
|
||||
qint32 refundId_; // Unique ID for the refund
|
||||
qint32 ticketId_; // Associated ticket ID
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
explicit RefundDTO() = default;
|
||||
explicit RefundDTO(const QDateTime &refundAt, double refundAmount,
|
||||
qint32 refundId, qint32 ticketId)
|
||||
: refundAt_(refundAt), refundAmount_(refundAmount), refundId_(refundId),
|
||||
ticketId_(ticketId) {}
|
||||
|
||||
// Setters (inline methods)
|
||||
inline void setRefundAt(const QDateTime &refundAt) { refundAt_ = refundAt; }
|
||||
inline void setRefundAmount(double refundAmount) {
|
||||
refundAmount_ = refundAmount;
|
||||
}
|
||||
inline void setRefundId(qint32 refundId) { refundId_ = refundId; }
|
||||
inline void setTicketId(qint32 ticketId) { ticketId_ = ticketId; }
|
||||
|
||||
// Getters (inline methods)
|
||||
inline QDateTime refundAt() const { return refundAt_; }
|
||||
inline double refundAmount() const { return refundAmount_; }
|
||||
inline qint32 refundId() const { return refundId_; }
|
||||
inline qint32 ticketId() const { return ticketId_; }
|
||||
};
|
||||
|
||||
#endif // REFUND_DTO_H
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef ROLE_DTO_H
|
||||
#define ROLE_DTO_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
class RoleDTO {
|
||||
private:
|
||||
QString roleName_; // Name of the role
|
||||
qint32 accessLevel_; // Access level (permissions)
|
||||
qint32 roleId_; // Unique ID for the role
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
explicit RoleDTO() = default;
|
||||
explicit RoleDTO(const QString &roleName, qint32 accessLevel, qint32 roleId)
|
||||
: roleName_(roleName), accessLevel_(accessLevel), roleId_(roleId) {}
|
||||
|
||||
// Setters (inline methods)
|
||||
inline void setRoleName(const QString &roleName) { roleName_ = roleName; }
|
||||
inline void setAccessLevel(qint32 accessLevel) { accessLevel_ = accessLevel; }
|
||||
inline void setRoleId(qint32 roleId) { roleId_ = roleId; }
|
||||
|
||||
// Getters (inline methods)
|
||||
inline QString roleName() const { return roleName_; }
|
||||
inline qint32 accessLevel() const { return accessLevel_; }
|
||||
inline qint32 roleId() const { return roleId_; }
|
||||
};
|
||||
|
||||
#endif // ROLE_DTO_H
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
#ifndef SESSION_DTO_H
|
||||
#define SESSION_DTO_H
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
class SessionDTO {
|
||||
private:
|
||||
QDateTime beginAt_; // Session start time
|
||||
double ticketPrice_; // Ticket price
|
||||
qint32 hallId_; // Associated hall ID
|
||||
qint32 movieId_; // Associated movie ID
|
||||
qint32 sessionId_; // Unique session ID
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
explicit SessionDTO() = default;
|
||||
explicit SessionDTO(const QDateTime &beginAt, double ticketPrice,
|
||||
qint32 hallId, qint32 movieId, qint32 sessionId)
|
||||
: beginAt_(beginAt), ticketPrice_(ticketPrice), hallId_(hallId),
|
||||
movieId_(movieId), sessionId_(sessionId) {}
|
||||
|
||||
// Setters (inline methods)
|
||||
inline void setBeginAt(const QDateTime &beginAt) { beginAt_ = beginAt; }
|
||||
inline void setTicketPrice(double ticketPrice) { ticketPrice_ = ticketPrice; }
|
||||
inline void setHallId(qint32 hallId) { hallId_ = hallId; }
|
||||
inline void setMovieId(qint32 movieId) { movieId_ = movieId; }
|
||||
inline void setSessionId(qint32 sessionId) { sessionId_ = sessionId; }
|
||||
|
||||
// Getters (inline methods)
|
||||
inline QDateTime beginAt() const { return beginAt_; }
|
||||
inline double ticketPrice() const { return ticketPrice_; }
|
||||
inline qint32 hallId() const { return hallId_; }
|
||||
inline qint32 movieId() const { return movieId_; }
|
||||
inline qint32 sessionId() const { return sessionId_; }
|
||||
};
|
||||
|
||||
#endif // SESSION_DTO_H
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
#ifndef SESSION_STATISTICS_DTO_H
|
||||
#define SESSION_STATISTICS_DTO_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QString>
|
||||
|
||||
class SessionStatisticsDTO {
|
||||
private:
|
||||
qint32 sessionId_;
|
||||
QDateTime beginAt_;
|
||||
double ticketPrice_;
|
||||
qint32 hallId_;
|
||||
QString hallName_;
|
||||
qint32 totalSeats_;
|
||||
qint32 movieId_;
|
||||
QString movieTitle_;
|
||||
qint32 duration_;
|
||||
qint32 genreId_;
|
||||
QString genreName_;
|
||||
qint32 soldTickets_;
|
||||
qint32 refundedTickets_;
|
||||
double salesRevenue_;
|
||||
double refundExpenses_;
|
||||
|
||||
public:
|
||||
SessionStatisticsDTO() = default;
|
||||
|
||||
SessionStatisticsDTO(QDateTime beginAt, QString genreName, QString hallName,
|
||||
QString movieTitle, double refundExpenses,
|
||||
double salesRevenue, double ticketPrice, qint32 duration,
|
||||
qint32 genreId, qint32 hallId, qint32 movieId,
|
||||
qint32 refundedTickets, qint32 sessionId,
|
||||
qint32 soldTickets, qint32 totalSeats)
|
||||
: beginAt_(beginAt), duration_(duration), genreId_(genreId),
|
||||
genreName_(genreName), hallId_(hallId), hallName_(hallName),
|
||||
movieId_(movieId), movieTitle_(movieTitle),
|
||||
refundExpenses_(refundExpenses), refundedTickets_(refundedTickets),
|
||||
salesRevenue_(salesRevenue), sessionId_(sessionId),
|
||||
soldTickets_(soldTickets), ticketPrice_(ticketPrice),
|
||||
totalSeats_(totalSeats) {}
|
||||
|
||||
// clang-format off
|
||||
|
||||
// Getters
|
||||
inline QDateTime beginAt() const { return beginAt_; }
|
||||
inline QString genreName() const { return genreName_; }
|
||||
inline QString hallName() const { return hallName_; }
|
||||
inline QString movieTitle() const { return movieTitle_; }
|
||||
inline double refundExpenses() const { return refundExpenses_; }
|
||||
inline double salesRevenue() const { return salesRevenue_; }
|
||||
inline double ticketPrice() const { return ticketPrice_; }
|
||||
inline qint32 duration() const { return duration_; }
|
||||
inline qint32 genreId() const { return genreId_; }
|
||||
inline qint32 hallId() const { return hallId_; }
|
||||
inline qint32 movieId() const { return movieId_; }
|
||||
inline qint32 refundedTickets() const { return refundedTickets_; }
|
||||
inline qint32 sessionId() const { return sessionId_; }
|
||||
inline qint32 soldTickets() const { return soldTickets_; }
|
||||
inline qint32 totalSeats() const { return totalSeats_; }
|
||||
|
||||
// Setters
|
||||
inline void setBeginAt(QDateTime beginAt) { beginAt_ = beginAt; }
|
||||
inline void setDuration(qint32 duration) { duration_ = duration; }
|
||||
inline void setGenreId(qint32 genreId) { genreId_ = genreId; }
|
||||
inline void setGenreName(QString genreName) { genreName_ = genreName; }
|
||||
inline void setHallId(qint32 hallId) { hallId_ = hallId; }
|
||||
inline void setHallName(QString hallName) { hallName_ = hallName; }
|
||||
inline void setMovieId(qint32 movieId) { movieId_ = movieId; }
|
||||
inline void setMovieTitle(QString movieTitle) { movieTitle_ = movieTitle; }
|
||||
inline void setRefundExpenses(double refundExpenses) { refundExpenses_ = refundExpenses; }
|
||||
inline void setRefundedTickets(qint32 refundedTickets) { refundedTickets_ = refundedTickets; }
|
||||
inline void setSalesRevenue(double salesRevenue) { salesRevenue_ = salesRevenue; }
|
||||
inline void setSessionId(qint32 sessionId) { sessionId_ = sessionId; }
|
||||
inline void setSoldTickets(qint32 soldTickets) { soldTickets_ = soldTickets; }
|
||||
inline void setTicketPrice(double ticketPrice) { ticketPrice_ = ticketPrice; }
|
||||
inline void setTotalSeats(qint32 totalSeats) { totalSeats_ = totalSeats; }
|
||||
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#endif // SESSION_STATISTICS_DTO_H
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef TICKET_DTO_H
|
||||
#define TICKET_DTO_H
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
class TicketDTO {
|
||||
private:
|
||||
QDateTime soldAt_; // Ticket sold time
|
||||
qint32 seatNumber_; // Seat number
|
||||
qint32 sessionId_; // Session ID
|
||||
qint32 ticketId_; // Unique ticket ID
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
explicit TicketDTO() = default;
|
||||
explicit TicketDTO(const QDateTime &soldAt, qint32 seatNumber,
|
||||
qint32 sessionId, qint32 ticketId)
|
||||
: soldAt_(soldAt), seatNumber_(seatNumber), sessionId_(sessionId),
|
||||
ticketId_(ticketId) {}
|
||||
|
||||
// Setters (inline methods)
|
||||
inline void setSeatNumber(qint32 seatNumber) { seatNumber_ = seatNumber; }
|
||||
inline void setSessionId(qint32 sessionId) { sessionId_ = sessionId; }
|
||||
inline void setSoldAt(const QDateTime &soldAt) { soldAt_ = soldAt; }
|
||||
inline void setTicketId(qint32 ticketId) { ticketId_ = ticketId; }
|
||||
|
||||
// Getters (inline methods)
|
||||
inline QDateTime soldAt() const { return soldAt_; }
|
||||
inline qint32 seatNumber() const { return seatNumber_; }
|
||||
inline qint32 sessionId() const { return sessionId_; }
|
||||
inline qint32 ticketId() const { return ticketId_; }
|
||||
};
|
||||
|
||||
#endif // TICKET_DTO_H
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#ifndef USER_DTO_H
|
||||
#define USER_DTO_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
class UserDTO {
|
||||
private:
|
||||
QString passwordHash_; // Hashed password
|
||||
QString salt_; // Salt for password hashing
|
||||
QString username_; // Username
|
||||
qint32 roleId_; // Role ID
|
||||
qint32 userId_; // Unique user ID
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
explicit UserDTO() = default;
|
||||
explicit UserDTO(const QString &passwordHash, const QString &salt,
|
||||
const QString &username, qint32 roleId, qint32 userId)
|
||||
: passwordHash_(passwordHash), roleId_(roleId), salt_(salt),
|
||||
userId_(userId), username_(username) {}
|
||||
|
||||
// Setters (inline methods)
|
||||
inline void setPasswordHash(const QString &passwordHash) {
|
||||
passwordHash_ = passwordHash;
|
||||
}
|
||||
inline void setRoleId(qint32 roleId) { roleId_ = roleId; }
|
||||
inline void setSalt(const QString &salt) { salt_ = salt; }
|
||||
inline void setUserId(qint32 userId) { userId_ = userId; }
|
||||
inline void setUsername(const QString &username) { username_ = username; }
|
||||
|
||||
// Getters (inline methods)
|
||||
inline QString passwordHash() const { return passwordHash_; }
|
||||
inline QString salt() const { return salt_; }
|
||||
inline QString username() const { return username_; }
|
||||
inline qint32 roleId() const { return roleId_; }
|
||||
inline qint32 userId() const { return userId_; }
|
||||
};
|
||||
|
||||
#endif // USER_DTO_H
|
||||
|
||||
Reference in New Issue
Block a user