2024-09-26 18:01:49 -04:00
|
|
|
syntax = "proto3";
|
2024-11-26 22:05:50 -05:00
|
|
|
package svc.v1;
|
2024-09-26 18:01:49 -04:00
|
|
|
|
|
|
|
import "cosmos/orm/v1/orm.proto";
|
|
|
|
|
2024-11-26 22:05:50 -05:00
|
|
|
option go_package = "github.com/onsonr/sonr/x/svc/types";
|
|
|
|
|
2024-09-26 18:01:49 -04:00
|
|
|
|
|
|
|
// https://github.com/cosmos/cosmos-sdk/blob/main/orm/README.md
|
|
|
|
|
2024-11-26 22:05:50 -05:00
|
|
|
message Domain {
|
2024-09-27 20:58:05 -04:00
|
|
|
option (cosmos.orm.v1.table) = {
|
2024-11-18 19:04:10 -05:00
|
|
|
id: 1
|
|
|
|
primary_key: {
|
|
|
|
fields: "id"
|
|
|
|
auto_increment: true
|
|
|
|
}
|
|
|
|
index: {
|
|
|
|
id: 1
|
|
|
|
fields: "origin"
|
|
|
|
unique: true
|
|
|
|
}
|
2024-09-27 20:58:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
uint64 id = 1;
|
|
|
|
string origin = 2;
|
|
|
|
string name = 3;
|
|
|
|
string description = 4;
|
|
|
|
string category = 5;
|
2024-11-18 19:04:10 -05:00
|
|
|
string icon = 6;
|
2024-09-27 20:58:05 -04:00
|
|
|
repeated string tags = 7;
|
|
|
|
}
|
|
|
|
|
2024-11-26 22:05:50 -05:00
|
|
|
// Metadata represents a DID alias
|
|
|
|
message Metadata {
|
2024-09-27 20:58:05 -04:00
|
|
|
option (cosmos.orm.v1.table) = {
|
2024-11-18 19:04:10 -05:00
|
|
|
id: 2
|
|
|
|
primary_key: {fields: "id"}
|
|
|
|
index: {
|
|
|
|
id: 1
|
|
|
|
fields: "subject,origin"
|
|
|
|
unique: true
|
|
|
|
}
|
2024-09-27 20:58:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// The unique identifier of the alias
|
|
|
|
string id = 1;
|
|
|
|
|
|
|
|
// The alias of the DID
|
|
|
|
string subject = 2;
|
|
|
|
|
|
|
|
// Origin of the alias
|
|
|
|
string origin = 3;
|
|
|
|
|
|
|
|
// Controller of the alias
|
|
|
|
string controller = 4;
|
|
|
|
}
|