34 lines
1.0 KiB
Cap'n Proto
34 lines
1.0 KiB
Cap'n Proto
# Maple Chat, A simple chat app made with cap'n proto
|
|
# Copyright (C) 2023 Roux Pupo
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
@0xd93f69a809989ffc;
|
|
|
|
using UserId = UInt32;
|
|
using MessageId = UInt32;
|
|
|
|
struct User {
|
|
name @0 :Text;
|
|
age @1 :UInt8;
|
|
userId @2 :UserId;
|
|
}
|
|
|
|
struct Message {
|
|
sender @0: User;
|
|
reciever @1: List(UserId);
|
|
content @2: Text;
|
|
time @3: Int64;
|
|
messageId @4: MessageId;
|
|
}
|