Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
HIAST-Clinics
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
almohanad.hafez
HIAST-Clinics
Commits
56b44861
Commit
56b44861
authored
Aug 16, 2024
by
Almouhannad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(B) Add amount value to medicines
parent
219cd6d0
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
971 additions
and
0 deletions
+971
-0
Medicine.cs
...cs.Backend/Domain/Entities/Medicals/Medicines/Medicine.cs
+2
-0
20240816173549_Add_Amount_To_Medicine.Designer.cs
...rations/20240816173549_Add_Amount_To_Medicine.Designer.cs
+937
-0
20240816173549_Add_Amount_To_Medicine.cs
...tence/Migrations/20240816173549_Add_Amount_To_Medicine.cs
+29
-0
ClinicsDbContextModelSnapshot.cs
...d/Persistence/Migrations/ClinicsDbContextModelSnapshot.cs
+3
-0
No files found.
Clinics.Backend/Domain/Entities/Medicals/Medicines/Medicine.cs
View file @
56b44861
...
...
@@ -11,6 +11,8 @@ public sealed class Medicine(int id) : Entity(id)
public
MedicineForm
MedicineForm
{
get
;
set
;
}
=
null
!;
public
int
Amount
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
=
null
!;
public
decimal
Dosage
{
get
;
set
;
}
...
...
Clinics.Backend/Persistence/Migrations/20240816173549_Add_Amount_To_Medicine.Designer.cs
0 → 100644
View file @
56b44861
This diff is collapsed.
Click to expand it.
Clinics.Backend/Persistence/Migrations/20240816173549_Add_Amount_To_Medicine.cs
0 → 100644
View file @
56b44861
using
Microsoft.EntityFrameworkCore.Migrations
;
#
nullable
disable
namespace
Persistence.Migrations
{
/// <inheritdoc />
public
partial
class
Add_Amount_To_Medicine
:
Migration
{
/// <inheritdoc />
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
AddColumn
<
int
>(
name
:
"Amount"
,
table
:
"Medicine"
,
type
:
"int"
,
nullable
:
false
,
defaultValue
:
0
);
}
/// <inheritdoc />
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
DropColumn
(
name
:
"Amount"
,
table
:
"Medicine"
);
}
}
}
Clinics.Backend/Persistence/Migrations/ClinicsDbContextModelSnapshot.cs
View file @
56b44861
...
...
@@ -110,6 +110,9 @@ namespace Persistence.Migrations
SqlServerPropertyBuilderExtensions
.
UseIdentityColumn
(
b
.
Property
<
int
>(
"Id"
));
b
.
Property
<
int
>(
"Amount"
)
.
HasColumnType
(
"int"
);
b
.
Property
<
decimal
>(
"Dosage"
)
.
HasColumnType
(
"numeric(9, 3)"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment