Advertisement
GastonPalazzo

publicacion.py

Nov 25th, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.24 KB | None | 0 0
  1. # import
  2. from datetime import datetime
  3.  
  4. # class
  5. class Publicacion():
  6.     # cnstr
  7.     def __init__(self, id_de_publicacion=int, body=str, fecha_de_publicacion=str, categoria_de_publicacion=str, autor=int):
  8.         self.__id_de_publicacion = id_de_publicacion
  9.         self.__body = body
  10.         self.__fecha_de_publicacion = fecha_de_publicacion
  11.         self.__autor = autor
  12.         self.__categoria_de_publicacion = categoria_de_publicacion
  13.     # mthds
  14.     # gtt
  15.     def get_id_de_publicacion(self):
  16.         return self.__id_de_publicacion
  17.     def get_body(self):
  18.         return self.__body
  19.     def get_fecha_de_publicacion(self):
  20.         return self.__fecha_de_publicacion
  21.     def get_autor(self):
  22.         return self.__autor
  23.     def get_categoria_de_publicacion(self):
  24.         return self.__categoria_de_publicacion
  25.     # stt
  26.     def set_body(self, new_body):
  27.         self.__body = new_body
  28.     def set_fecha_de_publicacion(self, new_fecha_de_publicacion):
  29.         self.__fecha_de_publicacion = new_fecha_de_publicacion
  30.     def set_autor(self, new_autor):
  31.         self.__autor = new_autor
  32.     def set_categoria_de_publicacion(self, new_categoria_de_publicacion):
  33.         self.__categoria_de_publicacion = new_categoria_de_publicacion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement