{
    "keyColumn": "smb_acc_id",
    "detailHeaderColumnPrefix": "SMB: ",
    "detailHeaderColumns": [
        "smb_name"
    ],
    "orderBy": {
        "smb_acc_id": "ASC"
    },
    "listColumns": [
		"smb_acc_id",
        "smb_name",
		"smb_userfname",
        "smb_plan",
        "smb_avail_credit",
        "smb_createdon",
		"upgrade"
    ],
    "showColumns": [
		"smb_acc_id",
        "smb_owner_id",
        "smb_name",
        "smb_desc",
        "smb_subscription_type",
        "smb_subscription_date",
        "smb_subscription_expire_date",
        "smb_plan",
        "smb_avail_credit",
        "smb_createdon",
		"upgrade"
    ],
    "detailColumns": [
		"smb_acc_id",
        "smb_owner_id",
        "smb_name",
		"smb_userfname",
        "smb_plan",
        "smb_avail_credit",
        "smb_createdon",
		"upgrade"
    ],
    "columns": {
        "smb_acc_id": {
            "name": "App ID",
            "sortable": "true",
            "editoptions": {
                "type": "hidden"
            }
        },
        "smb_owner_id": {
            "name": "User Email",
            "sortable": "true",
            "external": "true",
            "externalOptions": {
                "externalTable": "tbl_users",
                "externalColumn": "user_id",
                "externalShowColumn": "user_email"
            }
        },
		"smb_userfname": {
            "name": "Name",
            "sortable": "true",
            "customColumn": "true",
            "customaction": "Cmshelper::getUserNameFromSmb",
			 "popupoptions": {
                "type": "popup",
                "customaction": "Cmshelper::getUserInfoPopupSMB"
            }
        },
        "smb_name": {
            "name": "Account Name",
			"searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "SMB Name",
                "class": "textbox",
                "validations": [
                    "required"
                ]
            },
			 "popupoptions": {
                "type": "popup",
                "customaction": "Cmshelper::getSmbPopupUrl"
            }
        },
        "smb_createdon": {
            "name": "Signed up On",
            "sortable": "true",
			"dbFormat": "datetime",
            "displayFormat": "m/d/Y"
        },
        "smb_avail_credit": {
			"name" :"Available Credit",
			"customColumn": "true",
            "customaction": "Cmshelper::getSmbAddCreditUrl"
        },
		"upgrade" :{
			"name" :"Change Plan",
			"customColumn": "true",
            "customaction": "Cmshelper::getUserUpgradeUrl"
		},
		"addcredit" :{
			"name" :"Add Credit",
			"customColumn": "true",
            "customaction": "Cmshelper::getSmbAddCreditUrl"
		},
        "smb_plan": {
            "name": "Plan",
            "sortable": "true",
            "external": "true",
            "externalOptions": {
                "externalTable": "tbl_plans",
                "externalColumn": "plan_id",
                "externalShowColumn": "plan_name"
            }
        }
    },
	 "customOperations": {
        "login": {
            "options": {
                "target": "newtab",
                "name": "Login",
                 "class": " ",
                "title": "Login",
                "linkSource": "Cmshelper::getSmbLoggedInUrl"
            }
        }
    },
    "opertations": [
    ],
	 "report": {
        "reportTitle": "Business Accounts",
        "columns": [
			"smb_acc_id",
			"smb_owner_id",
			"smb_name",
			"smb_desc",
			"smb_subscription_type",
			"smb_subscription_date",
			"smb_subscription_expire_date",
			"smb_plan",
			"smb_createdon"       ],
        "dateColumn": "smb_createdon"
    }
}