def id(cls):
        """
        Database identity for this model, used for foreign key references from other models
        """
        if cls.__uuid_primary_key__:
            return immutable(Column(UUIDType(binary=False), default=uuid_.uuid4, primary_key=True, nullable=False))
        else:
            return immutable(Column(Integer, primary_key=True, nullable=False))
Database identity for this model, used for foreign key references from other models