interface PromotionInterface {
    id?: number;
    code: string;
    imageId: number;
    userId: number;
    lastUpdatedBy?: number;
    accountId?: number;
    isRevision?: Boolean;
    revisionId?: number;
    link: string;
    type: string;
    publishAt: Date;
    expireAt: Date;
    isPremium: boolean;
    status: number;
    sortOrder?: number;
    promotionContent?: PromotionContentInterface,
    promotionContents?: PromotionContentInterface[];
}

interface PromotionContentInterface {
    id?: number;
    promotionId?: number;
    languageId: number;
    title: string;
    description?: Text | null;
    descriptionText?: Text | null;
}

interface PromotionRequestObject {
    title: string;
    description?: Text | null;
    imageId?: number | null;
    link: string;
    type: string;
    publishAt: Date;
    expireAt: Date;
    isPremium: boolean;
    status: number | null;
}

interface PromotionObject {
    code: string;
    status: number | null;
    imageId: number | null;
    link: string;
    type: string;
    publishAt: Date;
    expireAt: Date;
    isPremium: boolean;
}

interface PromotionContentObject {
    id?: number
    promotionId?: number;
    title: string;
    description?: Text | null;
    descriptionText?: Text | null;
    languageId?: number;
}

interface PromotionObjectInteface {
    id: number;
    code: string;
    promotionId?: string | null;
    status: number;
    title: string;
    link: string;
    type: string;
    publishAt: Date;
    expireAt: Date;
    isPremium: boolean;
    description?: Text | null;
    descriptionText?: Text | null;
    author: UserPublicObjectInterface | null,
    lastUpdatedBy: UserPublicObjectInterface | null,
    createdAt: Date,
    updatedAt: Date
}

interface PromotionObjectSummaryInterface {
    id: number;
    code: string;
    status: number;
    title: string;
    link: string;
    type: string;
    publishAt: Date;
    expireAt: Date;
    isPremium: boolean;
    description?: Text | null;
    descriptionText?: Text | null;
    createdAt: Date,
    updatedAt: Date
}

interface PromotionDataObject {
    id?: number;
    code: string;
    userId: number | null;
    accountId: number | null;
    lastUpdatedBy?: number;
    promotionContents?: PromotionContentObject[];
    promotionContent?: PromotionContentObject
}

interface PromotionPaginatedList {
    page: number;
    perPage: number;
    totalRecords: number;
    totalPages?: number;
    data: PromotionObjectSummaryInterface[] | [];
}

interface PromotionPaginatedData {
    count: number;
    rows: PromotionObjectSummaryInterface[]
}

interface PromotionIdentifierObject {
    id: number;
}

interface PromotionStringIdentifierObject {
    code: string;
}

interface PromotionStatusObject {
    status: number;
}

interface PromotionListRequestObject {
    page: number;
    perPage: number;
    searchText: string | null;
    sortBy: string;
    sortDirection: string;
    type?: string;
    status?: number;
}

interface PromotionListAllRequestObject {
    status: number | null;
    searchText: string | null;
    sortBy: string;
    sortDirection: string;
    type: string;
}

interface PromotionSortRequest {
    before: number | null;
    after: number | null;
}

interface UserPromotionPaginatedData {
    userPromotions: number[],
    // count: number;
    promotions: PromotionObjectSummaryInterface[]
}

interface PromotionTypeObject {
    type: string;
}

interface DaoOptions {
    transaction?: import("sequelize").Transaction;
}

interface PromotionCreateServiceInput {
    title: string;
    description?: Text | null;
    imageId?: number | null;
    link: string;
    type: string;
    publishAt: Date;
    expireAt: Date;
    isPremium: boolean;
    status: number | null;
}

interface PromotionUpdateServiceInput {
    id: number;
    title: string;
    description?: Text | null;
    imageId?: number | null;
    link: string;
    type: string;
    publishAt: Date;
    expireAt: Date;
    isPremium: boolean;
    status: number | null;
}

interface PromotionDeleteServiceInput {
    id: number;
}

interface PromotionGetByIdServiceInput {
    id: number;
    expanded?: boolean;
}

interface PromotionGetByCodeServiceInput {
    code: string;
    expanded?: boolean;
}

interface PromotionGetPromotionsServiceInput {
    type: string | null;
    listRequest: PromotionListRequestObject;
    status?: number | null;
}

interface PromotionGetAllPromotionsServiceInput {
    type: string;
    listRequest: PromotionListAllRequestObject;
}

interface PromotionGetPromotionsRevisionsServiceInput {
    id: number;
    listRequest: PromotionListRequestObject;
    language?: string | null;
}

interface PromotionRestoreRevisionServiceInput {
    id: number;
}

interface PromotionGetPromotionIdServiceInput {
    code: string;
}

interface PromotionSetSortOrderServiceInput {
    id: number;
    before: number | null;
    after: number | null;
}

interface PromotionUpdateStatusServiceInput {
    id: number;
    status: number;
}

interface PromotionGetDaoInput {
    id?: number | null;
    code?: string | null;
    expanded?: boolean;
    paranoid?: boolean;
}

interface PromotionGetByIdDaoInput {
    id: number;
    expanded?: boolean;
    paranoid?: boolean;
}

interface PromotionGetByCodeDaoInput {
    code: string;
    expanded?: boolean;
    paranoid?: boolean;
}

interface PromotionDoExistsByCodeDaoInput {
    code: string;
    excludeId?: number | null;
    includeRevision?: boolean;
}

interface PromotionDoExistsByIdDaoInput {
    id: number;
    includeRevision?: boolean;
}

interface PromotionCreateDaoInput {
    promotionObj: PromotionObject;
    promotionContentObj: PromotionContentObject;
    languages: LanguageInfo;
}

interface PromotionUpdateDaoInput {
    id: number;
    promotionObj: PromotionObject;
    promotionContentObj: PromotionContentObject;
    languages: LanguageInfo;
}

interface PromotionDeleteDaoInput {
    id: number;
}

interface PromotionSetSortOrderDaoInput {
    id: number;
    before?: number | null;
    after?: number | null;
}

interface PromotionGetPromotionListDaoInput {
    type: string | null;
    listRequest: PromotionListRequestObject;
}

interface PromotionGetAllPromotionsDaoInput {
    type: string;
    listRequest: PromotionListAllRequestObject;
}

interface PromotionGetPromotionRevisionListDaoInput {
    id: number;
    listRequest: PromotionListRequestObject;
    language?: string | null;
}

interface PromotionRestoreRevisionDaoInput {
    id: number;
}

interface PromotionGetIdFromCodeDaoInput {
    code: string;
}

interface PromotionUpdateStatusDaoInput {
    id: number;
    status: number;
}
