package com.uas.account.viewmodel;

import java.util.ArrayList;
import java.util.List;

import org.springframework.util.StringUtils;

import com.alibaba.fastjson.JSON;
import com.uas.account.entity.UserDetail;

public class ApplyAppView {

	private String[] applyApps;
	private String password;
	private String domain;
	private String users;
	private List<UserDetail> userDetails;

	public String[] getApplyApps() {
		return applyApps;
	}

	public void setApplyApps(String[] applyApps) {
		this.applyApps = applyApps;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUsers() {
		return users;
	}

	public void setUsers(String users) {
		this.users = users;
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public List<UserDetail> getUserDetails() {
		if (userDetails == null)
			userDetails = StringUtils.isEmpty(users) ? new ArrayList<UserDetail>() : JSON.parseArray(users, UserDetail.class);
		return userDetails;
	}
}
