Skip to content

Commit

Permalink
Merge pull request #29 from AvenSun/field-verified
Browse files Browse the repository at this point in the history
增加邮件/手机是否验证字段
  • Loading branch information
nnhy authored Aug 26, 2024
2 parents 91988b0 + cc16112 commit aea203a
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 0 deletions.
6 changes: 6 additions & 0 deletions XCode/Membership/Interfaces/IUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ public partial interface IUser
/// <summary>邮件。支持登录</summary>
String? Mail { get; set; }

/// <summary>邮箱是否验证。</summary>
Boolean MailVerified { get; set; }

/// <summary>手机。支持登录</summary>
String? Mobile { get; set; }

/// <summary>手机是否验证。</summary>
Boolean MobileVerified { get; set; }

/// <summary>代码。身份证、员工编码等,支持登录</summary>
String? Code { get; set; }

Expand Down
2 changes: 2 additions & 0 deletions XCode/Membership/Member.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
<Column Name="DisplayName" DataType="String" Description="昵称" />
<Column Name="Sex" DataType="Int32" Description="性别。未知、男、女" Type="XCode.Membership.SexKinds" />
<Column Name="Mail" DataType="String" ItemType="mail" Description="邮件。支持登录" />
<Column Name="MailVerified" DataType="Boolean" Description="邮箱是否验证。" />
<Column Name="Mobile" DataType="String" ItemType="mobile" Description="手机。支持登录" />
<Column Name="MobileVerified" DataType="Boolean" Description="手机是否验证。" />
<Column Name="Code" DataType="String" Description="代码。身份证、员工编码等,支持登录" />
<Column Name="AreaId" DataType="Int32" Map="XCode.Membership.Area@Id@Path@AreaPath" Description="地区。省市区" />
<Column Name="Avatar" DataType="String" ItemType="image" Length="200" Description="头像" />
Expand Down
22 changes: 22 additions & 0 deletions XCode/Membership/Membership.htm
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ <h3>用户(User)</h3>
<td>支持登录</td>
</tr>

<tr>
<td>MailVerified</td>
<td>邮箱是否验证</td>
<td>Boolean</td>
<td></td>
<td></td>
<td></td>
<td>N</td>
<td></td>
</tr>

<tr>
<td>Mobile</td>
<td>手机</td>
Expand All @@ -126,6 +137,17 @@ <h3>用户(User)</h3>
<td>支持登录</td>
</tr>

<tr>
<td>MobileVerified</td>
<td>手机是否验证</td>
<td>Boolean</td>
<td></td>
<td></td>
<td></td>
<td>N</td>
<td></td>
</tr>

<tr>
<td>Code</td>
<td>代码</td>
Expand Down
12 changes: 12 additions & 0 deletions XCode/Membership/Models/UserModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ public partial class UserModel : IModel
/// <summary>邮件。支持登录</summary>
public String? Mail { get; set; }

/// <summary>邮箱是否验证。</summary>
public Boolean MailVerified { get; set; }

/// <summary>手机。支持登录</summary>
public String? Mobile { get; set; }

/// <summary>手机是否验证。</summary>
public Boolean MobileVerified { get; set; }

/// <summary>代码。身份证、员工编码等,支持登录</summary>
public String? Code { get; set; }

Expand Down Expand Up @@ -120,7 +126,9 @@ public virtual Object? this[String name]
"DisplayName" => DisplayName,
"Sex" => Sex,
"Mail" => Mail,
"MailVerified" => MailVerified,
"Mobile" => Mobile,
"MobileVerified" => MobileVerified,
"Code" => Code,
"AreaId" => AreaId,
"Avatar" => Avatar,
Expand Down Expand Up @@ -157,7 +165,9 @@ public virtual Object? this[String name]
case "DisplayName": DisplayName = Convert.ToString(value); break;
case "Sex": Sex = (XCode.Membership.SexKinds)value.ToInt(); break;
case "Mail": Mail = Convert.ToString(value); break;
case "MailVerified": MailVerified = value.ToBoolean(); break;
case "Mobile": Mobile = Convert.ToString(value); break;
case "MobileVerified": MobileVerified = value.ToBoolean(); break;
case "Code": Code = Convert.ToString(value); break;
case "AreaId": AreaId = value.ToInt(); break;
case "Avatar": Avatar = Convert.ToString(value); break;
Expand Down Expand Up @@ -198,7 +208,9 @@ public void Copy(IUser model)
DisplayName = model.DisplayName;
Sex = model.Sex;
Mail = model.Mail;
MailVerified = model.MailVerified;
Mobile = model.Mobile;
MobileVerified = model.MobileVerified;
Code = model.Code;
AreaId = model.AreaId;
Avatar = model.Avatar;
Expand Down
34 changes: 34 additions & 0 deletions XCode/Membership/用户.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ public partial class User : IUser, IEntity<UserModel>
[BindColumn("Mail", "邮件。支持登录", "", ItemType = "mail")]
public String? Mail { get => _Mail; set { if (OnPropertyChanging("Mail", value)) { _Mail = value; OnPropertyChanged("Mail"); } } }

private Boolean _MailVerified;
/// <summary>邮箱是否验证。</summary>
[DisplayName("邮箱是否验证")]
[Description("邮箱是否验证。")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MailVerified", "邮箱是否验证。", "")]
public Boolean MailVerified { get => _MailVerified; set { if (OnPropertyChanging("MailVerified", value)) { _MailVerified = value; OnPropertyChanged("MailVerified"); } } }

private String? _Mobile;
/// <summary>手机。支持登录</summary>
[DisplayName("手机")]
Expand All @@ -84,6 +92,14 @@ public partial class User : IUser, IEntity<UserModel>
[BindColumn("Mobile", "手机。支持登录", "", ItemType = "mobile")]
public String? Mobile { get => _Mobile; set { if (OnPropertyChanging("Mobile", value)) { _Mobile = value; OnPropertyChanged("Mobile"); } } }

private Boolean _MobileVerified;
/// <summary>手机是否验证。</summary>
[DisplayName("手机是否验证")]
[Description("手机是否验证。")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MobileVerified", "手机是否验证。", "")]
public Boolean MobileVerified { get => _MobileVerified; set { if (OnPropertyChanging("MobileVerified", value)) { _MobileVerified = value; OnPropertyChanged("MobileVerified"); } } }

private String? _Code;
/// <summary>代码。身份证、员工编码等,支持登录</summary>
[DisplayName("代码")]
Expand Down Expand Up @@ -335,7 +351,9 @@ public void Copy(UserModel model)
DisplayName = model.DisplayName;
Sex = model.Sex;
Mail = model.Mail;
MailVerified = model.MailVerified;
Mobile = model.Mobile;
MobileVerified = model.MobileVerified;
Code = model.Code;
AreaId = model.AreaId;
Avatar = model.Avatar;
Expand Down Expand Up @@ -376,7 +394,9 @@ public override Object? this[String name]
"DisplayName" => _DisplayName,
"Sex" => _Sex,
"Mail" => _Mail,
"MailVerified" => _MailVerified,
"Mobile" => _Mobile,
"MobileVerified" => _MobileVerified,
"Code" => _Code,
"AreaId" => _AreaId,
"Avatar" => _Avatar,
Expand Down Expand Up @@ -416,7 +436,9 @@ public override Object? this[String name]
case "DisplayName": _DisplayName = Convert.ToString(value); break;
case "Sex": _Sex = (XCode.Membership.SexKinds)value.ToInt(); break;
case "Mail": _Mail = Convert.ToString(value); break;
case "MailVerified": _MailVerified = value.ToBoolean(); break;
case "Mobile": _Mobile = Convert.ToString(value); break;
case "MobileVerified": _MobileVerified = value.ToBoolean(); break;
case "Code": _Code = Convert.ToString(value); break;
case "AreaId": _AreaId = value.ToInt(); break;
case "Avatar": _Avatar = Convert.ToString(value); break;
Expand Down Expand Up @@ -555,9 +577,15 @@ public partial class _
/// <summary>邮件。支持登录</summary>
public static readonly Field Mail = FindByName("Mail");

/// <summary>邮箱是否验证。</summary>
public static readonly Field MailVerified = FindByName("MailVerified");

/// <summary>手机。支持登录</summary>
public static readonly Field Mobile = FindByName("Mobile");

/// <summary>手机是否验证。</summary>
public static readonly Field MobileVerified = FindByName("MobileVerified");

/// <summary>代码。身份证、员工编码等,支持登录</summary>
public static readonly Field Code = FindByName("Code");

Expand Down Expand Up @@ -663,9 +691,15 @@ public partial class __
/// <summary>邮件。支持登录</summary>
public const String Mail = "Mail";

/// <summary>邮箱是否验证。</summary>
public const String MailVerified = "MailVerified";

/// <summary>手机。支持登录</summary>
public const String Mobile = "Mobile";

/// <summary>手机是否验证。</summary>
public const String MobileVerified = "MobileVerified";

/// <summary>代码。身份证、员工编码等,支持登录</summary>
public const String Code = "Code";

Expand Down

0 comments on commit aea203a

Please sign in to comment.