Remove constructors from models
This commit is contained in:
parent
868903b989
commit
9f83f7498f
|
@ -29,40 +29,6 @@ class Users(Base):
|
|||
device_type = Column(Integer)
|
||||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
full_name,
|
||||
email,
|
||||
password,
|
||||
gender,
|
||||
mobile,
|
||||
city_id,
|
||||
user_type,
|
||||
lang_type,
|
||||
badge,
|
||||
device_id,
|
||||
device_type,
|
||||
social_id="",
|
||||
access_key="",
|
||||
user_image=None,
|
||||
type=0,
|
||||
):
|
||||
self.social_id = social_id
|
||||
self.type = type
|
||||
self.full_name = full_name
|
||||
self.email = email
|
||||
self.password = password
|
||||
self.gender = gender
|
||||
self.mobile = mobile
|
||||
self.user_image = user_image
|
||||
self.city_id = city_id
|
||||
self.user_type = user_type
|
||||
self.access_key = access_key
|
||||
self.lang_type = lang_type
|
||||
self.badge = badge
|
||||
self.device_id = device_id
|
||||
self.device_type = device_type
|
||||
|
||||
|
||||
class Cities(Base):
|
||||
__tablename__ = "cities"
|
||||
|
@ -74,11 +40,6 @@ class Cities(Base):
|
|||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(self, name, image, status):
|
||||
self.name = name
|
||||
self.image = image
|
||||
self.status = status
|
||||
|
||||
|
||||
class Games(Base):
|
||||
__tablename__ = "games"
|
||||
|
@ -109,40 +70,6 @@ class Games(Base):
|
|||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
name,
|
||||
image,
|
||||
date_time,
|
||||
price,
|
||||
description,
|
||||
user_id,
|
||||
gender,
|
||||
city_id,
|
||||
venue_id,
|
||||
sports_id,
|
||||
no_of_player,
|
||||
min_player,
|
||||
already_player,
|
||||
no_of_already_player,
|
||||
payment_mode,
|
||||
card_id,
|
||||
):
|
||||
self.name = name
|
||||
self.image = image
|
||||
self.date_time = date_time
|
||||
self.price = price
|
||||
self.description = description
|
||||
self.user_id = user_id
|
||||
self.gender = gender
|
||||
self.city_id = city_id
|
||||
self.venue_id = venue_id
|
||||
self.sports_id = sports_id
|
||||
self.no_of_player = no_of_player
|
||||
self.no_of_already_player = no_of_already_player
|
||||
self.payment_mode = payment_mode
|
||||
self.card_id = card_id
|
||||
|
||||
|
||||
class Payments(Base):
|
||||
__tablename__ = "payments"
|
||||
|
@ -162,32 +89,6 @@ class Payments(Base):
|
|||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
user_id,
|
||||
game_id,
|
||||
amount,
|
||||
token,
|
||||
charge_id,
|
||||
transfer_id,
|
||||
transaction_id,
|
||||
account_no,
|
||||
description,
|
||||
pay_mode,
|
||||
status,
|
||||
):
|
||||
self.user_id = user_id
|
||||
self.game_id = game_id
|
||||
self.amount = amount
|
||||
self.token = token
|
||||
self.charge_id = charge_id
|
||||
self.transfer_id = transfer_id
|
||||
self.transaction_id = transaction_id
|
||||
self.account_no = account_no
|
||||
self.description = description
|
||||
self.pay_mode = pay_mode
|
||||
self.status = status
|
||||
|
||||
|
||||
class PlayerAvailabilities(Base):
|
||||
__tablename__ = "player_availabilities"
|
||||
|
@ -199,13 +100,6 @@ class PlayerAvailabilities(Base):
|
|||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(
|
||||
self, game_id, player_id, status,
|
||||
):
|
||||
self.game_id = game_id
|
||||
self.player_id = player_id
|
||||
self.status = status
|
||||
|
||||
|
||||
class PlayerCancelGames(Base):
|
||||
__tablename__ = "player_cancel_games"
|
||||
|
@ -216,12 +110,6 @@ class PlayerCancelGames(Base):
|
|||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(
|
||||
self, player_id, game_id,
|
||||
):
|
||||
self.player_id = player_id
|
||||
self.game_id = game_id
|
||||
|
||||
|
||||
class PurchaseGames(Base):
|
||||
__tablename__ = "purchase_games"
|
||||
|
@ -233,13 +121,6 @@ class PurchaseGames(Base):
|
|||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(
|
||||
self, game_id, user_id, pay_mode,
|
||||
):
|
||||
self.game_id = game_id
|
||||
self.user_id = user_id
|
||||
self.pay_mode = pay_mode
|
||||
|
||||
|
||||
class Sports(Base):
|
||||
__tablename__ = "sports"
|
||||
|
@ -251,13 +132,6 @@ class Sports(Base):
|
|||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(
|
||||
self, name, spanish_name, status,
|
||||
):
|
||||
self.name = name
|
||||
self.spanish_name = spanish_name
|
||||
self.status = status
|
||||
|
||||
|
||||
class Teams(Base):
|
||||
__tablename__ = "teams"
|
||||
|
@ -270,14 +144,6 @@ class Teams(Base):
|
|||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(
|
||||
self, game_id, user_id, team_id, status,
|
||||
):
|
||||
self.game_id = game_id
|
||||
self.user_id = user_id
|
||||
self.team_id = team_id
|
||||
self.status = status
|
||||
|
||||
|
||||
class UserRatings(Base):
|
||||
__tablename__ = "user_ratings"
|
||||
|
@ -291,13 +157,6 @@ class UserRatings(Base):
|
|||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
user_type = Column(Integer)
|
||||
|
||||
def __init__(self, game_id, user_id, player_id, rating, user_type):
|
||||
self.game_id = game_id
|
||||
self.user_id = user_id
|
||||
self.player_id = player_id
|
||||
self.rating = rating
|
||||
self.user_type = user_type
|
||||
|
||||
|
||||
class VenueImages(Base):
|
||||
__tablename__ = "venue_images"
|
||||
|
@ -309,13 +168,6 @@ class VenueImages(Base):
|
|||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(
|
||||
self, venue_id, user_id, image,
|
||||
):
|
||||
self.venue_id = venue_id
|
||||
self.user_id = user_id
|
||||
self.image = image
|
||||
|
||||
|
||||
class Venues(Base):
|
||||
__tablename__ = "venues"
|
||||
|
@ -330,16 +182,6 @@ class Venues(Base):
|
|||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(
|
||||
self, user_id, address, latitude, longitude, name, sports_id,
|
||||
):
|
||||
self.user_id = user_id
|
||||
self.address = address
|
||||
self.latitude = latitude
|
||||
self.longitude = longitude
|
||||
self.name = name
|
||||
self.sports_id = sports_id
|
||||
|
||||
|
||||
class ViewNews(Base):
|
||||
__tablename__ = "view_news"
|
||||
|
@ -350,12 +192,6 @@ class ViewNews(Base):
|
|||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(
|
||||
self, news_id, user_id,
|
||||
):
|
||||
self.news_id = news_id
|
||||
self.user_id = user_id
|
||||
|
||||
|
||||
class WebBookings(Base):
|
||||
__tablename__ = "web_bookings"
|
||||
|
@ -369,15 +205,3 @@ class WebBookings(Base):
|
|||
city = Column(String(100))
|
||||
created = Column(DateTime, nullable=False, server_default=func.now())
|
||||
updated = Column(DateTime, nullable=True, onupdate=func.now())
|
||||
|
||||
def __init__(
|
||||
self, user_id, address, name, email, contact, message, game, city,
|
||||
):
|
||||
self.user_id = user_id
|
||||
self.address = address
|
||||
self.name = name
|
||||
self.email = email
|
||||
self.contact = contact
|
||||
self.message = message
|
||||
self.game = game
|
||||
self.city = city
|
||||
|
|
Loading…
Reference in New Issue