lifedebugger commited on
Commit
ebcbdce
·
1 Parent(s): e799094

Deploy files from GitHub repository

Browse files
Files changed (3) hide show
  1. models/entity/entity.go +7 -7
  2. swag.json +38 -0
  3. swagger/docs/swagger.yaml +29 -0
models/entity/entity.go CHANGED
@@ -17,7 +17,7 @@ type Account struct {
17
  IsEmailVerified bool `json:"is_email_verified,omitempty"`
18
  IsDetailCompleted bool `json:"is_detail_completed,omitempty"`
19
  CreatedAt time.Time `json:"created_at,omitempty"`
20
- DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index"`
21
  }
22
 
23
  func (Account) TableName() string { return "account" }
@@ -87,7 +87,7 @@ type Events struct {
87
  EventCode string `json:"event_code,omitempty"`
88
  IsPublic bool `json:"is_public,omitempty"`
89
  CreatedAt time.Time `json:"created_at,omitempty"`
90
- DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index"`
91
  Price float64 `json:"price"`
92
  RegisterStatus int `gorm:"-" json:"register_status"`
93
  }
@@ -110,7 +110,7 @@ type ProblemSet struct {
110
  Title string `json:"title,omitempty"`
111
  Description string `json:"description,omitempty"`
112
  CreatedAt time.Time `json:"created_at,omitempty"`
113
- DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index"`
114
  }
115
 
116
  func (ProblemSet) TableName() string { return "problem_set" }
@@ -125,7 +125,7 @@ type Exam struct {
125
  Configuration ExamConfiguration `gorm:"foreignKey:ExamId;references:Id" json:"configuration,omitempty"`
126
  Proctoring ExamProctoring `gorm:"foreignKey:ExamId;references:Id" json:"proctoring,omitempty"`
127
  CreatedAt time.Time `json:"created_at,omitempty"`
128
- DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index"`
129
  }
130
 
131
  func (Exam) TableName() string { return "exam" }
@@ -319,7 +319,7 @@ type Academy struct {
319
  Price float64 `json:"price,omitempty"`
320
  RegisterStatus int `gorm:"-" json:"register_status"`
321
  CreatedAt time.Time `json:"created_at,omitempty"`
322
- DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index"`
323
  }
324
 
325
  func (Academy) TableName() string { return "academy" }
@@ -335,7 +335,7 @@ type AcademyMaterial struct {
335
  Contents []AcademyContent `gorm:"foreignKey:MaterialId;references:Id" json:"contents,omitempty"`
336
  AcademyMaterialProgress AcademyMaterialProgress `gorm:"foreignKey:MaterialId;references:Id" json:"academy_material_progress,omitempty"`
337
  CreatedAt time.Time `json:"created_at,omitempty"`
338
- DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index"`
339
  }
340
 
341
  func (AcademyMaterial) TableName() string { return "academy_materials" }
@@ -348,7 +348,7 @@ type AcademyContent struct {
348
  Contents string `json:"contents,omitempty"`
349
  AcademyContentProgress AcademyContentProgress `gorm:"foreignKey:ContentId;references:Id" json:"academy_content_progress,omitempty"`
350
  CreatedAt time.Time `json:"created_at,omitempty"`
351
- DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index"`
352
  }
353
 
354
  func (AcademyContent) TableName() string { return "academy_contents" }
 
17
  IsEmailVerified bool `json:"is_email_verified,omitempty"`
18
  IsDetailCompleted bool `json:"is_detail_completed,omitempty"`
19
  CreatedAt time.Time `json:"created_at,omitempty"`
20
+ DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index" swag:"-"`
21
  }
22
 
23
  func (Account) TableName() string { return "account" }
 
87
  EventCode string `json:"event_code,omitempty"`
88
  IsPublic bool `json:"is_public,omitempty"`
89
  CreatedAt time.Time `json:"created_at,omitempty"`
90
+ DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index" swag:"-"`
91
  Price float64 `json:"price"`
92
  RegisterStatus int `gorm:"-" json:"register_status"`
93
  }
 
110
  Title string `json:"title,omitempty"`
111
  Description string `json:"description,omitempty"`
112
  CreatedAt time.Time `json:"created_at,omitempty"`
113
+ DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index" swag:"-"`
114
  }
115
 
116
  func (ProblemSet) TableName() string { return "problem_set" }
 
125
  Configuration ExamConfiguration `gorm:"foreignKey:ExamId;references:Id" json:"configuration,omitempty"`
126
  Proctoring ExamProctoring `gorm:"foreignKey:ExamId;references:Id" json:"proctoring,omitempty"`
127
  CreatedAt time.Time `json:"created_at,omitempty"`
128
+ DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index" swag:"-"`
129
  }
130
 
131
  func (Exam) TableName() string { return "exam" }
 
319
  Price float64 `json:"price,omitempty"`
320
  RegisterStatus int `gorm:"-" json:"register_status"`
321
  CreatedAt time.Time `json:"created_at,omitempty"`
322
+ DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index" swag:"-"`
323
  }
324
 
325
  func (Academy) TableName() string { return "academy" }
 
335
  Contents []AcademyContent `gorm:"foreignKey:MaterialId;references:Id" json:"contents,omitempty"`
336
  AcademyMaterialProgress AcademyMaterialProgress `gorm:"foreignKey:MaterialId;references:Id" json:"academy_material_progress,omitempty"`
337
  CreatedAt time.Time `json:"created_at,omitempty"`
338
+ DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index" swag:"-"`
339
  }
340
 
341
  func (AcademyMaterial) TableName() string { return "academy_materials" }
 
348
  Contents string `json:"contents,omitempty"`
349
  AcademyContentProgress AcademyContentProgress `gorm:"foreignKey:ContentId;references:Id" json:"academy_content_progress,omitempty"`
350
  CreatedAt time.Time `json:"created_at,omitempty"`
351
+ DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index" swag:"-"`
352
  }
353
 
354
  func (AcademyContent) TableName() string { return "academy_contents" }
swag.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "generalInfo": {
3
+ "title": "Quzuu API",
4
+ "version": "1.0",
5
+ "description": "API for Quzuu Platform",
6
+ "termsOfService": "",
7
+ "contact": {
8
+ "name": "Quzuu Team"
9
+ },
10
+ "license": {
11
+ "name": "Apache 2.0"
12
+ }
13
+ },
14
+ "host": "",
15
+ "basePath": "/",
16
+ "schemes": [
17
+ "http",
18
+ "https"
19
+ ],
20
+ "consumes": [
21
+ "application/json"
22
+ ],
23
+ "produces": [
24
+ "application/json"
25
+ ],
26
+ "swaggerTemplate": "",
27
+ "swaggerFiles": [],
28
+ "parseInternal": true,
29
+ "parseDependency": true,
30
+ "markdownFilesDir": "",
31
+ "generalInfoMarkdownFilesDir": "",
32
+ "encoding": "utf8",
33
+ "parseDepth": 3,
34
+ "outputTypes": [
35
+ "json",
36
+ "yaml"
37
+ ]
38
+ }
swagger/docs/swagger.yaml CHANGED
@@ -2827,6 +2827,8 @@ paths:
2827
  description: Payment Required
2828
  schema:
2829
  $ref: '#/definitions/dto.SuccessResponse-models_EventPaymentTransaction'
 
 
2830
  summary: Join Event
2831
  tags:
2832
  - Event
@@ -3061,6 +3063,33 @@ paths:
3061
  summary: Seed Provinces
3062
  tags:
3063
  - Region
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3064
  schemes:
3065
  - http
3066
  - https
 
2827
  description: Payment Required
2828
  schema:
2829
  $ref: '#/definitions/dto.SuccessResponse-models_EventPaymentTransaction'
2830
+ security:
2831
+ - BearerAuth: []
2832
  summary: Join Event
2833
  tags:
2834
  - Event
 
3063
  summary: Seed Provinces
3064
  tags:
3065
  - Region
3066
+ /api/v1/payment/callback:
3067
+ post:
3068
+ consumes:
3069
+ - application/json
3070
+ description: Receive and process payment status updates from Xendit
3071
+ parameters:
3072
+ - description: Xendit Callback Payload
3073
+ in: body
3074
+ name: request
3075
+ required: true
3076
+ schema:
3077
+ additionalProperties: true
3078
+ type: object
3079
+ produces:
3080
+ - application/json
3081
+ responses:
3082
+ "200":
3083
+ description: OK
3084
+ schema:
3085
+ $ref: '#/definitions/dto.SuccessResponse-any'
3086
+ "400":
3087
+ description: Bad Request
3088
+ schema:
3089
+ $ref: '#/definitions/dto.ErrorResponse'
3090
+ summary: Handle Xendit Payment Callback
3091
+ tags:
3092
+ - Payment
3093
  schemes:
3094
  - http
3095
  - https