From 5876aca21c1c4930e242da30c81561371bd0b925 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Wed, 22 Nov 2023 15:21:26 +0330 Subject: [PATCH] Add support for RoleOnSiteType --- .../CustomerGeneratedServices/OpenAPI.cs | 518 ++++++++++++++++++ .../OpenAPI.nswag.json | 184 +++++++ ...rvices.CustomerMicroservice.Clients.csproj | 2 +- .../Database/Entities/PersonEntity.cs | 17 +- .../Database/Schemas/PersonSchema.cs | 8 + .../Contracts/Common/PersonBaseContract.cs | 11 +- .../DataTypes/RoleOnSiteType.cs | 35 ++ 7 files changed, 758 insertions(+), 17 deletions(-) create mode 100644 src/CSharp/EasyMicroservices.CustomerMicroservice.Domain/DataTypes/RoleOnSiteType.cs diff --git a/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/Connected Services/CustomerGeneratedServices/OpenAPI.cs b/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/Connected Services/CustomerGeneratedServices/OpenAPI.cs index b0bd63f..fde52ab 100644 --- a/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/Connected Services/CustomerGeneratedServices/OpenAPI.cs +++ b/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/Connected Services/CustomerGeneratedServices/OpenAPI.cs @@ -13581,6 +13581,12 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class CreatePersonRequestContract : System.ComponentModel.INotifyPropertyChanged { + private string _nationalCode; + private GenderType _genderType; + private NationalityType _nationalityType; + private MaritalStatusType _maritalStatus; + private System.DateTimeOffset? _birthDate; + private RoleOnSiteType _roleOnSiteType; private PersonType _type; private string _description; private string _uniqueIdentity; @@ -13588,9 +13594,101 @@ public partial class CreatePersonRequestContract : System.ComponentModel.INotify private System.DateTimeOffset? _modificationDateTime; private System.DateTimeOffset? _deletedDateTime; private bool _isDeleted; + private long? _categoryId; private System.Collections.Generic.ICollection _firstNames; private System.Collections.Generic.ICollection _lastNames; + [Newtonsoft.Json.JsonProperty("nationalCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string NationalCode + { + get { return _nationalCode; } + + set + { + if (_nationalCode != value) + { + _nationalCode = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("genderType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GenderType GenderType + { + get { return _genderType; } + + set + { + if (_genderType != value) + { + _genderType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("nationalityType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NationalityType NationalityType + { + get { return _nationalityType; } + + set + { + if (_nationalityType != value) + { + _nationalityType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("maritalStatus", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MaritalStatusType MaritalStatus + { + get { return _maritalStatus; } + + set + { + if (_maritalStatus != value) + { + _maritalStatus = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("birthDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter))] + public System.DateTimeOffset? BirthDate + { + get { return _birthDate; } + + set + { + if (_birthDate != value) + { + _birthDate = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("roleOnSiteType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RoleOnSiteType RoleOnSiteType + { + get { return _roleOnSiteType; } + + set + { + if (_roleOnSiteType != value) + { + _roleOnSiteType = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public PersonType Type { @@ -13696,6 +13794,21 @@ public bool IsDeleted } } + [Newtonsoft.Json.JsonProperty("categoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? CategoryId + { + get { return _categoryId; } + + set + { + if (_categoryId != value) + { + _categoryId = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("firstNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection FirstNames { @@ -15050,6 +15163,28 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public enum GenderType + { + + None = 0, + + Default = 1, + + All = 2, + + Other = 3, + + Unknown = 4, + + Nothing = 5, + + Male = 6, + + Female = 7, + + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class GetByLanguageRequestContract : System.ComponentModel.INotifyPropertyChanged { @@ -15486,6 +15621,28 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public enum MaritalStatusType + { + + None = 0, + + Default = 1, + + All = 2, + + Other = 3, + + Unknown = 4, + + Nothing = 5, + + Married = 6, + + Single = 7, + + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class MessageContract : System.ComponentModel.INotifyPropertyChanged { @@ -17199,6 +17356,12 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class PersonContract : System.ComponentModel.INotifyPropertyChanged { + private string _nationalCode; + private GenderType _genderType; + private NationalityType _nationalityType; + private MaritalStatusType _maritalStatus; + private System.DateTimeOffset? _birthDate; + private RoleOnSiteType _roleOnSiteType; private PersonType _type; private string _description; private string _uniqueIdentity; @@ -17206,10 +17369,102 @@ public partial class PersonContract : System.ComponentModel.INotifyPropertyChang private System.DateTimeOffset? _modificationDateTime; private System.DateTimeOffset? _deletedDateTime; private bool _isDeleted; + private long? _categoryId; private long _id; private string _firstName; private string _lastName; + [Newtonsoft.Json.JsonProperty("nationalCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string NationalCode + { + get { return _nationalCode; } + + set + { + if (_nationalCode != value) + { + _nationalCode = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("genderType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GenderType GenderType + { + get { return _genderType; } + + set + { + if (_genderType != value) + { + _genderType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("nationalityType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NationalityType NationalityType + { + get { return _nationalityType; } + + set + { + if (_nationalityType != value) + { + _nationalityType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("maritalStatus", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MaritalStatusType MaritalStatus + { + get { return _maritalStatus; } + + set + { + if (_maritalStatus != value) + { + _maritalStatus = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("birthDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter))] + public System.DateTimeOffset? BirthDate + { + get { return _birthDate; } + + set + { + if (_birthDate != value) + { + _birthDate = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("roleOnSiteType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RoleOnSiteType RoleOnSiteType + { + get { return _roleOnSiteType; } + + set + { + if (_roleOnSiteType != value) + { + _roleOnSiteType = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public PersonType Type { @@ -17315,6 +17570,21 @@ public bool IsDeleted } } + [Newtonsoft.Json.JsonProperty("categoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? CategoryId + { + get { return _categoryId; } + + set + { + if (_categoryId != value) + { + _categoryId = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long Id { @@ -17561,6 +17831,12 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class PersonLanguageContract : System.ComponentModel.INotifyPropertyChanged { + private string _nationalCode; + private GenderType _genderType; + private NationalityType _nationalityType; + private MaritalStatusType _maritalStatus; + private System.DateTimeOffset? _birthDate; + private RoleOnSiteType _roleOnSiteType; private PersonType _type; private string _description; private string _uniqueIdentity; @@ -17568,10 +17844,102 @@ public partial class PersonLanguageContract : System.ComponentModel.INotifyPrope private System.DateTimeOffset? _modificationDateTime; private System.DateTimeOffset? _deletedDateTime; private bool _isDeleted; + private long? _categoryId; private long _id; private System.Collections.Generic.ICollection _firstNames; private System.Collections.Generic.ICollection _lastNames; + [Newtonsoft.Json.JsonProperty("nationalCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string NationalCode + { + get { return _nationalCode; } + + set + { + if (_nationalCode != value) + { + _nationalCode = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("genderType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GenderType GenderType + { + get { return _genderType; } + + set + { + if (_genderType != value) + { + _genderType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("nationalityType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NationalityType NationalityType + { + get { return _nationalityType; } + + set + { + if (_nationalityType != value) + { + _nationalityType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("maritalStatus", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MaritalStatusType MaritalStatus + { + get { return _maritalStatus; } + + set + { + if (_maritalStatus != value) + { + _maritalStatus = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("birthDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter))] + public System.DateTimeOffset? BirthDate + { + get { return _birthDate; } + + set + { + if (_birthDate != value) + { + _birthDate = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("roleOnSiteType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RoleOnSiteType RoleOnSiteType + { + get { return _roleOnSiteType; } + + set + { + if (_roleOnSiteType != value) + { + _roleOnSiteType = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public PersonType Type { @@ -17677,6 +18045,21 @@ public bool IsDeleted } } + [Newtonsoft.Json.JsonProperty("categoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? CategoryId + { + get { return _categoryId; } + + set + { + if (_categoryId != value) + { + _categoryId = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long Id { @@ -18416,6 +18799,28 @@ public enum PhoneNumberType } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public enum RoleOnSiteType + { + + None = 0, + + Default = 1, + + All = 2, + + Other = 3, + + Unknown = 4, + + Nothing = 5, + + Customer = 6, + + Seller = 7, + + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class ServiceDetailsContract : System.ComponentModel.INotifyPropertyChanged { @@ -19387,6 +19792,12 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class UpdatePersonRequestContract : System.ComponentModel.INotifyPropertyChanged { + private string _nationalCode; + private GenderType _genderType; + private NationalityType _nationalityType; + private MaritalStatusType _maritalStatus; + private System.DateTimeOffset? _birthDate; + private RoleOnSiteType _roleOnSiteType; private PersonType _type; private string _description; private string _uniqueIdentity; @@ -19394,10 +19805,102 @@ public partial class UpdatePersonRequestContract : System.ComponentModel.INotify private System.DateTimeOffset? _modificationDateTime; private System.DateTimeOffset? _deletedDateTime; private bool _isDeleted; + private long? _categoryId; private System.Collections.Generic.ICollection _firstNames; private System.Collections.Generic.ICollection _lastNames; private long _id; + [Newtonsoft.Json.JsonProperty("nationalCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string NationalCode + { + get { return _nationalCode; } + + set + { + if (_nationalCode != value) + { + _nationalCode = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("genderType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GenderType GenderType + { + get { return _genderType; } + + set + { + if (_genderType != value) + { + _genderType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("nationalityType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NationalityType NationalityType + { + get { return _nationalityType; } + + set + { + if (_nationalityType != value) + { + _nationalityType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("maritalStatus", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MaritalStatusType MaritalStatus + { + get { return _maritalStatus; } + + set + { + if (_maritalStatus != value) + { + _maritalStatus = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("birthDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter))] + public System.DateTimeOffset? BirthDate + { + get { return _birthDate; } + + set + { + if (_birthDate != value) + { + _birthDate = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("roleOnSiteType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RoleOnSiteType RoleOnSiteType + { + get { return _roleOnSiteType; } + + set + { + if (_roleOnSiteType != value) + { + _roleOnSiteType = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public PersonType Type { @@ -19503,6 +20006,21 @@ public bool IsDeleted } } + [Newtonsoft.Json.JsonProperty("categoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? CategoryId + { + get { return _categoryId; } + + set + { + if (_categoryId != value) + { + _categoryId = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("firstNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection FirstNames { diff --git a/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/Connected Services/CustomerGeneratedServices/OpenAPI.nswag.json b/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/Connected Services/CustomerGeneratedServices/OpenAPI.nswag.json index 92bfa29..4a870ee 100644 --- a/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/Connected Services/CustomerGeneratedServices/OpenAPI.nswag.json +++ b/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/Connected Services/CustomerGeneratedServices/OpenAPI.nswag.json @@ -7097,6 +7097,28 @@ "type": "object", "additionalProperties": false, "properties": { + "nationalCode": { + "type": "string", + "nullable": true + }, + "genderType": { + "$ref": "#/components/schemas/GenderType" + }, + "nationalityType": { + "$ref": "#/components/schemas/NationalityType" + }, + "maritalStatus": { + "$ref": "#/components/schemas/MaritalStatusType" + }, + "birthDate": { + "title": "Nullable", + "type": "string", + "format": "date", + "nullable": true + }, + "roleOnSiteType": { + "$ref": "#/components/schemas/RoleOnSiteType" + }, "type": { "$ref": "#/components/schemas/PersonType" }, @@ -7127,6 +7149,12 @@ "isDeleted": { "type": "boolean" }, + "categoryId": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true + }, "firstNames": { "title": "List", "type": "array", @@ -7588,6 +7616,30 @@ } } }, + "GenderType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "None", + "Default", + "All", + "Other", + "Unknown", + "Nothing", + "Male", + "Female" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + }, "GetByLanguageRequestContract": { "type": "object", "additionalProperties": false, @@ -7748,6 +7800,30 @@ } } }, + "MaritalStatusType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "None", + "Default", + "All", + "Other", + "Unknown", + "Nothing", + "Married", + "Single" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + }, "MessageContract": { "type": "object", "additionalProperties": false, @@ -8599,6 +8675,28 @@ "type": "object", "additionalProperties": false, "properties": { + "nationalCode": { + "type": "string", + "nullable": true + }, + "genderType": { + "$ref": "#/components/schemas/GenderType" + }, + "nationalityType": { + "$ref": "#/components/schemas/NationalityType" + }, + "maritalStatus": { + "$ref": "#/components/schemas/MaritalStatusType" + }, + "birthDate": { + "title": "Nullable", + "type": "string", + "format": "date", + "nullable": true + }, + "roleOnSiteType": { + "$ref": "#/components/schemas/RoleOnSiteType" + }, "type": { "$ref": "#/components/schemas/PersonType" }, @@ -8629,6 +8727,12 @@ "isDeleted": { "type": "boolean" }, + "categoryId": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true + }, "id": { "type": "integer", "format": "int64" @@ -8698,6 +8802,28 @@ "type": "object", "additionalProperties": false, "properties": { + "nationalCode": { + "type": "string", + "nullable": true + }, + "genderType": { + "$ref": "#/components/schemas/GenderType" + }, + "nationalityType": { + "$ref": "#/components/schemas/NationalityType" + }, + "maritalStatus": { + "$ref": "#/components/schemas/MaritalStatusType" + }, + "birthDate": { + "title": "Nullable", + "type": "string", + "format": "date", + "nullable": true + }, + "roleOnSiteType": { + "$ref": "#/components/schemas/RoleOnSiteType" + }, "type": { "$ref": "#/components/schemas/PersonType" }, @@ -8728,6 +8854,12 @@ "isDeleted": { "type": "boolean" }, + "categoryId": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true + }, "id": { "type": "integer", "format": "int64" @@ -8979,6 +9111,30 @@ 10 ] }, + "RoleOnSiteType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "None", + "Default", + "All", + "Other", + "Unknown", + "Nothing", + "Customer", + "Seller" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + }, "ServiceDetailsContract": { "type": "object", "additionalProperties": false, @@ -9300,6 +9456,28 @@ "type": "object", "additionalProperties": false, "properties": { + "nationalCode": { + "type": "string", + "nullable": true + }, + "genderType": { + "$ref": "#/components/schemas/GenderType" + }, + "nationalityType": { + "$ref": "#/components/schemas/NationalityType" + }, + "maritalStatus": { + "$ref": "#/components/schemas/MaritalStatusType" + }, + "birthDate": { + "title": "Nullable", + "type": "string", + "format": "date", + "nullable": true + }, + "roleOnSiteType": { + "$ref": "#/components/schemas/RoleOnSiteType" + }, "type": { "$ref": "#/components/schemas/PersonType" }, @@ -9330,6 +9508,12 @@ "isDeleted": { "type": "boolean" }, + "categoryId": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true + }, "firstNames": { "title": "List", "type": "array", diff --git a/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/EasyMicroservices.CustomerMicroservice.Clients.csproj b/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/EasyMicroservices.CustomerMicroservice.Clients.csproj index ed8b024..411f1f5 100644 --- a/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/EasyMicroservices.CustomerMicroservice.Clients.csproj +++ b/src/CSharp/EasyMicroservices.CustomerMicroservice.Clients/EasyMicroservices.CustomerMicroservice.Clients.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.1 + 0.0.0.2 client generated code. EasyMicroservices@gmail.com microservice,address,person,visa,passport,phone,email,customer diff --git a/src/CSharp/EasyMicroservices.CustomerMicroservice.Database/Database/Entities/PersonEntity.cs b/src/CSharp/EasyMicroservices.CustomerMicroservice.Database/Database/Entities/PersonEntity.cs index 287cc8d..8a870ef 100644 --- a/src/CSharp/EasyMicroservices.CustomerMicroservice.Database/Database/Entities/PersonEntity.cs +++ b/src/CSharp/EasyMicroservices.CustomerMicroservice.Database/Database/Entities/PersonEntity.cs @@ -1,6 +1,7 @@ using EasyMicroservices.Cores.Interfaces; using EasyMicroservices.CustomerMicroservice.Database.Entities.Releations; using EasyMicroservices.CustomerMicroservice.Database.Schemas; +using EasyMicroservices.CustomerMicroservice.DataTypes; using EasyMicroservices.Domain.DataTypes; using System; using System.Collections.Generic; @@ -10,21 +11,7 @@ namespace EasyMicroservices.CustomerMicroservice.Database.Entities public class PersonEntity : PersonSchema, IIdSchema { public long Id { get; set; } - public string NationalCode { get; set; } - /// - /// جنسیت شخص - /// - public GenderType? GenderType { get; set; } - /// - /// ملیت - /// - public NationalityType? NationalityType { get; set; } - /// - /// وضعیت تاهل - /// - public MaritalStatusType? MaritalStatus { get; set; } - public DateOnly? BirthDate { get; set; } - + public long? CategoryId { get; set; } public PersonCategoryEntity Category { get; set; } diff --git a/src/CSharp/EasyMicroservices.CustomerMicroservice.Database/Database/Schemas/PersonSchema.cs b/src/CSharp/EasyMicroservices.CustomerMicroservice.Database/Database/Schemas/PersonSchema.cs index 2b503c6..e1d1723 100644 --- a/src/CSharp/EasyMicroservices.CustomerMicroservice.Database/Database/Schemas/PersonSchema.cs +++ b/src/CSharp/EasyMicroservices.CustomerMicroservice.Database/Database/Schemas/PersonSchema.cs @@ -1,10 +1,18 @@ using EasyMicroservices.Cores.Database.Schemas; using EasyMicroservices.CustomerMicroservice.DataTypes; +using EasyMicroservices.Domain.DataTypes; +using System; namespace EasyMicroservices.CustomerMicroservice.Database.Schemas { public class PersonSchema : FullAbilitySchema { + public string NationalCode { get; set; } + public GenderType? GenderType { get; set; } + public NationalityType? NationalityType { get; set; } + public MaritalStatusType? MaritalStatus { get; set; } + public DateOnly? BirthDate { get; set; } + public RoleOnSiteType? RoleOnSiteType { get; set; } public PersonType Type { get; set; } public string Description { get; set; } } diff --git a/src/CSharp/EasyMicroservices.CustomerMicroservice.Domain/Contracts/Common/PersonBaseContract.cs b/src/CSharp/EasyMicroservices.CustomerMicroservice.Domain/Contracts/Common/PersonBaseContract.cs index 5b45a96..4ba4678 100644 --- a/src/CSharp/EasyMicroservices.CustomerMicroservice.Domain/Contracts/Common/PersonBaseContract.cs +++ b/src/CSharp/EasyMicroservices.CustomerMicroservice.Domain/Contracts/Common/PersonBaseContract.cs @@ -1,18 +1,27 @@ using EasyMicroservices.Cores.Interfaces; using EasyMicroservices.CustomerMicroservice.DataTypes; +using EasyMicroservices.Domain.DataTypes; using System; namespace EasyMicroservices.CustomerMicroservice.Contracts.Common { public class PersonBaseContract : IUniqueIdentitySchema, IDateTimeSchema, ISoftDeleteSchema { + public string NationalCode { get; set; } + public GenderType? GenderType { get; set; } + public NationalityType? NationalityType { get; set; } + public MaritalStatusType? MaritalStatus { get; set; } + public DateOnly? BirthDate { get; set; } + public RoleOnSiteType? RoleOnSiteType { get; set; } public PersonType Type { get; set; } - public string Description { get; set; } + public string Description { get; set; } public string UniqueIdentity { get; set; } public DateTime CreationDateTime { get; set; } public DateTime? ModificationDateTime { get; set; } public DateTime? DeletedDateTime { get; set; } public bool IsDeleted { get; set; } + + public long? CategoryId { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.CustomerMicroservice.Domain/DataTypes/RoleOnSiteType.cs b/src/CSharp/EasyMicroservices.CustomerMicroservice.Domain/DataTypes/RoleOnSiteType.cs new file mode 100644 index 0000000..8673010 --- /dev/null +++ b/src/CSharp/EasyMicroservices.CustomerMicroservice.Domain/DataTypes/RoleOnSiteType.cs @@ -0,0 +1,35 @@ +namespace EasyMicroservices.CustomerMicroservice.DataTypes +{ + /// + /// + /// + public enum RoleOnSiteType : byte + { + /// + /// value is none, Never use the None to return values + /// + None = 0, + /// + /// error value is default + /// + Default = 1, + /// + /// for the filter values from web admin panel you can sent all for types + /// + All = 2, + /// + /// there is other error that is not in the types + /// + Other = 3, + /// + /// the error type is uknown to us + /// + Unknown = 4, + /// + /// there is nothing to show or validate error + /// + Nothing = 5, + Customer = 6, + Seller = 7, + } +}