package com.flossom.miniProgram.domain.vo;

import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

public class UserMemberUpdateVo {

    /**
     * 昵称
     */
    @NotNull(message = "昵称不能为空")
    @Size(min = 1, max = 20, message = "昵称长度需要控制在20位以内")
    private String nickname;

    /**
     * 头像
     */
    private String headimg;

    /**
     * 省
     */
    @NotNull(message = "请选择省")
    private Integer provinceId;

    /**
     * 市
     */
    @NotNull(message = "请选择市")
    private Integer cityId;

    /**
     * 区
     */
    @NotNull(message = "请选择区")
    private Integer areaId;

    /**
     * 生日
     */
    @NotNull(message = "请选择生日日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    public UserMemberUpdateVo() {
    }

    public UserMemberUpdateVo(String nickname, String headimg, Integer provinceId, Integer cityId, Integer areaId, Date birthday) {
        this.nickname = nickname;
        this.headimg = headimg;
        this.provinceId = provinceId;
        this.cityId = cityId;
        this.areaId = areaId;
        this.birthday = birthday;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getHeadimg() {
        return headimg;
    }

    public void setHeadimg(String headimg) {
        this.headimg = headimg;
    }

    public Integer getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Integer provinceId) {
        this.provinceId = provinceId;
    }

    public Integer getCityId() {
        return cityId;
    }

    public void setCityId(Integer cityId) {
        this.cityId = cityId;
    }

    public Integer getAreaId() {
        return areaId;
    }

    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
}
