syntax = "proto3";

package com.wixpress.authorization.invite.service;

import "wix/api/validations.proto";
import "wix/api/annotations.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";
import "wix/api/entity.proto";

message AppInvite {
    option (.wix.api.entity) = {
        fqdn: "wix.identity.invites.v1.app_invite"
        segment: USERS
    };
    string id = 1 [(wix.api.format) = GUID, (wix.api.readOnly) = true];
    string app_id = 2 [(wix.api.format) = GUID];
    google.protobuf.StringValue app_name = 3 [(wix.api.readOnly) = true, (.wix.api.maxLength) = 100];
    repeated string policy_ids = 4 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 25, (.wix.api.minSize) = 1, (.wix.api.maxSize) = 10];
    string given_by_user_id = 5 [(wix.api.format) = GUID, (wix.api.readOnly) = true];
    string given_by_account_id = 6 [(wix.api.format) = GUID, (wix.api.readOnly) = true];
    string invited_to_account_id = 7 [(wix.api.format) = GUID, (wix.api.readOnly) = true];
    google.protobuf.StringValue accepted_by = 8 [(wix.api.format) = GUID, (wix.api.readOnly) = true];
    google.protobuf.StringValue accepted_by_account_id = 9 [(wix.api.format) = GUID, (wix.api.readOnly) = true];
    string dest_email = 10 [(wix.api.format) = EMAIL, (.wix.api.pii) = true];
    string status = 11 [(wix.api.readOnly) = true, (.wix.api.maxLength) = 20] ;
    google.protobuf.StringValue brand_domain = 12 [(.wix.api.maxLength) = 50];
    google.protobuf.StringValue invite_purpose = 13 [(.wix.api.maxLength) = 50];
    google.protobuf.Timestamp expiration_date = 14 [(wix.api.readOnly) = true];
    google.protobuf.Timestamp date_created = 15 [(wix.api.readOnly) = true];
    google.protobuf.Timestamp date_updated = 16 [(wix.api.readOnly) = true];
}