qlib_rs/data/entity.rs
1use std::collections::HashMap;
2
3use crate::{data::FieldType, EntityId, Field};
4
5
6pub struct Entity {
7 pub entity_id: EntityId,
8 pub fields: HashMap<FieldType, Field>,
9}
10
11impl Entity {
12 pub fn new(entity_id: impl Into<EntityId>) -> Self {
13 Self {
14 entity_id: entity_id.into(),
15 fields: HashMap::new(),
16 }
17 }
18}