/*
 * ********************************************************************************************************************
 *
 *                     :*$@@%$*:                         ;:                ;;    ;;
 *                   :@@%!  :!@@%:                       %!             ;%%@@%$ =@@@@@@@%;     @%@@@%%%%@@@@@
 *                  :@%;       :$=                       %%$$$%$$         ;$$  ;$@=   !@$
 *                  =@!                                  %!              @ $=;%   !@@@%:      !$$$$$$$$$$$$$$=
 *                  =@*                                  %!              @ $= % %@=   =%@!      %=
 *             *$%%! @@=        ;=$%%%$*:                %!              @ $= % =%%%%%%@$      *%:         =%
 *           %@@!:    !@@@%=$@@@@%!  :*@@$:              %!              @ $= % $*     ;@      @*          :%*
 *         ;@@!          ;!!!;:         ;@%:      =======@%========*     @ $$ % $%*****$@     :@$=*********=@$
 *         $@*   ;@@@%=!:                *@*
 *         =@$    ;;;!=%@@@@=!           =@!
 *          %@$:      =@%: :*@@@*       %@=                    Copyright (c) 2016-2018.  北京上格云技术有限公司
 *           ;%@@$=$@@%*       *@@@$=%@@%;
 *              ::;::             ::;::                                              All rights reservad.
 *
 * ********************************************************************************************************************
 */
package com.persagy.server.entities

import com.alibaba.fastjson.annotation.JSONField
import com.persagy.service.models.SBaseEntity
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table
import javax.validation.constraints.Pattern

/**
 * 用户信息
 *
 * @author  PLX
 */
@ApiModel(description= "用户信息")
@Table(name = "scanbuilding.user")
class User : SBaseEntity() {
    /** 扫楼用户ID */
    @ApiModelProperty(value = "扫楼用户ID")
    @Id
    @Column(name = "id")
    @JSONField(name = "UserId")
    var userId: String? = null

    /** 名称 */
    @ApiModelProperty(value = "名称")
    @Column(name = "name")
    @JSONField(name = "UserName")
    var userName: String? = null

    /** 手机号 */
    @ApiModelProperty(value = "手机号")
    @Pattern(regexp="1[2-8][0-9]{9}", message="手机号格式不正确！")
    @Column(name = "phone")
    @JSONField(name = "Phone")
    var phone: String? = null

    /** 备注 */
    @ApiModelProperty(value = "备注")
    @Column(name = "note")
    @JSONField(name = "Note")
    var note: String? = null

    /** 项目ID */
    @ApiModelProperty(value = "项目ID")
    //@Pattern(regexp="Pj[0-9]{10}", message="项目ID格式不正确！")
    @Column(name = "project_id")
    @JSONField(name = "ProjId")
    var projId: String? = null
} // Class User