package com.izouma.nineth.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.izouma.nineth.domain.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class InvitePhoneDTO {
    @ExcelProperty(value = "昵称")
    private String nickname;

    @ExcelProperty(value = "手机号")
    private String phone;

    @ExcelProperty("注册时间")
    private LocalDateTime createdAt;

    @ExcelProperty("邀请人")
    private String invitorName;

    public InvitePhoneDTO(User user) {
        BeanUtils.copyProperties(user, this);
    }
}
