123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- // +bili:type=service
- // Code generated by warden.
- syntax = "proto3";
- package community.service.coin.v1;
- import "github.com/gogo/protobuf/gogoproto/gogo.proto";
- option go_package = "api";
- // AddCoinReply reply
- message AddCoinReply {
- }
- // AddCoinReq req
- message AddCoinReq {
- // ip
- string ip = 1 [(gogoproto.jsontag) = "ip", (gogoproto.customname) = "IP"];
- // mid
- int64 mid = 2 [(gogoproto.moretags) = "form:\"mid\" validate:\"required,min=1\""];
- // up 主mid
- int64 upmid = 3 [(gogoproto.moretags) = 'form:"upid" validate:"required"'];
- // 最大投币数
- int64 max_coin = 4 [(gogoproto.moretags) = 'form:"max"'];
- // aid
- int64 aid = 5 [(gogoproto.moretags) = "form:\"aid\" validate:\"required\""];
- // 业务
- string business = 6 [(gogoproto.moretags) = "form:\"business\" validate:\"required\""];
- // 数量
- int64 number = 7 [(gogoproto.moretags) = "form:\"number\" validate:\"required,min=1\""];
- // 稿件typeid(稿件专用)
- int32 typeid = 8 [(gogoproto.moretags) = "form:\"typeid\""];
- // 稿件发布时间
- int64 pub_time = 9 [(gogoproto.moretags) = "form:\"pub_time\""];
- }
- // AddUserCoinExpReply add coin exp reply
- message AddUserCoinExpReply {
- }
- // AddUserCoinExpReq req
- message AddUserCoinExpReq {
- // ip
- string ip = 1 [(gogoproto.jsontag) = "ip", (gogoproto.customname) = "IP"];
- // mid
- int64 mid = 2;
- // business
- string business = 3;
- // number
- int64 number = 4;
- }
- // CoinsLogReply reply
- message CoinsLogReply {
- // log
- repeated ModelLog list = 1;
- }
- // CoinsLogReq req
- message CoinsLogReq {
- // mid
- int64 mid = 1 [(gogoproto.moretags) = "form:\"mid\" validate:\"required,min=1\""];
- // 返回最近一周还是全部
- bool recent = 2 [(gogoproto.moretags) = "form:\"recent\""];
- // 翻译后的格式 还是原始格式
- bool translate = 3 [(gogoproto.moretags) = "form:\"translate\""];
- }
- // ItemUserCoinsReply reply
- message ItemUserCoinsReply {
- // number
- int64 number = 1[(gogoproto.jsontag) = "number"] ;
- }
- // ItemUserCoinsReq req
- message ItemUserCoinsReq {
- // mid
- int64 mid = 1 [(gogoproto.moretags) = 'form:"mid" validate:"required"'];
- // aid
- int64 aid = 2 [(gogoproto.moretags) = "form:\"aid\" validate:\"required\""];
- // 业务
- string business = 3 [(gogoproto.moretags) = "form:\"business\" validate:\"required\""];
- }
- // ListReply reply
- message ListReply {
- // log
- repeated ModelList list = 1;
- }
- // ListReq .
- message ListReq {
- // mid
- int64 mid = 1;
- // business
- string business = 2;
- // 时间戳
- int64 ts = 3;
- }
- // ModelArchiveUserCoins .
- message ModelArchiveUserCoins {
- // number
- int64 number = 1;
- }
- // ModelArgModifyCoin .
- message ModelArgModifyCoin {
- // mid
- int64 mid = 1;
- // count
- double count = 2;
- // 原因
- string reason = 3;
- // ip
- string ip = 4 [(gogoproto.jsontag) = "ip", (gogoproto.customname) = "IP"];
- // 操作人
- string operator = 5;
- // 是否要检查余额数量 默认检查 为1则不检查
- int32 check_zero = 6;
- }
- // ModelList .
- message ModelList {
- // aid
- int64 aid = 1;
- // number
- int64 number = 2;
- // 时间戳
- int64 ts = 3;
- // ip
- uint32 ip = 4 [(gogoproto.jsontag) = "ip", (gogoproto.customname) = "IP"];
- }
- // ModelLog .
- message ModelLog {
- // 修改前硬币数
- double from = 1;
- // 修改后硬币数
- double to = 2;
- // ip
- string ip = 3 [(gogoproto.jsontag) = "ip", (gogoproto.customname) = "IP"];
- // 原因
- string desc = 4;
- // 时间戳
- int64 time_stamp = 5;
- }
- // ModelRecord record
- message ModelRecord {
- // aid
- int64 aid = 1;
- // mid
- int64 mid = 2;
- // up主id
- int64 up = 3;
- // 时间戳
- int64 timestamp = 4;
- // number
- int64 number = 5;
- // 业务
- string business = 6;
- // ip
- uint32 ip = 7 [(gogoproto.jsontag) = "ip", (gogoproto.customname) = "IP"];
- }
- // ModifyCoinsReply reply
- message ModifyCoinsReply {
- // result
- double result = 1;
- }
- // ModifyCoinsReq req
- message ModifyCoinsReq {
- // mid
- int64 mid = 1 [(gogoproto.moretags) = "form:\"mid\" validate:\"required\""];
- // 变更的计数 例如10为硬币数加10
- double count = 2 [(gogoproto.moretags) = "form:\"count\" validate:\"required\""];
- // 改变的原因
- string reason = 3 [(gogoproto.moretags) = "form:\"reason\" validate:\"required\""];
- // ip
- string ip = 4 [(gogoproto.jsontag) = "ip", (gogoproto.customname) = "IP"];
- // 操作人
- string operator = 5 [(gogoproto.moretags) = "form:\"operator\""];
- // 是否要检查余额数量 默认检查 为1则不检查
- int32 check_zero = 6 [(gogoproto.moretags) = "form:\"check_zero\""];
- // 时间戳
- int64 ts = 7;
- }
- // TodayExpReply reply
- message TodayExpReply {
- // exp
- int64 exp = 1;
- }
- // TodayExpReq req
- message TodayExpReq {
- // mid
- int64 mid = 1 [(gogoproto.moretags) = "form:\"mid\" validate:\"required,min=1\""];
- }
- // UpdateAddCoinReply reply
- message UpdateAddCoinReply {
- }
- // UpdateAddCoinReq req
- message UpdateAddCoinReq {
- // aid
- int64 aid = 1;
- // mid
- int64 mid = 2;
- // up mid
- int64 up = 3;
- // timestamp
- int64 timestamp = 4;
- // number
- int64 number = 5;
- // business
- string business = 6;
- // ip
- uint32 ip = 7 [(gogoproto.jsontag) = "ip", (gogoproto.customname) = "IP"];
- string ipv6 = 8 [(gogoproto.jsontag) = "ip_v6", (gogoproto.customname) = "IPV6"];
- }
- // UserCoinsReply reply
- message UserCoinsReply {
- // count
- double count = 1;
- }
- // UserCoinsReq req
- message UserCoinsReq {
- // mid
- int64 mid = 1 [(gogoproto.moretags) = "form:\"mid\" validate:\"required,min=1\""];
- }
- // Coin rpc
- service Coin {
- // AddCoin add coin. 投币接口
- rpc AddCoin(AddCoinReq) returns(AddCoinReply);
- // ItemUserCoins get coins added of archive. 投币数量接口
- rpc ItemUserCoins(ItemUserCoinsReq) returns(ItemUserCoinsReply);
- // UserCoins get user coins. 用户硬币余额
- rpc UserCoins(UserCoinsReq) returns(UserCoinsReply);
- // ModifyCoins modify user coins. 修改硬币数
- rpc ModifyCoins(ModifyCoinsReq) returns(ModifyCoinsReply);
- // List get coin added list.投币列表
- rpc List(ListReq) returns(ListReply);
- // CoinsLog coins log 投币日志
- rpc CoinsLog(CoinsLogReq) returns(CoinsLogReply);
- // AddUserCoinExp add user coin exp for job
- rpc AddUserCoinExp(AddUserCoinExpReq) returns(AddUserCoinExpReply);
- // UpdateAddCoin update db after add coin for job.
- rpc UpdateAddCoin(UpdateAddCoinReq) returns(UpdateAddCoinReply);
- // TodayExp get today coin added exp. 今日投币经验
- rpc TodayExp(TodayExpReq) returns(TodayExpReply);
- }
|