import { Model } from 'dva';
import { Estate } from '@/types/common';

export interface ExtModelState {
  /**
   * 进入地产详情时的中转
   */
  estateExt?: Estate;
}

const model: Model = {
  namespace: 'ext',

  state: {
    estateExt: { id: 'xjlajlkjkdf', name: '巴中市' },
  } as ExtModelState,

  effects: {
  },

  reducers: {
    onUpdateState(state, { payload }: any) {
      return {
        ...state,
        ...payload,
      };
    }
  },
};

export default model;
