Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.dreamteam.restservice.RestApp.models;
- import org.apache.tomcat.jni.Local;
- import org.bson.types.ObjectId;
- import org.springframework.data.annotation.CreatedDate;
- import org.springframework.data.annotation.Id;
- import org.springframework.data.mongodb.core.mapping.Document;
- import java.text.SimpleDateFormat;
- import java.time.LocalDate; // import the LocalDate class
- import java.util.ArrayList;
- import java.util.List;
- @Document(collection="tanda")
- public class Tanda {
- @Id
- public ObjectId _id;
- private boolean isActive;
- private String paymentFrecuency;
- private Double paymentAmount;
- private String paymentDate;
- private Double moneyToReceive;
- private String paymentMethod;
- private int numberOfParticipants;
- private String startDate;
- private String endDate;
- private int lineNumber;
- private Double moneyAccumulated;
- private User organizer;
- List<TandaActiveParticipants> tandaActiveParticipants = new ArrayList<>();
- List<User> pendingOrderParticipants = new ArrayList<>();
- List<User> invitedParticipants = new ArrayList<>();
- List<Conversation> conversations = new ArrayList<>();
- LocalDate createdAt;
- public Tanda(ObjectId _id, Boolean isActive, User organizer,
- String paymentFrecuency, Double paymentAmount,
- String paymentDate, Double moneyToReceive,
- String paymentMethod, int numberOfParticipants,
- String startDate, String endDate, int lineNumber,
- Double moneyAccumulated, Local createdAt) {
- this._id = _id;
- this.isActive = isActive;
- this.organizer = organizer;
- this.paymentFrecuency = paymentFrecuency;
- this.paymentAmount = paymentAmount;
- this.paymentDate = paymentDate;
- this.moneyToReceive = moneyToReceive;
- this.paymentMethod = paymentMethod; // ['visa', 'mastercard', 'oxxo', 'cash', 'paypal']
- this.numberOfParticipants = numberOfParticipants;
- this.startDate = startDate;
- this.endDate = endDate;
- this.lineNumber = lineNumber;
- this.moneyAccumulated = moneyAccumulated;
- this.createdAt = LocalDate.now();
- }
- public ObjectId get_id() {
- return _id;
- }
- public void set_id(ObjectId _id) {
- this._id = _id;
- }
- public boolean isActive() {
- return isActive;
- }
- public void setActive(boolean active) {
- isActive = active;
- }
- public String getPaymentFrecuency() {
- return paymentFrecuency;
- }
- public void setPaymentFrecuency(String paymentFrecuency) {
- this.paymentFrecuency = paymentFrecuency;
- }
- public Double getPaymentAmount() {
- return paymentAmount;
- }
- public void setPaymentAmount(Double paymentAmount) {
- this.paymentAmount = paymentAmount;
- }
- public String getPaymentDate() {
- return paymentDate;
- }
- public void setPaymentDate(String paymentDate) {
- this.paymentDate = paymentDate;
- }
- public Double getMoneyToReceive() {
- return moneyToReceive;
- }
- public void setMoneyToReceive(Double moneyToReceive) {
- this.moneyToReceive = moneyToReceive;
- }
- public String getPaymentMethod() {
- return paymentMethod;
- }
- public void setPaymentMethod(String paymentMethod) {
- this.paymentMethod = paymentMethod;
- }
- public int getNumberOfParticipants() {
- return numberOfParticipants;
- }
- public void setNumberOfParticipants(int numberOfParticipants) {
- this.numberOfParticipants = numberOfParticipants;
- }
- public String getStartDate() {
- return startDate;
- }
- public void setStartDate(String startDate) {
- this.startDate = startDate;
- }
- public String getEndDate() {
- return endDate;
- }
- public void setEndDate(String endDate) {
- this.endDate = endDate;
- }
- public int getLineNumber() {
- return lineNumber;
- }
- public void setLineNumber(int lineNumber) {
- this.lineNumber = lineNumber;
- }
- public Double getMoneyAccumulated() {
- return moneyAccumulated;
- }
- public void setMoneyAccumulated(Double moneyAccumulated) {
- this.moneyAccumulated = moneyAccumulated;
- }
- public User getOrganizer() {
- return organizer;
- }
- public void setOrganizer(User organizer) {
- this.organizer = organizer;
- }
- public List<TandaActiveParticipants> getTandaActiveParticipants() {
- return tandaActiveParticipants;
- }
- public void setTandaActiveParticipants(List<TandaActiveParticipants> tandaActiveParticipants) {
- this.tandaActiveParticipants = tandaActiveParticipants;
- }
- public List<User> getPendingOrderParticipants() {
- return pendingOrderParticipants;
- }
- public void setPendingOrderParticipants(List<User> pendingOrderParticipants) {
- this.pendingOrderParticipants = pendingOrderParticipants;
- }
- public List<User> getInvitedParticipants() {
- return invitedParticipants;
- }
- public void setInvitedParticipants(List<User> invitedParticipants) {
- this.invitedParticipants = invitedParticipants;
- }
- public List<Conversation> getConversations() {
- return conversations;
- }
- public void setConversations(List<Conversation> conversations) {
- this.conversations = conversations;
- }
- public LocalDate getCreatedAt() {
- return createdAt;
- }
- public void setCreatedAt(LocalDate createdAt) {
- this.createdAt = createdAt;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement