syntax = "proto3";
    option go_package = "./artifacts/academy-server/release-tsjs/modules/resume";

import "artifacts/academy-server/release-tsjs/core/common.proto";
import "artifacts/academy-server/release-tsjs/modules/geo/index.proto";
import "artifacts/academy-server/release-tsjs/modules/drive/index.proto";
import "artifacts/academy-server/release-tsjs/modules/skillset/index.proto";




  

  

  
      
service ResumeCompanys {
  rpc ResumeCompanyActionCreate (ResumeCompanyEntity) returns (ResumeCompanyCreateReply) {}
  rpc ResumeCompanyActionUpdate (ResumeCompanyEntity) returns (ResumeCompanyCreateReply) {}

  rpc ResumeCompanyActionQuery (QueryFilterRequest) returns (ResumeCompanyQueryReply) {}
  rpc ResumeCompanyActionGetOne (QueryFilterRequest) returns (ResumeCompanyReply) {}
  rpc ResumeCompanyActionRemove (QueryFilterRequest) returns (RemoveReply) {}
}

message ResumeCompanyCreateReply {
	ResumeCompanyEntity data  = 1;
	IError error = 2;
}

message ResumeCompanyReply {
	ResumeCompanyEntity data = 1;
	IError error = 2;
}

message ResumeCompanyQueryReply {
	repeated ResumeCompanyEntity items = 1;
	int64 totalItems = 2;
	int64 itemsPerPage = 3;
	int64 startIndex = 4;
	IError error = 5;
}



;


;





 
message ResumeCompanyEntity {
  optional string visibility = 1; // @tag(yaml:"visibility")
  optional string workspaceId = 2; // @tag(yaml:"workspaceId")
  optional string linkerId = 3; // @tag(yaml:"linkerId")
  optional string parentId = 4; // @tag(yaml:"parentId")
  string uniqueId = 5; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;" yaml:"uniqueId")
  optional string userId = 6; // @tag(yaml:"userId")
  /* One 2 one to external entity */
  optional string placeCountryId  = 9; // @tag(yaml:"placeCountryId" )
  GeoCountryEntity placeCountry = 10; // @tag(gorm:"foreignKey:PlaceCountryId;references:UniqueId" json:"placeCountry" yaml:"placeCountry")

  /* One 2 one to external entity */
  optional string workCountryId  = 12; // @tag(yaml:"workCountryId" )
  GeoCountryEntity workCountry = 13; // @tag(gorm:"foreignKey:WorkCountryId;references:UniqueId" json:"workCountry" yaml:"workCountry")

  /* One 2 one to external entity */
  optional string mainIndustryId  = 15; // @tag(yaml:"mainIndustryId" )
  ResumeIndustryEntity mainIndustry = 16; // @tag(gorm:"foreignKey:MainIndustryId;references:UniqueId" json:"mainIndustry" yaml:"mainIndustry")

  int64 employeeCount = 17; // @tag(  yaml:"employeeCount"  )

  int64 rank = 18; // @tag(gorm:"type:int;name:rank")
  int64 updated = 19; // @tag(gorm:"autoUpdateTime:nano")
  int64 created = 20; // @tag(gorm:"autoUpdateTime:nano")
  string createdFormatted = 21; // @tag(sql:"-")
  string updatedFormatted = 22; // @tag(sql:"-")

}









/**
* Add your custom services, and messages here.
* It can be your dto for example. 
* - Use Module.yml for entities, otherwise it won't be managed
* - Don't use this file for entities might be queried by web
**/
      




  

  

  
      
service Resumes {
  rpc ResumeActionCreate (ResumeEntity) returns (ResumeCreateReply) {}
  rpc ResumeActionUpdate (ResumeEntity) returns (ResumeCreateReply) {}

  rpc ResumeActionQuery (QueryFilterRequest) returns (ResumeQueryReply) {}
  rpc ResumeActionGetOne (QueryFilterRequest) returns (ResumeReply) {}
  rpc ResumeActionRemove (QueryFilterRequest) returns (RemoveReply) {}
}

message ResumeCreateReply {
	ResumeEntity data  = 1;
	IError error = 2;
}

message ResumeReply {
	ResumeEntity data = 1;
	IError error = 2;
}

message ResumeQueryReply {
	repeated ResumeEntity items = 1;
	int64 totalItems = 2;
	int64 itemsPerPage = 3;
	int64 startIndex = 4;
	IError error = 5;
}



;

;





 
message ResumeEntity {
  optional string visibility = 1; // @tag(yaml:"visibility")
  optional string workspaceId = 2; // @tag(yaml:"workspaceId")
  optional string linkerId = 3; // @tag(yaml:"linkerId")
  optional string parentId = 4; // @tag(yaml:"parentId")
  string uniqueId = 5; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;" yaml:"uniqueId")
  optional string userId = 6; // @tag(yaml:"userId")
  repeated ResumeEntityPolyglot translations = 7; // @tag(gorm:"foreignKey:LinkerId;references:UniqueId" json:"translations")
  optional string title = 9; // @tag(translate:"true"  yaml:"title"  )

  /* Many 2 many entities */
  repeated string projectsListId  = 11; // @tag(gorm:"-" sql:"-" yaml:"projectsListId")
  repeated ResumeProjectEntity projects = 12; // @tag(gorm:"many2many:resume_projects;foreignKey:UniqueId;references:UniqueId" yaml:"projects")

  /* Many 2 many entities */
  repeated string companiesListId  = 14; // @tag(gorm:"-" sql:"-" yaml:"companiesListId")
  repeated ResumeCompanyEntity companies = 15; // @tag(gorm:"many2many:resume_companies;foreignKey:UniqueId;references:UniqueId" yaml:"companies")

  int64 rank = 16; // @tag(gorm:"type:int;name:rank")
  int64 updated = 17; // @tag(gorm:"autoUpdateTime:nano")
  int64 created = 18; // @tag(gorm:"autoUpdateTime:nano")
  string createdFormatted = 19; // @tag(sql:"-")
  string updatedFormatted = 20; // @tag(sql:"-")

}

/* Because it has translation field, we need a translation table for this */
message ResumeEntityPolyglot {
  string linkerId = 1; // @tag(gorm:"uniqueId;not null;size:100;" json:"linkerId" yaml:"linkerId")
  string languageId = 2; // @tag(gorm:"uniqueId;not null;size:100;" json:"languageId" yaml:"languageId")

  string title = 3; // @tag(yaml:"title" json:"title");

}









/**
* Add your custom services, and messages here.
* It can be your dto for example. 
* - Use Module.yml for entities, otherwise it won't be managed
* - Don't use this file for entities might be queried by web
**/
      




  

  

  
      
service ResumeIndustrys {
  rpc ResumeIndustryActionCreate (ResumeIndustryEntity) returns (ResumeIndustryCreateReply) {}
  rpc ResumeIndustryActionUpdate (ResumeIndustryEntity) returns (ResumeIndustryCreateReply) {}

  rpc ResumeIndustryActionQuery (QueryFilterRequest) returns (ResumeIndustryQueryReply) {}
  rpc ResumeIndustryActionGetOne (QueryFilterRequest) returns (ResumeIndustryReply) {}
  rpc ResumeIndustryActionRemove (QueryFilterRequest) returns (RemoveReply) {}
}

message ResumeIndustryCreateReply {
	ResumeIndustryEntity data  = 1;
	IError error = 2;
}

message ResumeIndustryReply {
	ResumeIndustryEntity data = 1;
	IError error = 2;
}

message ResumeIndustryQueryReply {
	repeated ResumeIndustryEntity items = 1;
	int64 totalItems = 2;
	int64 itemsPerPage = 3;
	int64 startIndex = 4;
	IError error = 5;
}







 
message ResumeIndustryEntity {
  optional string visibility = 1; // @tag(yaml:"visibility")
  optional string workspaceId = 2; // @tag(yaml:"workspaceId")
  optional string linkerId = 3; // @tag(yaml:"linkerId")
  optional string parentId = 4; // @tag(yaml:"parentId")
  string uniqueId = 5; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;" yaml:"uniqueId")
  optional string userId = 6; // @tag(yaml:"userId")
  repeated ResumeIndustryEntityPolyglot translations = 7; // @tag(gorm:"foreignKey:LinkerId;references:UniqueId" json:"translations")
  optional string name = 9; // @tag(translate:"true"  yaml:"name"  )

  int64 rank = 10; // @tag(gorm:"type:int;name:rank")
  int64 updated = 11; // @tag(gorm:"autoUpdateTime:nano")
  int64 created = 12; // @tag(gorm:"autoUpdateTime:nano")
  string createdFormatted = 13; // @tag(sql:"-")
  string updatedFormatted = 14; // @tag(sql:"-")

}

/* Because it has translation field, we need a translation table for this */
message ResumeIndustryEntityPolyglot {
  string linkerId = 1; // @tag(gorm:"uniqueId;not null;size:100;" json:"linkerId" yaml:"linkerId")
  string languageId = 2; // @tag(gorm:"uniqueId;not null;size:100;" json:"languageId" yaml:"languageId")

  string name = 3; // @tag(yaml:"name" json:"name");

}









/**
* Add your custom services, and messages here.
* It can be your dto for example. 
* - Use Module.yml for entities, otherwise it won't be managed
* - Don't use this file for entities might be queried by web
**/
      




  

  

  
      
service ResumeProjects {
  rpc ResumeProjectActionCreate (ResumeProjectEntity) returns (ResumeProjectCreateReply) {}
  rpc ResumeProjectActionUpdate (ResumeProjectEntity) returns (ResumeProjectCreateReply) {}

  rpc ResumeProjectActionQuery (QueryFilterRequest) returns (ResumeProjectQueryReply) {}
  rpc ResumeProjectActionGetOne (QueryFilterRequest) returns (ResumeProjectReply) {}
  rpc ResumeProjectActionRemove (QueryFilterRequest) returns (RemoveReply) {}
}

message ResumeProjectCreateReply {
	ResumeProjectEntity data  = 1;
	IError error = 2;
}

message ResumeProjectReply {
	ResumeProjectEntity data = 1;
	IError error = 2;
}

message ResumeProjectQueryReply {
	repeated ResumeProjectEntity items = 1;
	int64 totalItems = 2;
	int64 itemsPerPage = 3;
	int64 startIndex = 4;
	IError error = 5;
}




;

;





 
message ResumeProjectEntity {
  optional string visibility = 1; // @tag(yaml:"visibility")
  optional string workspaceId = 2; // @tag(yaml:"workspaceId")
  optional string linkerId = 3; // @tag(yaml:"linkerId")
  optional string parentId = 4; // @tag(yaml:"parentId")
  string uniqueId = 5; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;" yaml:"uniqueId")
  optional string userId = 6; // @tag(yaml:"userId")
  repeated ResumeProjectEntityPolyglot translations = 7; // @tag(gorm:"foreignKey:LinkerId;references:UniqueId" json:"translations")
  optional string title = 9; // @tag(translate:"true"  yaml:"title"  )

    optional string description = 10; // @tag(translate:"true"  yaml:"description" gorm:"text" )
    optional string descriptionExcerpt = 11; // @tag(translate:"true" yaml:"descriptionExcerpt" gorm:"text" )

    optional string technicalDescription = 12; // @tag(translate:"true"  yaml:"technicalDescription" gorm:"text" )
    optional string technicalDescriptionExcerpt = 13; // @tag(translate:"true" yaml:"technicalDescriptionExcerpt" gorm:"text" )

  /* One 2 one to external entity */
  optional string typeId  = 15; // @tag(yaml:"typeId" )
  ResumeProjectTypeEntity type = 16; // @tag(gorm:"foreignKey:TypeId;references:UniqueId" json:"type" yaml:"type")

  /* Many 2 many entities */
  repeated string attachmentsListId  = 18; // @tag(gorm:"-" sql:"-" yaml:"attachmentsListId")
  repeated FileEntity attachments = 19; // @tag(gorm:"many2many:resumeProject_attachments;foreignKey:UniqueId;references:UniqueId" yaml:"attachments")

  int64 start = 21;
  string startFormatted = 22;

  int64 end = 24;
  string endFormatted = 25;

  /* This is an object, another entity needs to be created for */
  /*repeated ResumeProjectLinksEntity links = 26; // @tag(gorm:"foreignKey:LinkerId;references:UniqueId" yaml:"links")*/
  repeated ResumeProjectLinksEntity links = 26; // @tag(gorm:"foreignKey:LinkerId;references:UniqueId" yaml:"links")

  int64 rank = 27; // @tag(gorm:"type:int;name:rank")
  int64 updated = 28; // @tag(gorm:"autoUpdateTime:nano")
  int64 created = 29; // @tag(gorm:"autoUpdateTime:nano")
  string createdFormatted = 30; // @tag(sql:"-")
  string updatedFormatted = 31; // @tag(sql:"-")

}

/* Because it has translation field, we need a translation table for this */
message ResumeProjectEntityPolyglot {
  string linkerId = 1; // @tag(gorm:"uniqueId;not null;size:100;" json:"linkerId" yaml:"linkerId")
  string languageId = 2; // @tag(gorm:"uniqueId;not null;size:100;" json:"languageId" yaml:"languageId")

  string title = 3; // @tag(yaml:"title" json:"title");

  string description = 4; // @tag(yaml:"description" json:"description");

  string technicalDescription = 5; // @tag(yaml:"technicalDescription" json:"technicalDescription");

}









 
message ResumeProjectLinksEntity {
  optional string visibility = 1; // @tag(yaml:"visibility")
  optional string workspaceId = 2; // @tag(yaml:"workspaceId")
  optional string linkerId = 3; // @tag(yaml:"linkerId")
  optional string parentId = 4; // @tag(yaml:"parentId")
  string uniqueId = 5; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;" yaml:"uniqueId")
  optional string userId = 6; // @tag(yaml:"userId")
  optional string link = 8; // @tag(  yaml:"link"  )

  int64 rank = 9; // @tag(gorm:"type:int;name:rank")
  int64 updated = 10; // @tag(gorm:"autoUpdateTime:nano")
  int64 created = 11; // @tag(gorm:"autoUpdateTime:nano")
  string createdFormatted = 12; // @tag(sql:"-")
  string updatedFormatted = 13; // @tag(sql:"-")

}









/**
* Add your custom services, and messages here.
* It can be your dto for example. 
* - Use Module.yml for entities, otherwise it won't be managed
* - Don't use this file for entities might be queried by web
**/
      




  

  

  
      
service ResumeProjectTypes {
  rpc ResumeProjectTypeActionCreate (ResumeProjectTypeEntity) returns (ResumeProjectTypeCreateReply) {}
  rpc ResumeProjectTypeActionUpdate (ResumeProjectTypeEntity) returns (ResumeProjectTypeCreateReply) {}

  rpc ResumeProjectTypeActionQuery (QueryFilterRequest) returns (ResumeProjectTypeQueryReply) {}
  rpc ResumeProjectTypeActionGetOne (QueryFilterRequest) returns (ResumeProjectTypeReply) {}
  rpc ResumeProjectTypeActionRemove (QueryFilterRequest) returns (RemoveReply) {}
}

message ResumeProjectTypeCreateReply {
	ResumeProjectTypeEntity data  = 1;
	IError error = 2;
}

message ResumeProjectTypeReply {
	ResumeProjectTypeEntity data = 1;
	IError error = 2;
}

message ResumeProjectTypeQueryReply {
	repeated ResumeProjectTypeEntity items = 1;
	int64 totalItems = 2;
	int64 itemsPerPage = 3;
	int64 startIndex = 4;
	IError error = 5;
}







 
message ResumeProjectTypeEntity {
  optional string visibility = 1; // @tag(yaml:"visibility")
  optional string workspaceId = 2; // @tag(yaml:"workspaceId")
  optional string linkerId = 3; // @tag(yaml:"linkerId")
  optional string parentId = 4; // @tag(yaml:"parentId")
  string uniqueId = 5; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;" yaml:"uniqueId")
  optional string userId = 6; // @tag(yaml:"userId")
  repeated ResumeProjectTypeEntityPolyglot translations = 7; // @tag(gorm:"foreignKey:LinkerId;references:UniqueId" json:"translations")
  optional string name = 9; // @tag(translate:"true"  yaml:"name"  )

  int64 rank = 10; // @tag(gorm:"type:int;name:rank")
  int64 updated = 11; // @tag(gorm:"autoUpdateTime:nano")
  int64 created = 12; // @tag(gorm:"autoUpdateTime:nano")
  string createdFormatted = 13; // @tag(sql:"-")
  string updatedFormatted = 14; // @tag(sql:"-")

}

/* Because it has translation field, we need a translation table for this */
message ResumeProjectTypeEntityPolyglot {
  string linkerId = 1; // @tag(gorm:"uniqueId;not null;size:100;" json:"linkerId" yaml:"linkerId")
  string languageId = 2; // @tag(gorm:"uniqueId;not null;size:100;" json:"languageId" yaml:"languageId")

  string name = 3; // @tag(yaml:"name" json:"name");

}









/**
* Add your custom services, and messages here.
* It can be your dto for example. 
* - Use Module.yml for entities, otherwise it won't be managed
* - Don't use this file for entities might be queried by web
**/
      




  

  

  
      
service ResumeSkills {
  rpc ResumeSkillActionCreate (ResumeSkillEntity) returns (ResumeSkillCreateReply) {}
  rpc ResumeSkillActionUpdate (ResumeSkillEntity) returns (ResumeSkillCreateReply) {}

  rpc ResumeSkillActionQuery (QueryFilterRequest) returns (ResumeSkillQueryReply) {}
  rpc ResumeSkillActionGetOne (QueryFilterRequest) returns (ResumeSkillReply) {}
  rpc ResumeSkillActionRemove (QueryFilterRequest) returns (RemoveReply) {}
}

message ResumeSkillCreateReply {
	ResumeSkillEntity data  = 1;
	IError error = 2;
}

message ResumeSkillReply {
	ResumeSkillEntity data = 1;
	IError error = 2;
}

message ResumeSkillQueryReply {
	repeated ResumeSkillEntity items = 1;
	int64 totalItems = 2;
	int64 itemsPerPage = 3;
	int64 startIndex = 4;
	IError error = 5;
}




;





 
message ResumeSkillEntity {
  optional string visibility = 1; // @tag(yaml:"visibility")
  optional string workspaceId = 2; // @tag(yaml:"workspaceId")
  optional string linkerId = 3; // @tag(yaml:"linkerId")
  optional string parentId = 4; // @tag(yaml:"parentId")
  string uniqueId = 5; // @tag(gorm:"primarykey;uniqueId;unique;not null;size:100;" yaml:"uniqueId")
  optional string userId = 6; // @tag(yaml:"userId")
  /* One 2 one to external entity */
  optional string skillsetId  = 9; // @tag(yaml:"skillsetId" )
  SkillsetEntity skillset = 10; // @tag(gorm:"foreignKey:SkillsetId;references:UniqueId" json:"skillset" yaml:"skillset")

  int64 rank = 11; // @tag(gorm:"type:int;name:rank")
  int64 updated = 12; // @tag(gorm:"autoUpdateTime:nano")
  int64 created = 13; // @tag(gorm:"autoUpdateTime:nano")
  string createdFormatted = 14; // @tag(sql:"-")
  string updatedFormatted = 15; // @tag(sql:"-")

}









/**
* Add your custom services, and messages here.
* It can be your dto for example. 
* - Use Module.yml for entities, otherwise it won't be managed
* - Don't use this file for entities might be queried by web
**/
      


