package com.nokia.sms.pojo;

import java.util.Date;

import com.nokia.sms.vo.MultiNumberSms;
import com.nokia.sms.vo.SingleNumberSms;

import lombok.Data;

@Data
public class Sms {

    private String id;
    private String fromSystem;
    private String[] loginNames;
    private String[] phoneNumbers;
    private String content;
    private Date scheduleTime;
    private String smsType;
    private String internalId;
    private String result;
    private Date sendTime;
    private String status;

    public Sms() {
    }

    public Sms(MultiNumberSms sms) {
        this.fromSystem = sms.getFromSystem();
        this.loginNames = sms.getLoginNames();
        this.phoneNumbers = sms.getPhoneNumbers();
        this.content = sms.getContent();
        this.scheduleTime = sms.getScheduleTime();
        this.smsType = sms.getSmsType();
        this.internalId = sms.getInternalId();
    }

    public Sms(SingleNumberSms sms) {
        this.fromSystem = sms.getFromSystem();
        this.loginNames = new String[] { sms.getLoginName() };
        this.phoneNumbers = new String[] { sms.getPhoneNumber() };
        this.content = sms.getContent();
        this.scheduleTime = sms.getScheduleTime();
        this.smsType = sms.getSmsType();
        this.internalId = sms.getInternalId();
    }
}
