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