diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-12 14:09:24 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-12 14:09:24 +0300 |
| commit | 4f4c58d1feb668c37cad930a4c6c70902cc324b2 (patch) | |
| tree | a1b93573b7681c314210d627dd9d8569d8935f1d /tools | |
| parent | d42dbc0d55a825ccf8b6d404c542df3da99c7d57 (diff) | |
| download | it-kariera-exam-template-4f4c58d1feb668c37cad930a4c6c70902cc324b2.tar it-kariera-exam-template-4f4c58d1feb668c37cad930a4c6c70902cc324b2.tar.gz it-kariera-exam-template-4f4c58d1feb668c37cad930a4c6c70902cc324b2.zip | |
Fixed models having opening bracket at bad places
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/add-feature-template.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/add-feature-template.sh b/tools/add-feature-template.sh index 1ec562f..4d83354 100755 --- a/tools/add-feature-template.sh +++ b/tools/add-feature-template.sh @@ -24,8 +24,10 @@ dir="../$project_name/Data" cat > $dir/Models/$feature_name.cs<< EOF using System; -namespace $project_name.Data.Models { - public class $feature_name { +namespace $project_name.Data.Models +{ + public class $feature_name + { public Guid Id { get; set; } $( for feature in "${features[@]}"; do @@ -145,8 +147,10 @@ do cat > $subdir/$model${feature_name}ServiceModel.cs<< EOF using System; -namespace $project_name.Services.Models.$feature_name { - public class $model${feature_name}ServiceModel {$( +namespace $project_name.Services.Models.$feature_name +{ + public class $model${feature_name}ServiceModel + {$( if [ ! -z $model ]; then echo -e "\n\t\tpublic Guid Id { get; set; }" fi @@ -222,8 +226,10 @@ do cat > $subdir/$model${feature_name}WebModel.cs<< EOF using System; -namespace $project_name.Web.Models.$feature_name { - public class $model${feature_name}WebModel {$( +namespace $project_name.Web.Models.$feature_name +{ + public class $model${feature_name}WebModel + {$( if [ ! -z $model ]; then echo -e "\n\t\tpublic Guid Id { get; set; }" fi |
