55 lines
1.7 KiB
Python
55 lines
1.7 KiB
Python
import factory
|
|
|
|
from pairent_app.models import Apartament
|
|
|
|
factory.Faker.override_default_locale('ru_RU');
|
|
|
|
class ApartmentFactory(factory.django.DjangoModelFactory):
|
|
|
|
class Meta:
|
|
model = Apartament
|
|
|
|
# Base data
|
|
price = factory.Faker('random_number')
|
|
lastPrice = price
|
|
bail = factory.Faker('random_number')
|
|
|
|
agencyCommission = factory.Faker('random_number')
|
|
utilitiesPrice = factory.Faker('random_number')
|
|
minimumLeasePeriod = factory.Faker('random_number')
|
|
|
|
address = factory.Faker('address')
|
|
description = factory.Faker('sentence')
|
|
|
|
perimetrs = factory.Faker('random_number')
|
|
rooms = factory.Faker('random_number')
|
|
ceilingHeight = factory.Faker('random_number')
|
|
floorHouse = factory.Faker('random_number')
|
|
floor = factory.Faker('random_number')
|
|
|
|
phoneNumber = factory.Faker('phone_number')
|
|
|
|
timeToBus = factory.Faker('random_number')
|
|
timeToTrain = factory.Faker('random_number')
|
|
|
|
# Apartment props
|
|
isFurniture = factory.Faker('boolean')
|
|
isAnimal = factory.Faker('boolean')
|
|
isTelevision = factory.Faker('boolean')
|
|
isChild = factory.Faker('boolean')
|
|
isInternet = factory.Faker('boolean')
|
|
isBathroom = factory.Faker('boolean')
|
|
isRefrigerator = factory.Faker('boolean')
|
|
isWasher = factory.Faker('boolean')
|
|
isAirConditioning = factory.Faker('boolean')
|
|
isFreshRepair = factory.Faker('boolean')
|
|
|
|
# House props
|
|
isElevator = factory.Faker('boolean')
|
|
isParking = factory.Faker('boolean')
|
|
isGarbageChute = factory.Faker('boolean')
|
|
isConcierge = factory.Faker('boolean')
|
|
|
|
views = factory.Faker('random_number')
|
|
|
|
dateCreate = factory.Faker('date') |