package com.zksy.property.factory;

import com.zksy.property.domain.bo.Contract;
import com.zksy.property.domain.bo.ContractA;
import com.zksy.property.domain.bo.ContractB;
import com.zksy.property.domain.bo.ContractC;

public class ContractFactory {
    public static Contract createContract(String houseType) {
        switch (houseType) {
            case "公租房":
                return new ContractA();
            case "厂房":
                return new ContractB();
            case "创新创业基地":
                return new ContractC();
            default:
                throw new IllegalArgumentException("不支持的房屋类型: " + houseType);
        }
    }
}