package com.xmomen.module.member.model;

import lombok.Data;
import com.xmomen.module.member.entity.MemberAddress;
import org.springframework.beans.BeanUtils;

    import java.lang.Boolean;
    import java.lang.String;
    import java.lang.Integer;
import java.io.Serializable;


public @Data class MemberAddressCreate implements Serializable {

    // 会员地址ID
    private String id;

    // 会员ID
    private Integer cdMemberId;

    // 省份
    private Integer province;

    // 城市
    private Integer city;

    // 区域
    private Integer area;

    // 详细地址
    private String address;

    // 完整地址
    private String fullAddress;

    // 姓名
    private String name;

    // 手机号
    private String mobile;

    // 是否默认地址
    private boolean isDefault;

    // 将MemberAddressCreate对象转换为MemberAddress对象
    public MemberAddress getEntity(){
        MemberAddress memberAddress = new MemberAddress();
        BeanUtils.copyProperties(this, memberAddress);
        return memberAddress;
    }
}
