Skip to content

Commit

Permalink
Update entity template and project structure
Browse files Browse the repository at this point in the history
The entity template's "identity" has been simplified from "Database Entity" to "Entity". Additionally, changes were made to the "symbols" in the template, removing dependency on specific databases and allowing for more flexibility. The project structure within 'Templates.csproj' was updated to accommodate these changes.
  • Loading branch information
Gary Woodfine committed Jan 18, 2024
1 parent 1a365af commit 2c334d0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
13 changes: 5 additions & 8 deletions src/Entity/.template.config/template.json
Expand Up @@ -3,7 +3,7 @@
"author": "API Template Pack",
"name": "Database Entity",
"description": "Database Entity for Database projects",
"identity": "Database Entity",
"identity": "Entity",
"shortName": "entity",
"sourceName": "EntityName",
"preferNameDirectory": "false",
Expand All @@ -12,14 +12,11 @@
"type": "item"
},
"symbols": {
"useMSSQL": {
"type": "computed",
"value": "(!usePOSTGRE)"
},
"usePOSTGRE": {
"root": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false"
"replaces": "placeHolder",
"dataType": "string",
"defaultValue": "Threenine"
},
"entity": {
"type": "computed",
Expand Down
6 changes: 3 additions & 3 deletions src/Entity/EntityName.cs
@@ -1,10 +1,10 @@
using Threenine.Models;
namespace Templates.Entity;
namespace placeHolder.Database.Entities;

#if (list)
public sealed class EntityName : ValueListEntity
public sealed class EntityName : ValueListEntity
#else
public sealed class EntityName : BaseEntity
public sealed class EntityName : BaseEntity
#endif
{
}
3 changes: 1 addition & 2 deletions src/Templates.csproj
Expand Up @@ -12,11 +12,10 @@
<NoDefaultExcludes>true</NoDefaultExcludes>
</PropertyGroup>
<ItemGroup Label="API Template Pack">
<Compile Include="Entity\Entity.cs" />
<Content Include="Entity\**\*" Exclude="Entity\bin\**;Entity\obj\**" />
<Content Include="Crud\**\*" Exclude="Crud\bin\**;Crud\obj\**" />
<Content Include="Database\**\*" Exclude="Database\DatabaseProject\bin\**;Database\DatabaseProject\obj\**;Models\bin\**;Models\obj\**" />
<Content Include="Domain\**\*" Exclude="Domain\bin\**;Domain\obj\**" />
<Content Include="Entity\.template.config\template.json" />
<Content Include="ModelConfiguration\**\*" Exclude="ModelConfiguration\bin\**;ModelConfiguration\obj\**" />
<Content Include="Project\**\*" Exclude="Project\bin\**;Project\obj\**" />
<Content Include="Command\**\*" Exclude="Command\**\bin\**;Command\**\obj\**" />
Expand Down

0 comments on commit 2c334d0

Please sign in to comment.