syntax = "proto2";

package maps_adv.geosmb.landlord.proto.organization_details;

import "maps_adv/geosmb/landlord/proto/common.proto";
import "maps_adv/geosmb/landlord/proto/contacts.proto";
import "maps_adv/geosmb/landlord/proto/goods.proto";
import "maps_adv/geosmb/landlord/proto/instagram.proto";
import "maps_adv/geosmb/landlord/proto/preferences.proto";
import "maps_adv/geosmb/landlord/proto/promo.proto";
import "maps_adv/geosmb/landlord/proto/rating.proto";
import "maps_adv/geosmb/landlord/proto/schedule.proto";
import "maps_adv/geosmb/landlord/proto/services.proto";


message OrganizationDetailsInput {
    required string slug = 1;
    required string token = 2;
    optional LandingVersion version = 3;
}

enum LandingType {
    DEFAULT = 1;
    INSTAGRAM = 2;
}

message OrganizationDetails {
  required string name = 1;
  repeated string categories = 2;
  optional string description = 4;
  optional common.ImageTemplate logo = 5;
  optional common.ImageTemplate cover = 6;
  repeated common.ImageTemplate photos = 7;

  required preferences.Preferences preferences = 10;

  required contacts.Contacts contacts = 20;
  optional schedule.Schedule schedule = 21;

  optional services.Services services = 30;
  optional rating.Rating rating = 31;
  optional Extras extras = 32;
  optional promo.Promos promos = 33;
  optional goods.GoodsData goods = 34;

  required string permalink = 40;
  optional bool blocked = 41;
  optional bool published = 42 [default = true];

  optional LandingType landing_type = 45 [default = DEFAULT];
  optional instagram.InstagramData instagram = 46;

  optional uint64 chain_id = 50;
  repeated BranchDetails branches = 51;
  optional string biz_id = 52;
  reserved 3;
}

message Extras {
  repeated string plain_extras = 1; // like 'Wi-Fi', 'Оплата картой'
  optional string extended_description = 2;
}

enum LandingVersion {
    STABLE = 1;
    UNSTABLE = 2;
}

message BranchDetails {
    required string slug = 1;
    required string permalink = 2;
    required string name = 3;
    optional string description = 4;
    required contacts.Contacts contacts = 5;
    optional common.ImageTemplate logo = 6;
    optional common.ImageTemplate cover = 7;
    optional preferences.Preferences preferences = 8;
    optional schedule.Schedule schedule = 9;
}

message CreateLandingInputData {
    required uint64 permalink = 1;
    required string name = 2;
    repeated string categories = 3;
    required contacts.Contacts contacts = 4;
}
