// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

syntax = "proto3";

package types;

message VoteResult {
    // 总票数
    int32	totalVotes   = 1;
    // 赞成票
    int32	approveVotes = 2;
    // 反对票
    int32	opposeVotes  = 3;
    // 是否通过
    bool	pass         = 4;
}

message PublicVote {
    // 是否需要公示
    bool  publicity      = 1;
    // 总票数
    int32 totalVotes     = 2;
    // 全体持票人反对票
    int32 opposeVotes    = 3;
    // 是否通过
    bool  pubPass        = 4;
}

message VotesRecord {
    repeated string address = 1;
}

message RuleConfig {
    // 参与率,以%为单位,只保留整数部分
    int32 boardAttendProb    = 1;
    // 通过率
    int32 boardPassProb      = 2;
    // 否决率
    int32 opposeProb         = 3;
    // 提案金额
    int64 proposalAmount     = 4;
    // 公示金额阈值
    int64 pubAmountThreshold = 5;
}