aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/add-feature-template.sh18
1 files changed, 7 insertions, 11 deletions
diff --git a/tools/add-feature-template.sh b/tools/add-feature-template.sh
index a85cb7a..87b556f 100755
--- a/tools/add-feature-template.sh
+++ b/tools/add-feature-template.sh
@@ -147,12 +147,12 @@ EOF
subdir="$dir/Models/$feature_name"
mkdir -p $subdir
-models=("View" "" "Edit")
+models=("" "Create" "Edit")
for model in "${models[@]}"
do
cat > $subdir/$model${feature_name}ServiceModel.cs<< EOF
using System;$(
-if [ ! -z $model ]; then
+if [ $model != "Create" ]; then
echo -e "\nusing $project_name.Services.Models;"
fi
)
@@ -160,7 +160,7 @@ fi
namespace $project_name.Services.Models.$feature_name
{
public class $model${feature_name}ServiceModel$(
-if [ ! -z $model ]; then
+if [ $model != "Create" ]; then
echo -e ' : BaseServiceModel'
fi
)
@@ -229,12 +229,12 @@ fi
subdir="$dir/Models/$feature_name"
mkdir -p $subdir
-models=("View" "" "Edit")
+models=("" "Create" "Edit")
for model in "${models[@]}"
do
cat > $subdir/$model${feature_name}WebModel.cs<< EOF
using System;$(
-if [ ! -z $model ]; then
+if [ $model != "Create" ]; then
echo -e "\nusing $project_name.Web.Models;"
fi
)
@@ -242,15 +242,11 @@ fi
namespace $project_name.Web.Models.$feature_name
{
public class $model${feature_name}WebModel$(
-if [ ! -z $model ]; then
+if [ $model != "Create" ]; then
echo -e ' : BaseWebModel'
fi
)
- {$(
-if [ ! -z $model ]; then
-echo -e "\n\t\tpublic Guid Id { get; set; }"
-fi
-)
+ {
$(
for feature in "${features[@]}"; do
echo -e "\t\tpublic $feature { get; set; }"