... | @@ -17,7 +17,7 @@ export interface User { |
... | @@ -17,7 +17,7 @@ export interface User { |
|
document: string, // cpf, coop_code
|
|
document: string, // cpf, coop_code
|
|
role: string // Enum { 'associate', 'admin', 'cooperative' }
|
|
role: string // Enum { 'associate', 'admin', 'cooperative' }
|
|
agency: 'ObjectID' // agency id
|
|
agency: 'ObjectID' // agency id
|
|
products: 'ObjectID'[] // products ids
|
|
// products: 'ObjectID'[] // products ids
|
|
}
|
|
}
|
|
|
|
|
|
export interface Cooperative {
|
|
export interface Cooperative {
|
... | @@ -25,7 +25,7 @@ export interface Cooperative { |
... | @@ -25,7 +25,7 @@ export interface Cooperative { |
|
name: string,
|
|
name: string,
|
|
document: string, // cnpj
|
|
document: string, // cnpj
|
|
anualResults: 'ObjectID'[], // anual results ids
|
|
anualResults: 'ObjectID'[], // anual results ids
|
|
products: 'ObjectID'[] // products ids
|
|
products: 'ObjectID'[] // CooperativeProduct ids
|
|
}
|
|
}
|
|
|
|
|
|
export interface AnualResults {
|
|
export interface AnualResults {
|
... | @@ -35,11 +35,16 @@ export interface AnualResults { |
... | @@ -35,11 +35,16 @@ export interface AnualResults { |
|
result: number // category id
|
|
result: number // category id
|
|
}
|
|
}
|
|
|
|
|
|
export interface Product {
|
|
export interface CooperativeProduct {
|
|
_id: 'ObjectID',
|
|
_id: 'ObjectID',
|
|
name: string,
|
|
|
|
value: number,
|
|
value: number,
|
|
weight: number,
|
|
weight: number,
|
|
|
|
product: 'ObjectID' // Product ids
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Product {
|
|
|
|
_id: 'ObjectID',
|
|
|
|
name: string,
|
|
category: 'ObjectID' // category _id
|
|
category: 'ObjectID' // category _id
|
|
}
|
|
}
|
|
|
|
|
... | | ... | |