-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DMS-428] Refactor Configuration Service Frontend (#355)
* Move model classes to datamodel project * Move models to folder * Remove unused package
- Loading branch information
1 parent
d7e9319
commit 89f34f9
Showing
43 changed files
with
248 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...nfig/datamodel/EdFi.DmsConfigurationService.DataModel/Model/Vendor/VendorInsertCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Licensed to the Ed-Fi Alliance under one or more agreements. | ||
// The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. | ||
// See the LICENSE and NOTICES files in the project root for more information. | ||
|
||
using FluentValidation; | ||
|
||
namespace EdFi.DmsConfigurationService.DataModel.Model.Vendor; | ||
|
||
public class VendorInsertCommand | ||
{ | ||
public string Company { get; set; } = ""; | ||
public string ContactName { get; set; } = ""; | ||
public string ContactEmailAddress { get; set; } = ""; | ||
public string NamespacePrefixes { get; set; } = ""; | ||
|
||
public class Validator : AbstractValidator<VendorInsertCommand> | ||
{ | ||
public Validator() | ||
{ | ||
RuleFor(v => v.Company).NotEmpty().MaximumLength(256); | ||
RuleFor(v => v.ContactName).NotEmpty().MaximumLength(128); | ||
RuleFor(v => v.ContactEmailAddress).NotEmpty().EmailAddress().MaximumLength(320); | ||
RuleFor(v => v.NamespacePrefixes) | ||
.NotEmpty() | ||
.Must(s => | ||
{ | ||
var split = s?.Split( | ||
',', | ||
StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries | ||
); | ||
return split != null && !split.Any(x => x.Length >= 128); | ||
}) | ||
.WithMessage("Each NamespacePrefix length must be 128 characters or fewer."); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...nfig/datamodel/EdFi.DmsConfigurationService.DataModel/Model/Vendor/VendorUpdateCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Licensed to the Ed-Fi Alliance under one or more agreements. | ||
// The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. | ||
// See the LICENSE and NOTICES files in the project root for more information. | ||
|
||
using FluentValidation; | ||
|
||
namespace EdFi.DmsConfigurationService.DataModel.Model.Vendor; | ||
|
||
public class VendorUpdateCommand : VendorInsertCommand | ||
{ | ||
public long Id { get; set; } | ||
|
||
public new class Validator : AbstractValidator<VendorUpdateCommand> | ||
{ | ||
public Validator() | ||
{ | ||
RuleFor(v => v.Company).NotEmpty().MaximumLength(256); | ||
RuleFor(v => v.ContactName).MaximumLength(128); | ||
RuleFor(v => v.ContactEmailAddress).EmailAddress().MaximumLength(320); | ||
RuleFor(v => v.NamespacePrefixes) | ||
.NotEmpty() | ||
.Must(s => | ||
{ | ||
var split = s?.Split( | ||
',', | ||
StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries | ||
); | ||
return split != null && !split.Any(x => x.Length >= 128); | ||
}) | ||
.WithMessage("Each NamespacePrefix length must be 128 characters or fewer."); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
src/config/datamodel/EdFi.DmsConfigurationService.DataModel/Vendor/VendorInsertCommand.cs
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/config/datamodel/EdFi.DmsConfigurationService.DataModel/Vendor/VendorUpdateCommand.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.