Class: CouponRepository
backend.CouponRepository
#
Hierarchy↳
CouponRepository
#
Table of contents#
Constructors#
Properties#
Methods- applyBaseFilter
- applyCouponFilter
- applyDeleteMany
- applyGetEntityViews
- createCoupon
- createEntity
- deleteCoupon
- deleteEntity
- deleteMany
- deleteManyFilteredCoupons
- getAll
- getById
- getBySlug
- getCouponById
- getCoupons
- getCouponsByCodes
- getCouponsByIds
- getEntityViews
- getFilteredCoupons
- getFilteredEntities
- getPaged
- getSqlBoolStr
- getSqlLike
- quote
- updateCoupon
- updateEntity
#
Constructors#
constructor• new CouponRepository()
#
Overrides#
Defined insystem/core/backend/src/repositories/coupon.repository.ts:16
#
Properties#
dbType• dbType: "mysql"
| "mariadb"
| "postgres"
| "cockroachdb"
| "sqlite"
| "mssql"
| "sap"
| "oracle"
| "cordova"
| "nativescript"
| "react-native"
| "sqljs"
| "mongodb"
| "aurora-data-api"
| "aurora-data-api-pg"
| "expo"
| "better-sqlite3"
| "capacitor"
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:24
#
Methods#
applyBaseFilterâ–¸ applyBaseFilter<EntityType
>(qb
, filter?
): SelectQueryBuilder
<EntityType
>
#
Type parametersName | Type |
---|---|
EntityType | TBasePageEntity |
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <EntityType > |
filter? | BaseFilterInput |
#
ReturnsSelectQueryBuilder
<EntityType
>
#
Inherited fromBaseRepository.applyBaseFilter
#
Defined insystem/core/backend/src/repositories/base.repository.ts:155
#
applyCouponFilterâ–¸ applyCouponFilter(qb
, filterParams?
): SelectQueryBuilder
<Coupon
>
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <Coupon > |
filterParams? | BaseFilterInput |
#
ReturnsSelectQueryBuilder
<Coupon
>
#
Defined insystem/core/backend/src/repositories/coupon.repository.ts:101
#
applyDeleteManyâ–¸ applyDeleteMany(qb
, input
): Promise
<void
>
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <Coupon > | DeleteQueryBuilder <Coupon > |
input | TDeleteManyInput |
#
ReturnsPromise
<void
>
#
Inherited fromBaseRepository.applyDeleteMany
#
Defined insystem/core/backend/src/repositories/base.repository.ts:108
#
applyGetEntityViewsâ–¸ applyGetEntityViews(qb
, entityType
): SelectQueryBuilder
<TBasePageEntity
>
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <TBasePageEntity > |
entityType | EDBEntity |
#
ReturnsSelectQueryBuilder
<TBasePageEntity
>
#
Inherited fromBaseRepository.applyGetEntityViews
#
Defined insystem/core/backend/src/repositories/base.repository.ts:133
#
createCouponâ–¸ createCoupon(inputData
, id?
): Promise
<Coupon
>
#
ParametersName | Type |
---|---|
inputData | TCouponInput |
id? | null | number |
#
ReturnsPromise
<Coupon
>
#
Defined insystem/core/backend/src/repositories/coupon.repository.ts:70
#
createEntityâ–¸ createEntity(input
, id?
): Promise
<Coupon
>
#
ParametersName | Type |
---|---|
input | Coupon |
id? | null | number |
#
ReturnsPromise
<Coupon
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:70
#
deleteCouponâ–¸ deleteCoupon(id
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<boolean
>
#
Defined insystem/core/backend/src/repositories/coupon.repository.ts:89
#
deleteEntityâ–¸ deleteEntity(id
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<boolean
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:97
#
deleteManyâ–¸ deleteMany(input
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
input | TDeleteManyInput |
#
ReturnsPromise
<boolean
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:125
#
deleteManyFilteredCouponsâ–¸ deleteManyFilteredCoupons(input
, filterParams?
): Promise
<undefined
| boolean
>
#
ParametersName | Type |
---|---|
input | TDeleteManyInput |
filterParams? | BaseFilterInput |
#
ReturnsPromise
<undefined
| boolean
>
#
Defined insystem/core/backend/src/repositories/coupon.repository.ts:113
#
getAllâ–¸ getAll(): Promise
<Coupon
[]>
#
ReturnsPromise
<Coupon
[]>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:44
#
getByIdâ–¸ getById(id
, relations?
): Promise
<Coupon
>
#
ParametersName | Type |
---|---|
id | number |
relations? | string [] |
#
ReturnsPromise
<Coupon
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:49
#
getBySlugâ–¸ getBySlug(slug
, relations?
): Promise
<Coupon
>
#
ParametersName | Type |
---|---|
slug | string |
relations? | string [] |
#
ReturnsPromise
<Coupon
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:60
#
getCouponByIdâ–¸ getCouponById(id
): Promise
<undefined
| Coupon
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<undefined
| Coupon
>
#
Defined insystem/core/backend/src/repositories/coupon.repository.ts:25
#
getCouponsâ–¸ getCoupons(params?
): Promise
<TPagedList
<Coupon
>>
#
ParametersName | Type |
---|---|
params? | TPagedParams <TCoupon > |
#
ReturnsPromise
<TPagedList
<Coupon
>>
#
Defined insystem/core/backend/src/repositories/coupon.repository.ts:20
#
getCouponsByCodesâ–¸ getCouponsByCodes(codes
): Promise
<undefined
| Coupon
[]>
#
ParametersName | Type |
---|---|
codes | string [] |
#
ReturnsPromise
<undefined
| Coupon
[]>
#
Defined insystem/core/backend/src/repositories/coupon.repository.ts:35
#
getCouponsByIdsâ–¸ getCouponsByIds(ids
): Promise
<Coupon
[]>
#
ParametersName | Type |
---|---|
ids | number [] |
#
ReturnsPromise
<Coupon
[]>
#
Defined insystem/core/backend/src/repositories/coupon.repository.ts:30
#
getEntityViewsâ–¸ getEntityViews(entityId
, entityType
): Promise
<any
>
#
ParametersName | Type |
---|---|
entityId | number |
entityType | EDBEntity |
#
ReturnsPromise
<any
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:144
#
getFilteredCouponsâ–¸ getFilteredCoupons(pagedParams?
, filterParams?
): Promise
<TPagedList
<Coupon
>>
#
ParametersName | Type |
---|---|
pagedParams? | PagedParamsInput <Coupon > |
filterParams? | BaseFilterInput |
#
ReturnsPromise
<TPagedList
<Coupon
>>
#
Defined insystem/core/backend/src/repositories/coupon.repository.ts:106
#
getFilteredEntitiesâ–¸ getFilteredEntities(pagedParams?
, filterParams?
): Promise
<TPagedList
<Coupon
>>
#
ParametersName | Type |
---|---|
pagedParams? | PagedParamsInput <Coupon > |
filterParams? | BaseFilterInput |
#
ReturnsPromise
<TPagedList
<Coupon
>>
#
Inherited fromBaseRepository.getFilteredEntities
#
Defined insystem/core/backend/src/repositories/base.repository.ts:164
#
getPagedâ–¸ getPaged(params?
): Promise
<TPagedList
<Coupon
>>
#
ParametersName | Type |
---|---|
params? | TPagedParams <Coupon > |
#
ReturnsPromise
<TPagedList
<Coupon
>>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:38
#
getSqlBoolStrâ–¸ getSqlBoolStr(b
): "true"
| "false"
| "1"
| "0"
#
ParametersName | Type |
---|---|
b | boolean |
#
Returns"true"
| "false"
| "1"
| "0"
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:34
#
getSqlLikeâ–¸ getSqlLike(): "ILIKE"
| "LIKE"
#
Returns"ILIKE"
| "LIKE"
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:35
#
quoteâ–¸ quote(str
): string
#
ParametersName | Type |
---|---|
str | string |
#
Returnsstring
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:36
#
updateCouponâ–¸ updateCoupon(id
, inputData
): Promise
<Coupon
>
#
ParametersName | Type |
---|---|
id | number |
inputData | TCouponInput |
#
ReturnsPromise
<Coupon
>
#
Defined insystem/core/backend/src/repositories/coupon.repository.ts:80
#
updateEntityâ–¸ updateEntity(id
, input
): Promise
<Coupon
>
#
ParametersName | Type |
---|---|
id | number |
input | Coupon |
#
ReturnsPromise
<Coupon
>