ApiPost class

ApiPost is a model for a post.

Post can be used for many purpose like blog, messaging, shopping mall, etc.

Constructors

ApiPost({String? idx, String? rootIdx, String? parentIdx, String? relationIdx, String? userIdx, ApiShortUser? user, String? categoryIdx, String? subcategory, String? path, String? content, List<ApiFile>? files, String? createdAt, String? updatedAt, String? deletedAt, String? private, String? privateTitle, String? privateContent, String? y, String? n, dynamic data, String? title, String? categoryId, List<ApiComment>? comments, String? appliedPoint, String? code, String? shortTitle, int? price, bool? optionItemPrice, int? discountRate, bool? pause, int? point, String? volume, int? deliveryFee, String? storageMethod, String? expiry, String? foodKind, String? origin, String? allergy, String? nutritiveComponents, String? primaryPhoto, String? widgetPhoto, String? detailPhoto, String? bannerPhoto, String? keywords, Map<String, ApiItemOption>? options, String? shortDateTime})
ApiPost.fromJson(Map<String, dynamic> json)
Return ApiPost instance from json that comes from backend.
factory

Properties

allergy String?
getter/setter pair
appliedPoint String?
getter/setter pair
authorName String?
no setter
bannerPhoto String?
getter/setter pair
bannerPhotoUrl String
no setter
categoryId String?
getter/setter pair
categoryIdx String?
getter/setter pair
code String?
getter/setter pair
comments List<ApiComment>?
getter/setter pair
content String?
getter/setter pair
created bool
Returns true if the post has created but not updated.
no setter
createdAt String?
getter/setter pair
data ↔ dynamic
data is the original data for the post. When you need to access an extra meta property, you can access data directly.
getter/setter pair
deletedAt String?
getter/setter pair
deliveryFee int?
getter/setter pair
detailPhoto String?
getter/setter pair
detailPhotoUrl String
no setter
discountedPrice int?
상품 가격을 할인하여 가격으로 리턴. '옵션에 추가금액지정' 방식에서만 사용 할 필요가 있다.
no setter
discountRate int?
getter/setter pair
display bool
optionCount 는 각 옵션 별로 몇 개를 구매하는지 개 수 정보를 가지고 있다. EO Shopping Mall ---------------------------------------------------- Display options
getter/setter pair
expiry String?
getter/setter pair
files List<ApiFile>?
getter/setter pair
foodKind String?
getter/setter pair
hasFiles bool
Returns true if the post(or comment) has any file.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasOption bool
상품에 옵션이 있는가?
no setter
idx String?
getter/setter pair
isCreate bool
no setter
isDeleted bool
no setter
isEdit bool
no setter
isMine bool
no setter
isNotMine bool
no setter
keywords String?
The keywords has multiple keywords separated by comma
getter/setter pair
mode String?
Update mode
getter/setter pair
n String?
getter/setter pair
nutritiveComponents String?
getter/setter pair
optionItemPrice bool?
getter/setter pair
options Map<String, ApiItemOption>?
options 는 백엔드로 부터 오는 값은 코마로 나누어진 옵션 문자열인데, Client 에서 파싱을 해서, 맵으로 보관한다.
getter/setter pair
origin String?
getter/setter pair
parentIdx String?
getter/setter pair
path String?
getter/setter pair
pause bool?
쇼핑 상품 일시 정지 상태인가?
getter/setter pair
point int?
getter/setter pair
price int?
getter/setter pair
priceWithOptions int
사용자가 선택한 현재 상품(아이템)의 (옵션 포함) 주문 가격을 리턴한다.
no setter
primaryPhoto String?
getter/setter pair
primaryPhotoUrl String
no setter
private String?
getter/setter pair
privateContent String?
getter/setter pair
privateTitle String?
getter/setter pair
relationIdx String?
getter/setter pair
rootIdx String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedOptions List<String>
여러 옵션 중에서 사용자가 선택한 옵션만 리턴한다. 기본 옵션은 제외.
no setter
shortAuthorName String?
Get short name for display
no setter
shortDateTime String?
getter/setter pair
shortTitle String?
Shopping mall properties
getter/setter pair
storageMethod String?
getter/setter pair
subcategory String?
getter/setter pair
title String?
getter/setter pair
updatedAt String?
getter/setter pair
user ApiShortUser?
getter/setter pair
userIdx String?
getter/setter pair
volume String?
getter/setter pair
widgetPhoto String?
getter/setter pair
widgetPhotoUrl String
no setter
y String?
getter/setter pair

Methods

addDefaultOption() → dynamic
'옵션에 상품 가격 지정'이 아닌 경우, 즉, '옵션에 추가 금액 지정'인 경우, 옵션 없이 바로 구매 할 수 있도록 기본(DEFAULT_OPTION) 옵션 추가
addOption(String option) → dynamic
현재 상품의 옵션에, 상품 옵션 1개를 추가한다. 참고로, 상품 옵션 정보는 현재 상품의 옵션의 count 속성에 저장된다.
count(String option) int
decreaseItemOption(String option) → dynamic
option 의 count 를 감소시킨다. 즉, 주문 개 수 중에서 1을 감소한다.
delete(String option) → dynamic
option 의 count 를 0 으로 하면, 장바구니에서 보이지 않도록 한다.
fileByCode(String code) ApiFile?
increaseItemOption(String option) → dynamic
옵션의 개 수 증가. '옵션에 상품가격지정방식'만 가능.
insertOrUpdateComment(ApiComment comment) → dynamic
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
optionDiscountedPrice(String option) int
'옵션에 상품가격지정' 방식에서, 옵션의 할인된 가격을 리턴한다.
pointWithOptions(int? itemPoint) int
상품을 주문 할 때, 얼마의 포인트가 적립되는지, 그 포인트 적립금을 리턴한다.
resetOptions() → dynamic
기존에 선택된 옵션들을 모두 리젯한다. 모든 옵션 카운트를 0으로 하면 됨.
thumbnailUrl(dynamic src, {int width = 320, int height = 320, int quality = 75, bool original = false}) String
Upload file/image
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited