limiter-proto/proto/limiter_range.thrift
Andrew Mayorov c5dfe39a00
TD-312: Bump to valitydev/damsel@dac2cb5 (#21)
Also use valitydev/thrift compiler v0.14.2.3 w/ `app_namespaces`.

* Reuse Erlang CI workflow
* Specify `damsel` as dependency
2022-06-23 14:32:58 +03:00

51 lines
1.1 KiB
Thrift

/**
* Машина хранящая временные интервалы
*/
namespace java dev.vality.limiter.range
namespace erlang limproto.range
include "proto/base.thrift"
include "proto/domain.thrift"
include "time_range.thrift"
/// Domain
typedef string LimitRangeID
typedef base.Timestamp Timestamp
struct LimitRange {
1: required LimitRangeID id
2: required time_range.TimeRangeType type
3: required Timestamp created_at
4: optional domain.CurrencySymbolicCode currency
}
struct LimitRangeState {
1: required LimitRangeID id
2: required time_range.TimeRangeType type
3: required Timestamp created_at
4: optional list<time_range.TimeRange> ranges
5: optional domain.CurrencySymbolicCode currency
}
/// LimitRange events
struct TimestampedChange {
1: required base.Timestamp occured_at
2: required Change change
}
union Change {
1: CreatedChange created
2: TimeRangeCreatedChange time_range_created
}
struct CreatedChange {
1: required LimitRange limit_range
}
struct TimeRangeCreatedChange {
1: required time_range.TimeRange time_range
}