#!/usr/bin/python3
"""This is the state class"""
from models.base_model import BaseModel

from models.base_model import Base
#from models.engine.file_storage import FileStorage
import os
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import relationship

class State(BaseModel, Base):
    """This is the class for State
    Attributes:
        name: input name
    """

    os_env = os.environ['HBNB_TYPE_STORAGE']
    if os_env == "db":
        __tablename__ = "states"
        name = Column(String(128),  nullable=False)
        cities = relationship('City', cascade="all, delete", backref='state')
    else:
        name = ""

        @property
        def get_cities(self):
 #           my_storage = FileStorage()
            my_list = []
 #           dict_city = my_storage.all(City)
 #           for key, value in dict_city.items():
 #               if self.id == dict_city['state_id']:
 #                   my_list.append(value)
            return(my_list)
