interface ListItem {
    name: string
    desc: string
}

interface MemberItem{
    addr: string
    name: string
}

interface payload {
    voteID?: string,
    optionId?: string
}

interface payloadRest {
    id: string,
    addr: string
}

interface payloadList {
    addr?: string,
    count: number,
    direction: number,
    height: number,
    index: number
}

interface trade {
    id?: string,
    optId?: string,
    addr?: string,
    count: number,
    direction: number,
    height: number,
    index: number
}

interface Item {
    addr: string;
    count: number;
    direction: number;
    height: number;
    index: number
}

export interface CreateVoteDto{
    name:string;
    options:ListItem[];
    startHeight:number;
    endHeight:number;
    description?:string;
    url:string;
    numType:number; //投票期间可复投次数 1 表示一次性 2表示每天一次
    members:MemberItem[];
    isOpen:boolean;
    type:number;
}

export interface attendVote {
    voteId: string;
    name: string;
    desc: string
}

export interface memberInfo {
    id: string;
    addMembers: { addr: string, name: string }
}

export interface delMember {
    id: string;
    addr: string []
}

export interface memberVote {
    voteId: string;
    optionId: string;
    amount: number
}

export interface memberCloseVote {
    voteId: string
}

export interface memberChangeVote {
    voteId: string;
    addr: string
}

export interface voteDetails {
    execer: string;
    funcName: string;
    payload: payload
}

export interface voteRest {
    execer: string;
    funcName: string;
    payload: payloadRest
}

export interface voteList {
    execer: string;
    funcName: string;
    payload: payloadList
}

export interface tradeList {
    execer: string;
    funcName: string;
    payload: trade
}

export interface blockInfo {
    start: number;
    end: number;
    isDetail: boolean
}

export interface listItem {
    execer: string;
    funcName: string;
    payload: Item
}

export interface delItem {
    id: string;
    optId: string
}

export interface activityItem {
    execer: string;
    funcName: string;
    payload: {
        addr: string;
        count: number;
        direction: number;
        height: number;
        index: number
    }
}

export interface hashList {
    execer: string;
    funcName: string;
    payload: {
        data: string
    }
}