forked from ebhomengo/niki
1
0
Fork 0

piggy_bank entity added

This commit is contained in:
HQ2-AlirezaMokhtariG 2023-12-15 11:54:06 +03:30
parent afec9c227d
commit 760a9821c5
12 changed files with 98 additions and 0 deletions

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

7
.idea/misc.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="description" value="" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/niki.iml" filepath="$PROJECT_DIR$/.idea/niki.iml" />
</modules>
</component>
</project>

9
.idea/niki.iml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,13 @@
package contract
import (
entityppigybank "niki/entity/piggy_bank/model"
)
type PiggyRequestBankRequestServices interface {
AddPiggyRequestBank([]entityppigybank.PiggyBankRequest) error
EditPiggyRequestBank(PiggyRequestID uint, PiggyRequestBankInput entityppigybank.PiggyBankRequest) error
DeletePiggyRequestBank(PiggyRequestID uint) error
GetAllPiggyRequestBank() ([]entityppigybank.PiggyBankRequest, error)
GetPiggyRequestBankByID(PiggyRequestBank uint) (entityppigybank.PiggyBankRequest, error)
}

View File

@ -0,0 +1,11 @@
package contract
import entityppigybank "niki/entity/piggy_bank/model"
type PiggyBankServices interface {
AddPiggyBank([]entityppigybank.PiggyBank) error
EditPiggyBank(piggyID uint, piggyBankInput entityppigybank.PiggyBank) error
DeletePiggyBank(piggyID uint) error
GetAllPiggyBank() ([]entityppigybank.PiggyBankRequest, error)
GetPiggyBankByID(piggyBank uint) (entityppigybank.PiggyBank, error)
}

View File

@ -0,0 +1,13 @@
package entityppigybank
import "time"
type (
PiggyBank struct {
ID uint
TotalAmount uint
SerialNumber string
Status uint
StatusChangedAt *time.Time
}
)

View File

@ -0,0 +1,12 @@
package entityppigybank
type (
PiggyBankRequest struct {
ID uint
TypeId uint
CountRequested uint
CountAccepted uint
BenefactorID uint
Description string
}
)

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module https://git.gocasts.ir/ebhomengo/niki
go 1.19

5
main.go Normal file
View File

@ -0,0 +1,5 @@
package niki
func main() {
}

View File

@ -0,0 +1,3 @@
package piggy_bank